I'm trying to use an arduino UNO to activate a "switch enabled device" for my son with special needs. Basically, how these typically work is you plug an audio (3.5mm) connector into the device, and on the other end of the audio cable is a normally open switch. You close the switch, it makes the device (or toy) turn on. Deactivate the switch, device turns off. Simple enough. . .
I want to replicate this switch action with the Arduino. My initial though was to use a standard relay board, but then I though maybe solid state relay board, and then I read a bunch of stuff about using a transistor as a switch ?? The device is low voltage (5VDC) and low current, just looking to close the circuit.
Should I just stick with a relay board (solid state??) or can I use a transistor to close this circuit? If so, what kind of transistor would everyone recommend? I'm trying to make this as power efficient and as small as possible (within reason).
As for why I'm doing this: Basically, my disabled son uses a switch at his knee to access the world. It connects to an augmentative communication device (ACD), which is switch activated. However, there are other things he wants to control with the switch (power wheelchair, switch control for iPad, etc.). Right now, someone has to PHYSICALLY unplug the switch from his ACD and plug it into something else - he can't do that by himself.
I want to make a small "BOX" that will take the single switch input (SW1), and recreate the switch closure to 3 different outputs. I will be adding a second switch input (SW2) that he has control over to allow him to switch output to the 3 different devices connected (Only 1 output at a time). So, default is SW1 closes, output 1 closes. SW1 opens - Output 1 opens. When SW2 is closed/opened, output goes to Output 2. SW2 is closed/opened again, output goes to Output 3. SW2 close/open: Output 1 active again. etc.
Sorry if I've gone on too long - just looking for help in making this happen.
Solid State Relays are for switching heavy loads - such as mains appliances or even lamps. They are not relevant to your project.
A relay will work, but is generally overkill. A reed relay - a very lightweight one - would be quite suitable as it may be able to be directly driven by an Arduino output. (You use a Nano or Pro Mini for a "real world" application, not a UNO! )
If you knew how to characterise the input circuitry of the ACD, an opto-coupler might serve just as well. If all these control inputs switch to ground and have a common ground, then you could simply use FETs as switches, but you would have to have the information from the maker of each device.
dsbeck:
Thanks! - Did some quick research, and looks like what I'm looking for.
Should I get one with the "Snubber Diode" as well?
Also, good to know on what board to use. Again, I'm just starting out on this.
Well, the snubber is just a 1N4004 connected across the coil so that it does not conduct when the coil is powered normally, you can provide that; it does not need to be incorporated into the relay itself.
A Nano or Pro Mini is easier to either plug into a breadboard or solder to "protoboard" or stripboard or if the pins have not been fitted already, solder directly to the board pads. A 5 V USB-type "phone charger" is a practical power source (do not power by "Vin").
I linked to an eBay listing of the suitable relay - unfortunately stuff from China takes three weeks and you don't get the full information - such as in this case, which pin is which! Easily figured with a multimeter and for a reed relay, the end pins would generally be the reed.
Any 1N400x is overkill, a 1N4148 is more than enough for a reed relay coil flyback diode. Calling it a snubber implies you’re putting it across the contacts to lessen arcing but that’s not what you need. In this case, you need a diode across the relay coil to absorb the inductive energy released from the coil when the voltage is removed. Without it, the driver transistor can be damaged due to over voltage.
Unless your you’re accomplished with perfboard style construction and like to build electronics from scratch, don’t go the Nano or Pro Mini route, it is asking a lot of someone that isn’t familar with the techniques. The Pro Mini, while physically the smallest board, is the most difficult to get started with as it requires a second board to program it. A lot of (unnecessary) learning curve there for a starter project.
An Uno stacked with a 4 relay shield and a protoboard shield for a terminal block to connect the switches and you’re on your way. Minimal hand wiring/construction using the shields method. While they are physically larger, they do eliminate much of the soldering and other tasks that can be problematic for those just starting out in the hobby.
Another question: How do you put this all in an enclosure? I can't seem to find any good source of enclosures that will hold a stack of Uno and shields, that have openings for power, etc. Maybe I'm not looking in the right place, but I don't want to have to make my own enclosure as well as all the electronics if I can help it.
On the enclosure, Unless someone has a better idea, it looks like I'm going to learn AutoCAD Fusion 360 and design/print my own enclosure. I can't find anything online for what I'm looking for . . .
Is states: "Because the input is solid state there is no need for snubbers or catch diodes to suppress the inductive fly-back transient voltage normally associated with EMR coils."
They are $2.23 a piece, well within my price range
I'm planning on using the AdaFruit version of the UNO (METRO 328), adding a Proto Shield for the relays, and a PowerBoost rechargeable shield to power the whole thing for this project.
dsbeck:
On the reed relay: I found this on Digi-Key https://www.digikey.com/product-detail/en/CPC1218Y/CLA274-ND/1277129/
It states: "Because the input is solid state there is no need for snubbers or catch diodes to suppress the inductive fly-back transient voltage normally associated with EMR coils."
Yes, that is correct and it appears that device would work just fine for you.
Note that it requires at least 4 V to switch, so it would not be guaranteed to work on 3.3 V.
You connect your Arduino output to pin 2 (no additional resistor) and pin 3 to ground. You do not need to connect either output terminal to the Arduino ground, only to the ground of the device you are switching (or in fact just connect pins 1 and 4 to the device you are switching and nothing else).
WattsThat:
Any 1N400x is overkill, a 1N4148 is more than enough for a reed relay coil flyback diode. Calling it a snubber implies you’re putting it across the contacts to lessen arcing but that’s not what you need.
Its definitely snubbing, the point of snubbing is to snub (shorten/reduce) the the high voltage pulse. For
DC the diode is often called a free-wheel or fly-back diode (its not a fly-back diode in fact), but this is just
a particular case of snubbing if you think about it. In ac circuits snubbing reduces contact arcing and
reduces high voltage spikes, both are important.
In this case, you need a diode across the relay coil to absorb the inductive energy released from the coil when the voltage is removed. Without it, the driver transistor can be damaged due to over voltage.
Strictly absorb the inductive energy when the current is removed. Inductive energy is related to the
square of the current.