Suggestions on my schematics for solenoid control - Page 1
Forum section: electronics / projects

author: marcusbarnet
author_rank: Newbie
timestamp: November 18, 2016, 10:23:18 am
content: Hi to all, this is my first topic in this forum!Can you give me suggestions on myschematics, please?For example, if there are errors or mistakes..?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.80AThis is the datasheet for thesolenoids.In order to prevent an atmega328p reset due to noise (like it happened in the first version of my board), I added:an optoisolator6N136for each outputa MOSFET driverMCP1406for each MOSFETan isolated power supplyTHL-25to power up the atmega328p and a RC receiver (main battery is an AGM Battery 12V, 200Ah).As suggested in theapplication noteof 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 theAVR042, 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!

author: retrolefty
author_rank: Super Contributor
timestamp: November 18, 2016, 02:26:16 pm
content: QuoteShould 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.

author: marcusbarnet
author_rank: Newbie
timestamp: November 18, 2016, 03:07:38 pm
content: Thank you for your help!The current Vcc filtering is not enough?

author: retrolefty
author_rank: Super Contributor
timestamp: November 18, 2016, 06:01:41 pm
content: 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.

author: marcusbarnet
author_rank: Newbie
timestamp: November 18, 2016, 06:04:45 pm
content: 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?

author: retrolefty
author_rank: Super Contributor
timestamp: November 18, 2016, 06:17:27 pm
content: Quote from: marcusbarnet on November 18, 2016, 06:04:45 pmYea, 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?

author: marcusbarnet
author_rank: Newbie
timestamp: November 18, 2016, 06:20:54 pm
content: 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

author: max_torque
author_rank: Super Contributor
timestamp: November 18, 2016, 08:12:04 pm
content: 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!!

author: marcusbarnet
author_rank: Newbie
timestamp: November 18, 2016, 08:14:53 pm
content: No, I just need to control some solenoids valves for my hydraulic system.It is not an automotive projectCan you suggest me any high side driver, please?So I can better understand how they work..Thank you a lot!

author: Zero999
author_rank: Super Contributor
timestamp: November 21, 2016, 09:40:03 am
content: Quote from: marcusbarnet on November 18, 2016, 08:14:53 pmFor 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.

author: marcusbarnet
author_rank: Newbie
timestamp: November 22, 2016, 05:59:58 pm
content: 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!

author: kony
author_rank: Regular Contributor
timestamp: November 24, 2016, 05:54:10 pm
content: Hassle free solution - automotive load switch:Infineon