James_s
I’m not really sure how to read the data sheet re:saturation current or much else really. That's the reason for the post. I thought I had it with the plan above. But, I wanted to run it by others before I burned up a $35 micro-controller.
Cliff,
I think you’re understanding me incorrectly. The SainSmart module is driving the opto couplers. The Arduino just need to bring it to GND to switch it on. The problem is the 3.3 v GPIO of the Arduino 101 won’t keep the pin high enough to turn the relay off.
Ian.M
First, HAHA, I’m a Newb when it comes to this stuff and I realized the “isolation” is pointless if they are being fed off the same supply. But , the plan is to control 12vdc motors in a kids ride-on electric car. I measured the pull down current at 3.85mA. And the voltage on the ULN2803A input with the opto grounded is 4.8v. I’m guessing the 15-20 mA drive current listed on Amazon is the actual relay drive current?
David
Thank you for using the abbreviations (Hfe and Vbe) from the data sheet in the calculations. That helps me know where to get the numbers. That's why I’m here, to learn. I think I will try a higher resistor value. I try to conserve power where I can.
Yea, I read there were other transistors that were more common now. Maybe I could have even used MOSFETs to directly drive the 12vdc motors I'm drying to drive. But, 2n2222s seemed very common, I found them cheap, the project is a kids electric ride on vehicle(not real important) and I know relays.
Dana
1)I think I will keep R2. I’m using one of the relays to turn a pair of motors on but I’m using the others to reverse direction and others to change the speed. So, I want to avoid any chance of the relays accidentally turning on. That would cause a dead short, Bad!
2)That’s how I calculated my original design, but I didn’t take Vbe into consideration(didn’t know how to). I Think I’ll try a couple different R1 values because I want full saturation but to conserve power since it will be running off of batteries.
3)The SainSmart module has the diodes built in.
LukeW
I’ll be running the whole setup off of a 12v battery.
The SainSmart module does have a 5v regulator on board. It’s what drives the opto couplers.
Yea, I realized the “isolation” is crap but the project is to run a kids ride-on vehicle. So, nothing here is vital, I’m using it more as a learning experience. Just don’t want to burn up the arduino.
I’ve tried jumping Inputs to GND and it does turn on the Relays. I will be using a common ground among everything.
Yess! Testing the circuit with a 3.3 volt source instead of the actual MC is a great idea. I will definitely be doing that. Thanks for the idea.
Ian.M -again
I didn't really trust it to drive much more than 24 volts. The plan for this project is to drive the two 12vdc motors on a kid’s Peg Perego electric vehicle. If the Fly-Back voltage is going to be an issue I can put a diode across the one relay that's going to be the power switch or “throttle”. One is the “throttle” others are to reverse direction and others are to change the speed.
That would be awesome if the Optos could actually be isolated and driven by only the Micro-controller. Especially since this project is only a temporary install. I could then use the relay module with any other micro-controller and just change the resistors and not worry about a bunch of extra circuitry. Looks like it's just a matter of removing PR1, PR2, PR4, and PR7, then connecting to the Optos through appropriate resistors
Thanks everyone!! I may not be completely coherent in my replies. Please bear with me, it’s late and I have two small children. I’ll check back Sunday....