Pages: [1]   Go Down
Author Topic: built these optocoupled circuits to drive a 12v light from arduino uno  (Read 1314 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello all! I am relatively new to electronics and not too new to coding - so I would like some feedback on my schematic that I've generated from Fritzing.

In short what I am looking to do is drive a power FET with an Arduino digital signal. I have a basket of 4N35 optocouplers, and IRF540 MOSFET - N channel MOSFETS. I know that N-channel mosfets source current from ground, and that's how they turn on and off by switching off and on the N-channel. I hope my terminology is correct! So I put together - based on other projects and products I've seen - a schematic that I'm trying to turn into a PCB to control 12v lighting. The IRF540 with heatsink can handle some pretty high current loads!!!

So what I have here are two circuits intersecting at the 4N35. This is a 5v Arduino circuit for the digital signals, and a 12v power circuit to drive the load (s). Both go back to their respective battery grounds because of the opto-isolation. That said - anything I could do to prevent say a voltage spike on the 12v side or overcurrent would be helpful. Also if I did anything wrong - or something is represented incorrectly, it would be greatly appreciated if the experts out there could provide some feedback. This is my first shot at a schematic - so bear with me!!!

https://picasaweb.google.com/103274541601732015168/October252012?authuser=0&authkey=Gv1sRgCNrBkfyUsKyzVQ&feat=directlink





* OptoIsoFET_schem.jpg (85.17 KB, 1154x1107 - viewed 123 times.)

* OptoIsoFET_schem.jpg (85.17 KB, 1154x1107 - viewed 59 times.)
« Last Edit: October 26, 2012, 09:19:06 am by moncureww » Logged

Cumming, GA
Offline Offline
Edison Member
*
Karma: 20
Posts: 1657
Ultimate DIY: Arduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

just a quick comment.

Its not the best use of an NPN transistor I've seen.  There is probably a better way.
Logged

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

just a quick comment.

Its not the best use of an NPN transistor I've seen.  There is probably a better way.

There aren't any NPN BJTs in those circuits, moncureww is using a N channel MOSFET.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
to prevent say a voltage spike on the 12v side

A reversely connected e-c junctions of a npn (base remains open) will do. Those devices have about 10 - 15v or breakdown voltage and are ideal for gate protection.

And they are incredibly fast and cheap too.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Wow! I didn't know frtizing made readable schematics - this is the very first clear one I've seen!

I don't see the compelling need here for the isolation.
I think you will have better results if you use the NPN as an open collector device to pull the MOSFET N-channel gate low when you want to turn off the MOSFET off, and use a pullup resistor to +12 to turn it on and connect the light bulb '-' to the  battery -.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Crossroads - sorry to be such a "newbie" but if you could give me a laymans' idea of what you are saying (i.e. standard resistor values, connect x to y, etc.) certainly I'll understand. I'm pretty quick on the uptake and really need to see cookbook/textbook examples once to get the general principle. But as for the isolation - I just want to use a standard configuration across a board that will have multiples of this same circuit for switching, in some cases, devices that could have inductive loads and such. I am just overly cautious!

About the Fritzing schematic creation - let me say one thing.

Three different views in Fritzing - breadboard, schematic, and PCB. Once you breadboard something, on the schematic page (and the PCB page) Fritzing tosses everything into a giant ratsnest of wires / traces and then you gotta go about sorting it all out and making it "pretty."

Like most software it's just a tool and a lot of folks just double-click connections and - wham - you have ground in the upper right corner, an LED array diagonal across the screen, and somewhere half off the screen you have source voltage. It's about laying things out nice!

I don't like to create schematics unless they're clear - and the whole fritzing thing has really enabled me to start thinking in terms of hardware better than I ever have  before. Without having to use my clumbsy fingers I can build, rip out (no static issues!) and rebuild things until I get them right. My idea is to train on fritzing and advance to eagle so to speak.

DHenry - thanks for the advice! Greatly appreciated. I'll keep that in mind. I have so much stuff sitting around here - I bought a monster package of IC's and all sorts of stuff from an online retailer (a rather nice assortment for a good price from a guy working out of Vermont and Asia). I just want to put this veritable potpourri of MOSFETs and IC's to good use while learning what I have!
« Last Edit: October 26, 2012, 01:30:29 pm by moncureww » Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yeah, I'll whip something up when I get home - nothing here to create with except powerpoint, very tedious.
It won't be a big change, just moving the emitter to gnd, the collector to the gate, and a pullup from the gate to +12 in place of the 100 ohm.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Arduino output 0 = output load on, 1 = off


* opto_mosfet.jpg (48.32 KB, 960x720 - viewed 67 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Edison Member
*
Karma: 5
Posts: 1730
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There's mny ways to offer protection other than total isolation, like zeners for example that would probably offer adequeate protection
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2925
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The problem there is it isn't total isolation... the grounds would need to be connected... what he is doing is "Sending a Message" for control thru the opto-isolator, not controlling it directly and having to deal with as he said many different devices including inductive ones and his idea is best as the only connection to the Arduino is to the cathodes and anodes of the Opto's. It isn't necessary to connect to the controlled devices grounds. Better If he will need to control a bunch of devices would be a shift register then you could control 8 per shift register and the shift registers are chainable with 3 wires from the Arduino too.

Bob
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 545
Posts: 27352
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is no ground connection between the teft battery and the right battery edison- nothing between the circuits but light from the LED.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: