mgardestad
Posts: 6
Joined: Sat Apr 29, 2017 5:39 am

Controlling two 12 v cabinet locks

Thu May 04, 2017 7:36 pm

Hi!

I am trying to get a personal project working where I want to independently control two 12 V solenoid cabinet locks with a Raspberry Pi Zero W. I have managed to set up the software to control two light emitting diods so the output is working and now I need to connect the cabinet locks.

I have 2 of these locks:
https://www.adafruit.com/product/1512
and used the circuit design attached (also available here https://www.dropbox.com/s/cc9jp14svsmlk ... n.png?dl=0). When I connected it all up the IRFP3206 became very hot. Clearly I must me doing something wrong.

Do the circuit design look correct?
What could be causing the IRFP3206 to become so hot?

Thanks
Skärmavbild 2017-05-04 kl. 21.29.03 kopia.jpg
circuit design
Skärmavbild 2017-05-04 kl. 21.29.03 kopia.jpg (62.41 KiB) Viewed 2271 times

btidey
Posts: 1637
Joined: Sun Feb 17, 2013 6:51 pm

Re: Controlling two 12 v cabinet locks

Fri May 05, 2017 8:38 am

It could be the IRFP3206 is not fully turning on with the 3.3V GPIO output. If this is the case then the device will have an intermediate resistance rather than a very low one. This would then cause it to dissipate significant power and the solenoid not to operate. The spec says it has a turn on of between 2 and 4V so this could well be the case.

You can prove this by removing the 1K drive from the GPIO pin and touching it to the 12V line instead (make sure it is removed from GPIO). This will definitely turn it on. THe solenoid should operate and the device stay cool.

If this is the case then you have 2 choices. Either replace the IRFP3206 with ones with a lower threshold voltage (like IRLZ44N) or put a bipolar transistor driver in front to convert the GPIO swing to 0 - 12V to drive the IRFP3206. This would invert the sense of the logic. E.g. GPIO low means solenoid on.

pcmanbob
Posts: 9885
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Controlling two 12 v cabinet locks

Fri May 05, 2017 8:51 am

Don't know if its just a mistake on your diagram but the second lock does not seem to have a return path for the 12v feeding the lock other than via the Pi Ground.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

btidey
Posts: 1637
Joined: Sun Feb 17, 2013 6:51 pm

Re: Controlling two 12 v cabinet locks

Fri May 05, 2017 9:13 am

pcmanbob wrote:Don't know if its just a mistake on your diagram but the second lock does not seem to have a return path for the 12v feeding the lock other than via the Pi Ground.
It would be better to keep it down to one 0V connnection to the Pi, but the solenoids are only 0.5A so shouldn't be a problem.

As they are fairly low current one could also choose a significantly lower power switch device. I use AO3400 quite a bit for switching loads up to about 2A. They have a low threshold (fine for 3.3V), a fairly low on resistance 55mOhm, and very cheap. They are SMD SOT-23 so you have to be comfortable with soldering small devices.

mgardestad
Posts: 6
Joined: Sat Apr 29, 2017 5:39 am

Re: Controlling two 12 v cabinet locks

Fri May 05, 2017 3:11 pm

btidey wrote:
pcmanbob wrote:Don't know if its just a mistake on your diagram but the second lock does not seem to have a return path for the 12v feeding the lock other than via the Pi Ground.
It would be better to keep it down to one 0V connnection to the Pi, but the solenoids are only 0.5A so shouldn't be a problem.

As they are fairly low current one could also choose a significantly lower power switch device. I use AO3400 quite a bit for switching loads up to about 2A. They have a low threshold (fine for 3.3V), a fairly low on resistance 55mOhm, and very cheap. They are SMD SOT-23 so you have to be comfortable with soldering small devices.
Can't the U2 solenoid use the same return path for the 12v as the U1?
For sure the Q1 and Q2 will use the same GND on the Pi, I was not able to make a wire that crossed another wire but not connect with it...

mgardestad
Posts: 6
Joined: Sat Apr 29, 2017 5:39 am

Re: Controlling two 12 v cabinet locks

Fri May 05, 2017 3:16 pm

btidey wrote:It could be the IRFP3206 is not fully turning on with the 3.3V GPIO output. If this is the case then the device will have an intermediate resistance rather than a very low one. This would then cause it to dissipate significant power and the solenoid not to operate. The spec says it has a turn on of between 2 and 4V so this could well be the case.

You can prove this by removing the 1K drive from the GPIO pin and touching it to the 12V line instead (make sure it is removed from GPIO). This will definitely turn it on. THe solenoid should operate and the device stay cool.

If this is the case then you have 2 choices. Either replace the IRFP3206 with ones with a lower threshold voltage (like IRLZ44N) or put a bipolar transistor driver in front to convert the GPIO swing to 0 - 12V to drive the IRFP3206. This would invert the sense of the logic. E.g. GPIO low means solenoid on.
Ok, the thing is that the IRFP3206 is becoming really hot even when not trying to activate with the GPIO but only having the power plugged in.
I will try to debug a bit more and see if I find anything more tangible.

pcmanbob
Posts: 9885
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Controlling two 12 v cabinet locks

Sat May 06, 2017 7:29 am

If your mosfet is getting hot even when not switched on then you might have it connected wrong. (drain source reversed may be)
I would disconnect it from the pi and investigate further before connecting to pi if possible test you circuit works with an external power source before re-connecting to pi.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

grahamed
Posts: 277
Joined: Mon Jan 30, 2012 7:01 pm

Re: Controlling two 12 v cabinet locks

Sat May 06, 2017 3:28 pm

Hi

Obviously it should not get hot when turned off, but I don't think this is the best device to connect to a 3V3 sysem.
i_o characteristics.jpg
i_o characteristics.jpg (10.94 KiB) Viewed 2135 times
(http://www.infineon.com/dgdl/irfp3206pb ... 28d64a1ff0)

Unless used in a very hot place the line does not go much below 4V. This is a typical device, some will be better, some worse in this respect.

mgardestad
Posts: 6
Joined: Sat Apr 29, 2017 5:39 am

Re: Controlling two 12 v cabinet locks

Wed May 10, 2017 7:38 am

Hi,
I followed the instructions in this post http://www.instructables.com/id/Control ... h-arduino/ and switched to the TIP120 transistor. Now it works perfectly. Thanks for your help.

btidey
Posts: 1637
Joined: Sun Feb 17, 2013 6:51 pm

Re: Controlling two 12 v cabinet locks

Thu May 11, 2017 10:30 am

Good to hear you got it working with the TIP120 darlington transistors.

I would comment, however, that I think the use of darlington bipolar transistors is less than ideal for this type of switching application.

Mosfets, in general, make much better switches, but you do have to be a little more careful with device type selection particularly when interfacing with low (3.3V) logic circuits.

For this particular application it is switching 12V 0.5A loads

TIP120 will have a Vce saturation voltage when turned on of about 0.75V and a power dissipation of 0.375W. Obviously well within its capabilities but limiting the use of smaller package sizes. It needs a base drive current of about 2mA to keep it hard into saturation. As the Vbe is about 1.4V it does require the 1K base resistor as shown.

A Mosfet switch with say a 50mOhm source drain on resistance will drop 0.025V and a power dissipation of 0.0125W. The gate current is negligible and no resistor is required although one can include one if one wants to be super cautious.

These advantages become greater when handling higher load currents.

The use of Mosfets, however, does come with a need to consider their characteristics carefully. In particular, the gate threshold voltage which determines when the device starts to turn on. Early Mosfets needed fairly high thresholds (5-10V) meaning that they could not be driven directly from low voltage logic. There is now a better choice and many Mosfets with low gate voltages to turn fully on which can be driven directly from 3.3V logic. Note that the gate threshold parameter is when it starts to turn on. One needs to look for a low gate voltage when it is hard on.

I guess the other consideration is package choice. The range of Mosfet switches in intermediate package sizes like TO92 seems more limited. They tend to come in TO220 which can handle high currents or smd (SOT23) which can still handle several amps. For hobby use some are put off smd, but actually SOT23 is fairly easy to handle with a steady hand and a fine point soldering iron. One can even get little SOT23 to DIP adapters if required.

Return to “Automation, sensing and robotics”