USB/Optocoupler controlling a solenoid

Thread Starter

rafaelluizmesquita

Joined Aug 8, 2013
38
Hey guys,

I am a physicist, not micro electronics experience whatsoever, and my adviser said that I should put together a circuit that could make a solenoid (24V) open with a USB 5V signal. This solenoid will serve as a shutter for a laser we are using to calibrate an instrument we have.

After a few hours on the computer I found that the Optocoupler 4N25 would be the way to go. Actually I thought it would be straight forward, and went ahead and bought the thing.

I got it three days ago, and after almost 24 hours of restless work, I still haven't make the circuit to work.

I have a breadboard, a couple of multimeters, a computer and a dc regulated power supply. It would be no problem at all for me to shut down a USB port and turn it on again to send the signal.

here is the datasheet: http://www.vishay.com/docs/83725/4n25.pdf

What should I do? I am trying to organize like this image attached... Am I doing something wrong?

Can someone show me how to do it... I am really desperate!...
 

MaxHeadRoom

Joined Jul 18, 2013
28,684
Last edited:

wayneh

Joined Sep 9, 2010
17,498
I am trying to organize like this image attached... Am I doing something wrong?
I don't see an image. I think your approach should work fine but it's hard to tell what went wrong without a diagram or photo. Note Max's question about the solenoid 24V supply. You said you have a DC power supply. Can we assume that the solenoid functions with 24VDC?
 

MaxHeadRoom

Joined Jul 18, 2013
28,684
The image I see is of a 4n25 opto, extra components would include a resistor for the emitter calculated at 10ma 5v =500ohm. and an output load resistor and either power fet or bi-polar transistor drive for the solenoid if DC, dependent on the solenoid current.
Max.
 

Thread Starter

rafaelluizmesquita

Joined Aug 8, 2013
38
Actually you can get these complete components off the shelf, look for SSR (Solid State Relay) many made by the likes of Opto22.
You would need the 5v input to 60vdc output type.
http://www.opto22.com/site/pr_details.aspx?cid=3&item=DC60S3
http://www.opto22.com/lp/ssr.aspx?c...d=guaranteed&gclid=CPWaj9em7rgCFSVgMgodRkcAKA
Is it DC or AC solenoid?
Also wise to place a R/C snubber (AC) or a diode (DC) across the coil for suppression.
Max.
The thing is that I am trying to make as cheep as I can MaxHeadRoom... He said that the whole thing could not exceed 10 $. Since we are making a whole bunch of those.

I thought in use some relays but they can be expensive compared with the optocoupler that is .3$...
 

Thread Starter

rafaelluizmesquita

Joined Aug 8, 2013
38
I don't see an image. I think your approach should work fine but it's hard to tell what went wrong without a diagram or photo. Note Max's question about the solenoid 24V supply. You said you have a DC power supply. Can we assume that the solenoid functions with 24VDC?
I am so sorry wayneh... I forgot to attach the image... here we go...
 

Attachments

MaxHeadRoom

Joined Jul 18, 2013
28,684
You can base it on the suggested schematic on the App sheet, just that the output will be at 24vdc.
24vdc solenoids can usually run up to around 2amps, so you really need to zero in on the solenoid you need for the application, even if you don't have it in hand, at least you will know the load current to aim for and even simulate it with the testing.
What are the problems you are facing getting it to work so far?
Sounds like a high end project with a budget of $10.00 ;)
Max.
 

Thread Starter

rafaelluizmesquita

Joined Aug 8, 2013
38
What are the problems you are facing getting it to work so far?
Sounds like a high end project with a budget of $10.00 ;)
Max.
My problem... well... I have two problems... the first and biggest is that, besides my love for electronics, I am stupid as a peace of wood when the topic is electronics...

the second problem is this 10$ budget... There's some products out there that can do the whole thing with 200$... I would prefer to just buy the 200$ motor controlled with a USB port. But 200$ is a lot when you multiply that x10.

And I guess my professor wants me to learn how to do it... So he challenged me. The thing is that he does not know how to do it too... I would love to see or talk to someone that already resolved that...
 

MaxHeadRoom

Joined Jul 18, 2013
28,684
Did you reproduce the sample circuit? if so you will need a extra drive transistor, I can post the whole thing if you want?
But as I say, some depends on what the current of your solenoid is going to be?
Max.
 

Thread Starter

rafaelluizmesquita

Joined Aug 8, 2013
38
Did you reproduce the sample circuit? if so you will need a extra drive transistor, I can post the whole thing if you want?
But as I say, some depends on what the current of your solenoid is going to be?
Max.
- Did you reproduce the sample circuit?

No I don't think so...

- if so you will need a extra drive transistor, I can post the whole thing if you want?

That would be great Max!

I'll email the guy will purchase the solenoid and see what he says.

Thank you Max
 

MaxHeadRoom

Joined Jul 18, 2013
28,684
I could just label them if that would help?
The 4n25 OPTO recieves the signal and isolates it from the 24v device, a darlington transistor which then turns on and energizes the solenoid coil.
The 1n4007 is a rectifier to suppress any back EMF at turn off of the solenoid.
Max.
 

Attachments

Last edited:

Thread Starter

rafaelluizmesquita

Joined Aug 8, 2013
38
Looks like I am gonna have to buy some more components, which is gonna take a couple of days!... Well... I will try to put everything together and will come back with some feedback in a few days... Thanks again for your help!
 

Thread Starter

rafaelluizmesquita

Joined Aug 8, 2013
38
I could just label them if that would help?
The 4n25 OPTO recieves the signal and isolates it from the 24v device, a darlington transistor which then turns on and energizes the solenoid coil.
The 1n4007 is a rectifier to suppress any back EMF at turn off of the solenoid.
Max.
By the way.... is there anything in special that I should worry when I purchase those items?
 
Top