PDA

View Full Version : Will the Teensy 2 drive 40mA directly or do I need a transistor/driver?



ausserirdischegesund
12-26-2012, 01:20 AM
I want to drive a small Omron G6C relay, that lists in technical data 40mA drive current, 125 Ohms coil resistance at 5V. Can I drive it directly from a Teensy 2 digital output or will I need a transistor? I assume if I need a transistor, I can use the USB power from the teensy to drive the transistor?

ematson5897
12-26-2012, 01:41 AM
I want to drive a small Omron G6C relay, that lists in technical data 40mA drive current, 125 Ohms coil resistance at 5V. Can I drive it directly from a Teensy 2 digital output or will I need a transistor? I assume if I need a transistor, I can use the USB power from the teensy to drive the transistor?

I would suggest it just to be safe, remember to include a flyback diode when powering inductive loads

Jp3141
12-26-2012, 03:08 AM
The CPU on the Teensy 2.0 is only spec'ed to run about 10 mA -- it might actually drive the relay, but would not be reliable. You can use the above circuit -- use nearly any NPN transistor (e.g. 2N2222 or 2N3904), and also nearly any diode you can find. You actually don't need the resistor if you ensure that the collector of the transistor is connected to the same supply as the Teensy.

ausserirdischegesund
12-26-2012, 09:44 AM
Thanks! I have built a curcuit like the one above once, but I wondered if shortcuts were possible with that small a relay. Guess I better be safe.

t3andy
12-28-2012, 03:39 AM
If you are willing to wait about 10-15 days try this pre-built off the shelf product ...
It even has a built in LED status indicator for $2.90 USD (don't forget to buy a 4 pin Grove cable and cut it in half)
http://www.seeedstudio.com/depot/grove-relay-p-769.html?cPath=156_160

ausserirdischegesund
12-28-2012, 10:11 AM
On the topic of off the shelf relay products: What I always wondered was: Why does none of the vendors in the Arduino/Teensy/Raspberry Pi-universe (like Adafruit, Sparkfun ..) make a small box that safely encloses all the high voltage mains stuff, and that can be driven from an output directly. Yes, there are these radio controlled sockets, but driving stuff directly from a pin is something different. Of course at least two different versions (EU, US) would be necessary, but nevertheless I think there is a huge market for this (especially for children, schools, etc.). An open relay board really does not cut it in these situations.

Constantin
12-28-2012, 03:03 PM
Solutions exist such as the power switch tail - see https://www.adafruit.com/products/268