Part requirements for a DC solenoid project


  #1  
Old 04-11-19, 07:30 AM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
Part requirements for a DC solenoid project

Good day all,

I'm looking for an expert advice on a solenoid project and the parts required in order to use it safely.

Project description:
2 push-pull solenoids have to be activated instantaneously by a left mouse click. The same left mouse click will also trigger an action in a program on a pc such as a sound and a visual effect. The software part is already built and ready to use.

Parts already owned:
1- 2x 12VDC 2.5amp solenoids
2- 1x 12VDC power supply 450 watts
3- 1x solderless diy breadboard and accessories
4- Mouse with a wire attached to left mouse button for solenoid activation
5- PC

Parts that need to be acquired
1- 2 NPN transistors or relays to close from a mouse the solenoids DC circuit
2- 2 diodes to protect circuitry from solenoids potential emf return

Schematic
See picture attached

What I need to know
Many people recommended the use of NPN transistors such as Darlington TIP120 with an added heatsink since these chips can handle high current, they are fast and reliable. Other recommended relays since they can handle higher current but they are slower and more subject to wear over time. My main requirement is to have an instantaneous reaction from the solenoids when the left mouse button is pressed so they are in perfect sync with the pc program. My main concern is that all the examples I've seen were showing lower-power solenoids with NPN transistors. At 2.5 amp each, the force of my solenoids is quite high and I want to make sure that the transistors can handle that power without frying. An other major concern is that I want to make sure that the 12VDC current from the power supply cannot find a way back to my pc through the 5V USB circuit. Should I place a diode on the USB circuit as well to limit the flow to one direction?

Any recommendation from the community would be appreciated.

Thank you!
 
Attached Images  

Last edited by Justin2430; 04-11-19 at 07:52 AM.
  #2  
Old 04-11-19, 09:47 AM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
I would get larger darlington transistors, because a 5 amp absolute maximum rating is not really enough margin for your application. Also, you need to heat sink the transistors to handle the worst case situation on dissipation.
The TIP 120 datasheet shows a maximum collector-emitter saturation voltage at Ic=3A of 2.0 volts. This would cause 6 watts of dissipation, and 2 watts is the absolute maximum allowable dissipation in a 25 deg C ambient with the package alone (no heatsink).
To alleviate your concerns about damaging the computer USB port, you could put an optoisolator (aka optocoupler) transistor in front of the darlington. Sounds like you can probably pick appropriate values for the optocoupler's base input resistor and collector pull-up resistor for your situation.

This PC817 optoisolator transistor should meet your needs:

https://www.mouser.com/ProductDetail...yO3oyW1w%3D%3D
 

Last edited by engr3000; 04-11-19 at 11:17 AM.
  #3  
Old 04-11-19, 10:42 AM
T
Member
Join Date: Oct 2005
Location: USA
Posts: 1,784
Received 68 Votes on 64 Posts
I hope the 450W is a typo. Also, how does one "get into" a mouse and drive an unrelated circuit from the button? best case, there is a return wire missing.
 
  #4  
Old 04-11-19, 11:03 AM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
Another thing to consider is that solderless breadboard spring terminals are usually rated for 1 amp or even less. It might survive when you're just experimenting, but if it was me I would just go ahead and hard wire the circuits.
 
  #5  
Old 04-11-19, 11:19 AM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
telecom guy: the 450w number is the max power available on the 12vdc psu. The 2 solenoids will not need that much power. But it is always better to have more power available than not enough. As for the mouse extra wiring to the transistor, it is in fact two small wires soldered onto the terminals of the lmb's internal switch that bypasses the switch itself. These small wires are attached to an external switch (not shown in the schematic) and loop onto the breadboard. The external switch will close the 5v circuit and activates the left mouse button function.

engr3000: thanks for your recommendations. Much appreciated. I will look into the parts you suggested, update my schematic and re-upload a new version.

Thanks guys for your quick inputs!
 
  #6  
