Teensy LC with relay board

Status
Not open for further replies.
Is there a schematic or tech info on this relay board?

From the photos, it looks like it's designed to just have 16 ordinary digital I/O pins connected to control the 16 relays. But that's a bit of guesswork from the low-res photos of the parts I can see on the boards. The Amazon page doesn't seem to have a schematic or other reliable technical specs.
 
I can't find one anywhere, I tried finding over the internet but no luck with a schematic. I was thinking because it has the 2803's that the 3.3v output pins from the LC would be sufficient. I just don't know if I should also put an external 5v to the LC along with the usb.I know I would have to cut the v pads apart.
 
My best guess from the photos is you'd give the relay board a separate 12V power supply on it's 2 pin terminal block.

If you get one of these, the very first thing I'd suggest doing is testing with an ohm meter between the GND pin on the 12V power input and the 2 GND pins on the control input. If there's no conduction (max resistance), that's a good sign the 16 inputs really are fully optically isolated from the 12V power. In that case, you could power the Teensy pretty much any way you like, since it's isolated from the rest.

If those GND pins are connected, probably not a big problem. You'll just need to use a 12V power supply that can have its GND connected to Teensy's GND.
 
SainSmart's website also has a file that looks like the PCB layout.

Here's an image of the control electronics part.

pcb.jpg

Based on this info, I would *NOT* recommend use with Teensy LC. The board has a 5V power supply and the inputs go to the optocoupler diodes and then resistor right to the 5V power.

Teensy LC is not 5V tolerant. Using it with this board will risk damage to the hardware!


Also, this relay board optocoupler section seems to be a rather stupid design. I can't imagine what Sainsmart's engineers were thinking. Well, actually I can imagine... very likely an arbitrary requirement to have optocouplers (probably copying the specs of some well designed relay product) and their engineers were either lazy, incompetent, or just didn't care.

The way they designed this board, the optocouplers don't actually isolate you from anything, other than isolation already provided by the relays. The optocouplers are truly redundant, serving no useful purpose. Well, no purpose other than to sell the board to people who can't tell the difference and believe the optocouplers must be adding some value. They aren't. The optocoupler inputs are all connected by resistors to the 5V, which shares GND with the 12V power - so you are indeed galvanicly coupled to the 12V power supply despite the fact this board has 16 (useless) optocouplers!

I would not recommend buying this Smartsain product. Its design is just terrible.

If you do get it, use Teensy 3.2 or 3.5 (which are 5V tolerant), or Teensy 2.0 (which runs on 5V). For use with Teensy 3.2 or 3.5, to control these relays you would connect GND from the relay board to Teensy's GND, and connect digital pins to the inputs. To control the relay, you would do something that may seem strange. To turn the relay on, you'd use pinMode(pin, OUTPUT) and digitalWrite(pin, LOW). To turn the relay off, you would use pinMode(pin, INPUT). Changing to input mode is needed, because Teensy 3.2 & 3.5 have 3.3V outputs. You can't drive the pin to 5V. But if you just put the pin into INPUT mode, it will stop driving the optocoupler and the relay will turn off.

I'm pretty sure that will make this relay board work. But only try that on Teensy 3.2 or 3.5. Do not use Teensy LC or Teensy 3.6, because they are not 5V tolerant.

If you haven't purchased this relay board yet, I would advise against wasting your money. Get a better one. If it has optocouplers, get one where the engineers who designed the board were smart enough (or copied a design from a competent engineer) where the optocouplers really do give you a second layer of protection. This Smartsain 16-Channel 12V Relay Module is at best a shoddy product designed by people who either didn't understand optocouplers or just didn't care.
 
Thanks Paul for the wealth of info here. Very valuable. Unfortunately it should be here tomorrow. I have a few 3.2's so will give those a go. I can use a 5v external power as well as the usb for the 3.2 yes? I am controlling real hardware via Xplane 11, which is why I need the usb.
 
The most important thing will be connecting GND on Teensy to GND on that relay board.

If Teensy gets external 5V power, usually you would cut the VIN-VUSB pads apart, so the external 5V power can't try to flow back into your computer.
 
Hello, so for anybody that happened to follow this thread, I was successful in what I wanted to do using a 16 channel relay board from Numato. Also using a Teensy 2.0++ connected to X Plane 11.26. Works like a charm. I did not use the relay board from the beginning of this thread. The Numato board looked clearly more professional. Thanks again Paul.
 
Hi. I am also trying to run a whole bunch of relays from a teensy 3.2. Which relay board from Numato did you use? And how did your circuit end up looking like. Would be very grateful for your help!
 
I ended up getting a 16 channel relay board. I don't remember the model number but you can control it with any arduino micro controller. It was very
easy. My circuit was easy, from the power supply the positve goes to the Common on relay, NO goes to the positive of the lightbulb, and the neg from power
supply goes to the negative of the light bulb. Its easy
 
Status
Not open for further replies.
Back
Top