Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Solenoid Driver

Status
Not open for further replies.

Dakta

New Member
Hi there,

Looking for a bit of assistance with error checking a circuit before I attempt build, if anyone can give it a once over to spot any obvious 'mistakes'? I think there will be some, especially regarding component values, but if anyone knows better feel free to let me know.

----

The project is this - to create a simple yet powerful solenoid driver. The solenoid isn't particularly 'hardcore', only draws a few hundred milliamp at 12v, and runs at a low frequency which is very flexible (anything between 100-300hz is good enough).

The control will be all software based, there is no need for inputs as such except for a single adc connected to a seperate external sensor which allows the pic to sense the effect driving the solenoid is having (in this case an external 0-4.6v air pressure sensor).

The unit will have a HD44780 LCD - this is not really for user interface's sake, nor for functionality, I just want to be able to view feedback for when it comes to debugging the firmware as the control routines are going to be tricky and it'd be nice to have some realtime data to work with.

Anyway, I'm not so fussed about the firmware right now, I just want to make sure my circuit is going in the right direction, in particular the N-channel mosfet as this is the bit I found most confusing, and I was never able to simulate it in proteus (could switch a logic mosfet with a 5v battery connected to the gate, but when i replaced it with a pic pin I always got errors regarding timescale too small).

Anyway, this is a fairly complicated circuit for me, anyone fancy a gander?

Finally, I've given values for almost every component. One in particular i'm not sure about is the protection diode across the solenoid. Anyone any idea of what I should look for?

with much appreciation
Dak
 

Attachments

  • design.png
    design.png
    19.5 KB · Views: 707
What is the purpose for R3? Since the PIC output drives the signal both high and low I see no reason for it.

The protection diode can be just about any diode that has at least a 20V rating and can carry a current equal to the solenoid current.

But using that diode across the solenoid will significantly slow down its release. To improve the speed, connect a 50V or so zener diode in series with D1 connected in inverse direction (anode to anode). That will greatly increase the speed of the magnetic collapse when you turn the solenoid off.

But 100-300Hz is not low frequency for a solenoid, it's high frequency. Typically they require several tens of milliseconds to operate. Is your solenoid really that fast?
 
Thanks for your input, nothing drastically wrong then? I was expecting more critisism to be honest, for example, when looking for references for wiring up the lcd display (I like to learn through example) I noticed some people used resistors between the pic and lcd on the data lines, but some don't bother - I assume it's an 'opinion' matter and down to your style.

I am relatively new to the hardware side, though I have a very good development board with led's, lcd etc so developing the software isn't so bad.

I am mistaken with the solenoid - I was thinking from a pwm perspective as most people use them to drive motors at very high frequencies, 300hz is fast for a solenoid, however I had the solenoid tested in it's natural state (vacuum solenoid) with a scope and it's frequency was approx 250.

I've succesfully operated it, moving a linear piston actuator through vacuum at 350hz and below, personally I'd settle for 50 or above to be honest, I think even that's sufficient for my needs, so frequency i'm not too bothered about, though i can confirm the solenoid itself is good at those high frequencies. I myself was expecting it to be about 8hz but no, it's a lot faster. That said the item it controls is very precise and needs fast response, maybe that is why.

The purpose of R3 - this was placed as a result of trying to get the circuit simulation working with proteus, without the resistor trying to tie the line to the mosfet down, I found that the solenoid was 'always on' regardless of the voltage to the gate, tying it down seemed to work, if a 5v battery was applied to the mosfet gate, it would behave as it should, and a lot of information and circuit diagrams I trawled through had this resistor, so i assumed a tie-down was going to be necessary. :eek:
 
Right, a bit of progress - I've finally managed to get proteus to run the simulation with the mosfet properly, turns out I had made a bit of a fundamental error with the earthing, an issue I was confused with as the pic models do not accept power inputs, so despite the pic code running, the pic 'pins' did not share a common ground with the rest of the circuit.

Fairly fundamental error on my part, but if they just had power pins I could have avoided the confusion by erm, plugging it in!

I can now get rid of the pesky resistor ;)
 
Bit of a thread revival I know but just in case anyone reads this for their own mosfet wiring advice - R3 was neccesary in the end. With the pic output floating (port C remember) the mosfet is permanently on unless you have that resistor.

Unfortunately I found out the hard way, so don't overlook it ;)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top