Old 04-11-19, 11:34 AM
PJmax's Avatar
Group Moderator
Join Date: Oct 2012
Location: Jersey
Posts: 70,108
Received 2,957 Votes on 2,668 Posts
That would effectively be a 12vDC 35A switching power supply. What I'd recommend is connecting the two solenoids together and make sure the power supply will operate the solenoids directly without going into shutdown.

Maybe not necessary as the semiconductor switching will buffer the instantaneous current.
 
  #7  
Old 04-11-19, 11:45 AM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
engr3000: how about using a Mosfet instead of Darlington transistor (model IRL540 Mosfet logic level gate)? Would it be more appropriate?
 
  #8  
Old 04-11-19, 11:56 AM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
I also thought of using a Bluetooth shield onto an Arduino instead of a mouse in order to communicate with a pc and close the 5v loop onto the transistors. This way there's no wired connection between the pc and the external solenoid 12volt pcb. If a surge happens the disaster will be limited to a 20$ arduino stack instead of an expensive mobo. But that will require extra fiddling, hardware and programming. But that would go towards the wireless way, which is an avenue to consider...
 
  #9  
Old 04-11-19, 12:14 PM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
Yes, that FET would be a much better choice. To get low ON resistance you want to drive the gate input up close to 5V. But you also need to guarantee that it never spikes up near 10V or beyond to keep the gate from getting punctured. You should also have at least a small heatsink, although you have a much better chance of getting away without one with the FET because the voltage drop will be significantly less (if you operate it at 5V Vgs and 2.5A Ids).
 
  #10  
Old 04-11-19, 12:44 PM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
engr3000: Thanks for confirming the FET transistor choice. Since the gate is fed with usb's 5v coupled with resistor, I have faith that no spike will ever occur that could ruin that gate. This chip model is not cheap!
 
  #11  
Old 04-11-19, 01:09 PM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
By the way, with the FET you need a pull-down resistor or other way to make sure the FET gate voltage is near 0V when you want it to turn off.

That's not necessary with the darlington in your application because it's a current controlled device, not a voltage controled device like the FET. That is, unless you wanted to switch the darlington as fast as possible (less than 1 usec, definitely not a requirement in your case).
 
  #12  
Old 04-11-19, 02:08 PM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
engr3000: oh, ok. That's an interesting point. Since the switching ON of the solenoids needs to be very fast and instantaneous from the mouse click so they are activated in sync with my computer program I really want to make sure to choose the right switching solution. Are you recommending to stay with the Darlington (more powerful version than the TIP120) or go with the FET coupled with a pull-down resistor? Thanks
 
  #13  
Old 04-11-19, 03:55 PM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
I wouldn't be worried about the speed of the electronics. You would have to intentionally slow it down with added resistor-capacitor time constants to get it close to the slower speed of a solenoid.

For example, assuming the moving mass is 1/3 of the total 336g spec for the entire solenoid, and that the spec'd 87N plunger force is constant during the movement, it would take 16 msec for the plunger to move the specified 10mm. And this doesn't even take into account the inductance of the solenoid, which limits how fast the current can ramp up in the coil and build up the force. 16 milliseconds is a very short time in human terms, but not in most electronics.
The FET with an input pull-down resistor should be fine.
 
  #14  
Old 04-11-19, 04:16 PM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
Thanks a lot engr. Very helpful. I checked on the website of my local electronic shop and they don't seem to have the IRL540 in stock. Would this model be a correct replacement? Do you think that this NTE2985 could be better than the 540? They have it.

Also, should I have two transistors, one for each solenoid? Is one transistor switching both solenoid enough?
 
  #15  
Old 04-11-19, 05:32 PM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
Both FETs would work about the same in your application. I'd recommend one for each solenoid, because using just one could be marginal.
The NTE electronics line is often what you see at Fry's or other retail electronic outlets. I think they're not really a manufacturer but rebrand other manufacturer's parts. Their parts work fine and are convenient to get, but if I needed a lot of parts I'd get them online from Mouser or DigiKey (cheaper and more selection).
 
  #16  
