3

OK, I bought this little remote-controlled Ac outlet thing for $1. It controls 3 outlets via RF. I didn't realize it was RF at first, but I currently have my BeagleBone Black doing a bunch of home automation stuff on my network anyway, and figure I can wire in the remote into the BBB via a couple transistors and be on my way.

I can't read the chip in the remote, it's blank. Supply is a 3V coin cell battery, but I figure I can run it from the 3.3V supply of the BeagleBone (maybe with a resistor to drop the voltage? Or should it be okay at 3.3V? I'm thinking it should be okay at 3.3V). There are 6 buttons, 3 for on, 3 for off. There are two positive rails, one for all the on buttons, one for the offs. Each of these rails connects to a different pin. The buttons connect the positive rail to different pins.

For schematic see @Transistor 's post below.

Some of this is a bit sketchy and I purposely omitted what looks like a power supply cap, all the antennae stuff (P1 and P7 I think). Hopefully, it gives you an idea of what I'm looking at.

So, if I drop a few GP PNP transistors over the ends of each switch, then connect base to different GPIO pins on the BeagleBone, then dropping the GPIO pin low should make the transistor conduct, right? The GPIO pins on the BBB are also 3.3V and current in minimal, so what sort of resistors am I looking at to avoid frying stuff?

I'm a software guy, not a hardware guy. Any and all help is greatly appreciated!!

Edit: Working now and Google Assistant can now control the AC outlets I bought (3 for $1). I have a purple livingroom light and a big fan connected right now. Not using number 3 (yet). Software will be made more robust later, but really cool to have it on my phone now front back

  • looks like you may have the connections to R2 and SW4, SW5 and SW6 incorrectly drawn – jsotola Jul 08 '18 at 06:16
  • Oh wow. You are right. R2 should be inline with the switches. Nice catch! I'll fix it when I get back to my desk in the am – Evan Langlois Jul 08 '18 at 10:06
  • i think that @Transistor drew the correct diagram in the answer below – jsotola Jul 08 '18 at 18:59
  • there may be a way to use the BeagleBone instead of U1 to control the RF transmitter directly. ..... can you post a picture of the front and back of the transmitter circuit board – jsotola Jul 08 '18 at 22:37
  • @jstola Posted. Hard to read since its connected – Evan Langlois Jul 15 '18 at 08:04
  • Congratulations on getting it working. Rather than solder a pair onto each switch I probably would have taken one wire for each row, one for each column and power +/- and sorted out the links on the breadboard. Your way, while a bit of a mess, does at least use coloured pairs so it is probably easier to debug. +1. – Transistor Jul 15 '18 at 08:35
  • @Transistor Actually, I have a perf-board I'm moving everything to with the reduced wire count you are talking about. I chose to use the extra wires exactly for debugging. Then again, those chips are so sensitive that apparently touching a control wire will activate it! And I had a ton of issues with wires either not contacting the test battery or not contacting the beaglebone's header pins, but it all got worked out. – Evan Langlois Jul 16 '18 at 09:40

3 Answers3

2

CD4066B is one example of a simple quad switch. It has four switches in it which can be controlled independently.

enter image description here

If you drive control signal A, the IC will establish a connection between Pin 1 and 2. Do nce, you can connect two points of earlier switch position to pin 1 and 2 of the IC and control it via CONTROL A signal.

The price is just 13 cents for 1k units.. Or I expect less than a dollar for single IC..

On resistance is 125 ohms but should be okay as long as fast switching isn't needed.

Typical quiescent current is less than 1 uA.

I am just giving one example of such IC and I don't insist to go only for TI IC as such.

Simple way to go if you can buy the ICs.

https://www.ti.com/switches-multiplexers/analog/products.html#p1143=1:1%20SPST

You can explore some more in the above link.

User323693
  • 9,151
  • 4
  • 21
  • 50
2

This isn't a full answer but may help you sort out your schematic.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. A redraw of the OP's suspect schematic.

Draw positive at the top and negative at the bottom. Try to keep it read from left to right with current flow from top to bottom.

Your reverse engineering looks suspect to me. I suspect that the chip is multiplexing the switches but that you have misread the board. See if they are connected as a 2 x 3 matrix.

schematic

simulate this circuit

Figure 2. A more likely multiplexed arrangement. The chip stobes columns 1 to 3 (Col1 to Col3) low (0 V) sequentially and reads rows 1 and 2 (Row1 and Row2) to see if any switches have been pressed. R1 and R2 are pull-ups and pull the rows high when no switch is pressed.


Supply is a 3 V coin cell battery, but I figure I can run it from the 3.3 V supply of the BeagleBone (maybe with a resistor to drop the voltage?

It should be fine at 3.3 V. The chip is probably designed to run from a couple of AAs and a pair of these could exceed 3.3 V when fresh.

There are 6 buttons, 3 for on, 3 for off. There are two positive rails, one for all the on buttons, one for the offs. Each of these rails connects to a different pin. The buttons connect the positive rail to different pins.

They're the rows with pull-ups on Figure 2.

So, if I drop a few GP PNP transistors over the ends of each switch, then connect base to different GPIO pins on the BeagleBone, then dropping the GPIO pin low should make the transistor conduct, right?

You haven't sketched a plan but this probably won't work well as you don't have a definite ground on Col1, Col2 or Col3.

enter image description here

Figure 3. The CD4016/4066 pinout. The switches are CMOS and behave like low value resistors when the respective control pin is pulled high. The control pin can be driven by micro-controller.

Your best option is Umar's suggestion of 1.5 CD4016 or 4066 quad switch chips. Check the datasheets carefully for the minimum operating voltage. (I haven't done that for you.)

The GPIO pins on the BBB are also 3.3V and current in minimal, so what sort of resistors am I looking at to avoid frying stuff?

Direct drive to the CMOS control inputs is fine.

Transistor
  • 168,990
  • 12
  • 186
  • 385
1

You want a cmos analog transmission gate.

74HC4066 gives you 4 separate "switches"

The separate switches of the 4066 are very easy to understand, and you don't need a correct schematic to make it work.

Using transistors is always theoretically possible, but always seems to have one problem or another. Transmission Gates just work like you would expect.

Henry Crun
  • 5,273
  • 11
  • 12
  • That's two votes for a 4066, and if it's that easy to use - no extra parts needed, it looks exactly like what I need. I ordered 5 for $3, price included shipping :) – Evan Langlois Jul 10 '18 at 10:53