EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: marcusbarnet on November 18, 2016, 10:23:18 am

Title: Suggestions on my schematics for solenoid control
Post by: marcusbarnet on November 18, 2016, 10:23:18 am
Hi to all, this is my first topic in this forum!  :)

Can you give me suggestions on my schematics (http://www.skeetty.com/schematics-servo.png), please?
For example, if there are errors or mistakes..?

(http://www.skeetty.com/schematics-servo.png)

I'm designing a board based on atmega328p in order to control multiple solenoid valves.
In particular, this circuit should control 2 proportional solenoids and 7 ON/OFF solenoids.
The solenoids parameters are: V = 12Vcc, R = 3.7 Ohm, I = 1.80A
This is the datasheet for the solenoids (http://www.skeetty.com/valve-proportional.jpg).

In order to prevent an atmega328p reset due to noise (like it happened in the first version of my board), I added:
   
As suggested in the application note (http://www.tracopower.com/products/thl25-application.pdf) of THL-25 datasheet, I used an inductor L1-1UH with a capacitor for the THL-25 input. Is it OK?
In this way, I have two different grounds, GND5 is the gnd for 12V, while GND is the ground for 5V . I also added a big 2200uF capacitor between +12V and GND5 in order to avoid noise. The capacitor C5 100nF is OK for the atmega328p? I will place it very close to the atmega pins.

As I've read in the AVR042 (http://www.atmel.com/images/atmel-2521-avr-hardware-design-considerations_applicationnote_avr042.pdf), I was thinking to add a ferrite bead before the first C3 capacitor. Should it be a good idea?
Should I place a 100nF capacitor between GND and the RESET pin on the atmega328p or it is not useful in my case?
Is there any error in my schematics?

I hope you can help me! :)
Thank you a lot!
Title: Re: Suggestions on my schematics for solenoid control
Post by: retrolefty on November 18, 2016, 02:26:16 pm
Quote
Should I place a 100nF capacitor between GND and the RESET pin on the atmega328p or it is not useful in my case?

 Should not be useful as it's just a pull-up to your Vcc. Do proper Vcc filtering for the whole board and reset should not be an issue.

Title: Re: Suggestions on my schematics for solenoid control
Post by: marcusbarnet on November 18, 2016, 03:07:38 pm
Thank you for your help!  :)

The current Vcc filtering is not enough?

(https://www.eevblog.com/forum/projects/suggestions-on-my-schematics-for-solenoid-control/?action=dlattach;attach=271300)

Title: Re: Suggestions on my schematics for solenoid control
Post by: retrolefty on November 18, 2016, 06:01:41 pm
The only suggestion I have on your Vcc bypassing is on the 328P micro. You have one .1 cap bypassing Vcc, AVcc, and Aref pins. I would go with three caps. Check the 328P datasheet for recommendation or examples if you wish. Your reset pin circuitry is fine.

Title: Re: Suggestions on my schematics for solenoid control
Post by: marcusbarnet on November 18, 2016, 06:04:45 pm
Thank you a lot, again!
I will check the datasheet and I'll add proper capacitors on each pin couple.

Just the final question: do you think the SERVO circuit is OK?
Usually, RC servos are controlled with active-HIGH signal but I'm using a N-mosfet.
Do you think i should use a p-mosfet with a pull-up resistor on its gate?
Title: Re: Suggestions on my schematics for solenoid control
Post by: retrolefty on November 18, 2016, 06:17:27 pm
Thank you a lot, again!
I will check the datasheet and I'll add proper capacitors on each pin couple.

Just the final question: do you think the SERVO circuit is OK?
Usually, RC servos are controlled with active-HIGH signal but I'm using a N-mosfet.
Do you think i should use a p-mosfet with a pull-up resistor on its gate?

 Yea, you should probably breadboard one and work a servo through it's paces, low side switching while there is an active control signal to the servo might be flaky. Maybe someone else can comment?

Title: Re: Suggestions on my schematics for solenoid control
Post by: marcusbarnet on November 18, 2016, 06:20:54 pm
I tried to use this other configuration with a P-channel mosfet.
To be honest, since I'm a beginner, I don't know if these connections for the mosftet are correct.
I will try to breadboard it even if there are lots of connections and traces, so it will take some time to solder everything.
In the meanwhile, I just would like to know what is the best solution to adopt on the breadboard  :)

(http://www.skeetty.com/servo.png)

Title: Re: Suggestions on my schematics for solenoid control
Post by: max_torque on November 18, 2016, 08:12:04 pm
These days i don't bother to 'roll my own" drivers for this sort of thing, i just use off the shelf rated parts, such as the smart high side drivers from Infineon etc.  The advantage  of these smart drivers is low space requirements, require hardly any supporting parts, and bring things like over current, over/under voltage, over temp, protection and diagnostic and current feedback to the party!

I see this is a 12v project, is it automotive?  (driving autobox/DSG solenoids by any chance?) if so, google "automotive load dump" and make sure you understand the possibly impacts on any power supply conditioning you use!!
Title: Re: Suggestions on my schematics for solenoid control
Post by: marcusbarnet on November 18, 2016, 08:14:53 pm
No, I just need to control some solenoids valves for my hydraulic system.
It is not an automotive project  :)

Can you suggest me any high side driver, please?
So I can better understand how they work..

Thank you a lot!
Title: Re: Suggestions on my schematics for solenoid control
Post by: Zero999 on November 21, 2016, 09:40:03 am
Can you suggest me any high side driver, please?
So I can better understand how they work..
For educational purposes, here's a design to switch an N-channel MOSFET on the high side of a 120V supply. It uses bootstrapping to enable the gate drive voltage to exceed the power supply. Q1 & Q2 drive the MOSFET's gate. The MOSFET driver gets its power by charging C1 via the load, when the MOSFET is off. When the MOSFET is on, D1 prevents C1 from discharging via the MOSFET. Because of this, the duty cycle can't be 100%, the MOSFET needs to turn off frequently enough to recharge C1.

R1 & R2 form a potential divider to control the voltage delivered to the MOSFET's gate. If the supply voltage is lower than the MOSFET's maximum gate voltage, then R2 can be omitted. The output impedance should be under 10K or so, otherwise it'll slow down the switching speed.

Note that there's no undervoltage lockout. If the voltage on C1 is too low to keep the MOSFET fully on (due to low power supply voltage or too higher duty cycle) then the power dissipation in the MOSFET will increase and it may over heat. It is possible to add an undervoltage lockout but it will require so many components that it's easier just to use a proper MOSFET high side driver IC.

(https://www.eevblog.com/forum/projects/suggestions-on-my-schematics-for-solenoid-control/?action=dlattach;attach=272137;image)
Title: Re: Suggestions on my schematics for solenoid control
Post by: marcusbarnet on November 22, 2016, 05:59:58 pm
Thank you, Hero999 for the example and the explaination!

I studied the schematics and now, I think, all the things are much clearer for me!
Title: Re: Suggestions on my schematics for solenoid control
Post by: kony on November 24, 2016, 05:54:10 pm
Hassle free solution - automotive load switch:Infineon (http://www.infineon.com/cms/en/product/power/smart-low-side-and-high-side-switches/high-side-switch/channel.html?channel=5546d4624d6fc3d5014d9f398efd562f)