Old 04-11-19, 08:29 PM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
To all: I just updated my wiring diagram based on the community's latest hardware suggestions. Thanks a lot for these. I also modified the USB 5vdc wiring portion to show the external switch that triggers the LMB function and that closes the 5 volt loop.

engr3000: is the optoisolator still required with a Mosfet to avoid current getting back to mobo? I'm also thinking about using a wireless mouse but I'm not sure if the mouse batteries will have enough power to open the transistor's gate. Is a wireless mouse power automatically 5v? I'm not sure.
 
Attached Images  

Last edited by Justin2430; 04-11-19 at 08:46 PM.
  #17  
Old 04-11-19, 10:23 PM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
With FETS a pull-down resistor should go from the gate to ground so the gate is 0 volts when the switch going to 5V is open.
A series current limiting resistor is not needed as in bipolar/darlington transistors, because FETs hava a high input impedance.
That being said, having a 51 ohm resistor in series with the gate (and also close to the gate) is a good practice to reduce the chance of high frequency oscillations (which are more likely with long wires).

A ground return for the connection to the USB powered switch signal is not shown, as was mentioned previously.
Use of a optoisolator is kind of up to you. It's not a bad idea to have one at least when you're developing the system and testing it. You could also get your 5V from some other source than a computer during the development.
By the way, the typical optoisolator is inverting, so the output goes high when the input is low.
 
  #18  
Old 04-15-19, 08:36 AM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
Thanks engr3000 and all for your help and support. I will report back with results and guidelines once the project is finalized since it could be of interest to others.

Best
 
  #19  
Old 04-19-19, 03:10 PM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
engr3000: before I go on with the final assembly I wondered if you could have a last look at my diagram. I updated it following your latest input. I will finally go with the MOSFET iRL540N since its the most recommended for this application. I ordered 10 from Ebay China for under 10 bucks. Much cheaper than buying in Canada! As for the ground, can I wire it to any metal part of a container such as the metal case of the power supply, etc? Please note that the breadboard is instrumental to depict the concept and will not be used for the final assembly. All wires will be soldered and sealed with thermal tubing.

Thanks again for all your precious inputs.
 
Attached Images  
  #20  
Old 08-29-19, 11:54 AM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
Update on the project

My solenoid project is almost completed but I'm struggling with an issue. I hooked up the gate pin of the MOSFET IRL540N to the digital pin 23 of my ESP32 (Wemos D1) but unfortunately the gate is not receiving enough voltage to trigger the circuit. Multimeter shows 2.7 volts on pin 23. IRL540 N-logic MOSFET seems to require at least 3.6 volts. I tested it with 3 AA 1.2 volts batteries and it works. Therefore 1 more volt is required on pin 23 to work. ESP32 is powered by a 5 volt rechargeable battery. The ESP32 mcu requires 2 to 3 volts to operate and send a bluetooth signal to my computer each time I activate a switch on pin 18. That leaves 2 -3 volts for the digital pins. That might be why I can't get the 3.6 volts required on port 23. I think a regular Arduino with no incorporated bluetooth component is able to output 3.6 volt on digi pins but I need bluetooth.

What I tested so far:
- Send the signal of 2 digital pins (23 and 25) at the same time on the gate: not working, still 2.7 volts
- Send PWM signal (100% modulation) from pins 23 and 25 instead of digital signal: not working, still 2.7 volts
- Send voltage to the gate from an external 1.2v battery on top of the signal coming from pin 23: not working

What I didn't test yet:
- Use a pnp transistor on MOSFET gate to get extra voltage: I have one. Need help on how to make it work.
- Use a gate driver on MOSFET gate to trigger the circuit: Don't have one. Need help on how to make it work.
- Use a 1K or 5K pulldown resistor on the gate instead of 10K: I don't think it would make a big difference.

I included a PDF of my latest schematic.

Any advice would be appreciated. Thanks for all your help
 
Attached Images  
Attached Images
File Type: pdf
20190829-BTController.pdf (22.5 KB, 61 views)

Last edited by Justin2430; 08-29-19 at 01:49 PM.
  #21  
