Electronic – Hardwire rgb-led-controller instead of Infrared

infraredled stripraspberry piwire

I think most of you know these cheap rgb-strip-controllers with ir-remote. I try to control it via hardwired gpio from raspberry3, simply replacing the ir-receiver.

from

|ir remote|.......>...|IR-LED GP3 µc|

to

|rpi GPIO out|----->----|in GP3 µc|

I found these informations about the box:

12 V In 
SMD5050 RGB Strip 4Wire
SOT23 NFET, max 3A
IR Sensor CHQB, 3Wire 
8bit 8pin µc with 5V TTL Logic
at least 3x PWM
maybe PIC12F617

Pinout on this µc:

        GND - XX - 5V
        GP5 - XX - GP0 - B Out
        GP4 - XX - GP1 - R Out
IR IN - GP3 - XX - GP2 - G Out

http://ww1.microchip.com/downloads/en/DeviceDoc/41388A.pdf

opened rgb-ir-controller

Is it possible?!

  • 1. controlling via wired GP3 (IR)-Port?

    • Seems, the carrier-demodulation (35KHz) is inside the ir-receiver.
    • How do i have to encode/recode the ir-data to be understood by the µc?
    • Is it a simple pseudo-serial-in-port with a distinctive baudrate?
    • clearly saying "i want to bypass the ir-path"
    • benefit short commands and no hustle on raspberry
    • disadvantage only able to use µc-saved commands
  • 2. connecting directly to the NFET (Q1-Q3 on picture)?

    • Do i have to level-shift 3,3V to 5V?
    • benefit all is possible
    • disadvantage need to code it all on raspberry

Best Answer

Both are possible.

IR, first you need an IR receiver setup. Record the signal incoming from the remote. Then setup a simple IR led circuit controlled by a transistor/FET controlled by GPIO. Send the commands you want. It is not pseudo serial, the codes tend to be NEC (Maybe RC5, but NEC is simpler and more common). Any number of IR RPi remote control projects on google will help.

The hard wire, remove the existing IC. Use a level shifter as 3.3V will likely not be enough to exceed the VGS Threshold for a proper low Resistance of Drain-Source, RDS(on). This shift can be a simple npn transistor, but it requires you to invert your logic on the RPI code.

Update:

Yes, you could bypass the IR Receiver. It is as you expect, a Demodulator that removes the 38khz (or so) carrier wave, and passes the data. I believe it should be an active high signal through a pull-up. This allows you to skip the LED transmitter and IR receiver sections. Since the line should have a 5V pull up, all you need is a simple NPN transistor to level shift from 3.3V to 5V. Again, logic is inverted so a logic 1 at the RPI would be a logic low at the MCU input. You must make sure only the data, Unmodulated is sent.

Since you are using LIRC for the RPI, then you need to load it properly:

 sudo modprobe lirc_rpi softcarrier=0

The Softcarrier option disabled to eliminate the carrier wave, only available on lirc_rpi afaik, so you lucked out.

This depends on the specifics of the IR receiver used. A picture of the reverse of the board would help. You would want to disconnect the IR receivers Data to avoid interference.