Old 08-29-19, 04:46 PM
PJmax's Avatar
Group Moderator
Join Date: Oct 2012
Location: Jersey
Posts: 70,108
Received 2,957 Votes on 2,668 Posts
Use a 1K or 5K pulldown resistor on the gate instead of 10K: I don't think it would make a big difference.
If you feel the 10k pulldown resistor is pulling down too hard...... you'd want to increase it.... not lower it. Try 15k-20k.
 
  #22  
Old 08-29-19, 05:14 PM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
Thanks Pete. Probably dumb question but can I put two 10K resistors in parallel to sum-up 20K between gate and source? I don't have 20K resistors.
 
  #23  
Old 08-29-19, 05:45 PM
PJmax's Avatar
Group Moderator
Join Date: Oct 2012
Location: Jersey
Posts: 70,108
Received 2,957 Votes on 2,668 Posts
Yes..... in series is fine.
 
  #24  
Old 09-05-19, 07:59 AM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
I suggest putting the following buffer IC between the bluetooth device output and the power MOSFET:

https://www.adafruit.com/product/1787

This IC only needs its input signal to be above 2V to be sensed as a "high" logic level. It will increase the drive signal on the FET gate up near 5V (within 0.1V of the 5V supply). This should do a much better job of turning on the the FET. This IC has an active "pull down" to make its output signal go low, so no pull down resistor is needed on the gate terminal of the FET. By the way, your schematic has a 10K resistor on the drain of the FET not the gate. In any case, a resistor is not necessary when using the IC mentioned above.
 
  #25  
Old 09-09-19, 05:38 AM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
Thanks engr3000 for your suggestion. Much appreciated. Early last week I ordered the TC1427 gate driver along with recommended caps. The project now works perfectly. The response time of the solenoid upon pressing Arduino switch is instantaneous. I didn't look at the specs of the 74AHCT125 that you proposed but I guess that they are similar to the 1427. Thanks for pointing out the flaw in the schematic about the 10k. I reworked the schematic which is now incorporating the gate driver and caps. Pls see attached.

Cheers
 
Attached Images  
Attached Images
File Type: pdf
20190902-BTController-V01.pdf (180.7 KB, 66 views)
  #26  
Old 09-16-19, 09:34 AM
E
Member
Join Date: Apr 2019
Location: USA
Posts: 126
Received 17 Votes on 16 Posts
I'm glad to hear that your project is working well now.
Thanks for letting us know how it turned out.
 
  #27  
Old 10-07-19, 10:05 PM
J
Member
Thread Starter
Join Date: Dec 2017
Location: Canada
Posts: 30
Received 0 Votes on 0 Posts
Thanks a lot!

Solenoid project is actually running on a 12V power supply plugged to an ac wall outlet. The next and final step is to provide the whole gig with battery power to render it entirely self-sustained and portable. After many researches and comparisons I decided to take the route of Li-Ion cells since once combined they will provide just the right amount of current and voltage (6A and 12V). I found a Canadian provider of "genuine"--so it is said on their website--18650 3.7V 3A Panasonic cells. But how could we be sure. The battery format would be perfect but with all 18650 fakes circulating on the market nowadays I tend to be prudent. An other solution would be to buy a genuine powerdrill battery pack of 20V 6A like Dewalt and I'll be 99.9% certain that enclosed batteries will be original Panasonic batteries, like the one mentioned in this thread. And I get more of the same exact battery model for the equivalent price of buying them separately. The problem with this new upgraded pack from Dewalt is that it is now equipped with 20700 battery format which is slightly more powerful than 18650 but I can't find any BMS protection PCB for the 20700 on the net. Does anyone on the forum have experience with Li-Ion BMS protection boards and do you think that 18650 BMS boards could comply with 20700 Li-Ion battery format?

Please see the latest schematic of the project now including 2 solenoids and autonomous power source. Thanks!
 
Attached Images  
 

Thread Tools
Search this Thread
 
Ask a Question
Question Title:
Description:
Your question will be posted in: