Go Down

Topic: Latching Solenoid Driver Shield for Uno (Read 5227 times) previous topic - next topic

ron_sutherland

Hi everyone,

I have found some time to work on my garden automation project.
This shield is only one part of the puzzle, but others may find the ideas useful.

My goal is to control latching irrigation solenoids, and monitor a flow meter during watering. Then when not watering I want to monitor humidity sensors (humidity changes frequency output). The schematic:
http://epccs.org/indexes/Board/RPUShldGP/Documents/RPUShldGP,Schematic.pdf

My web page with some more info:
http://epccs.org/indexes/Board/RPUShldGP/

Also the files are in Eagle (CC) BY-SA if you want to download them, just look for the zip link.
https://epccs.org/hg/epccs/Board/file/tip/RPUShldGP/Design

I have not had the boards made yet, I want to find errors first (thanks for any help with that).

I better put a disclaimer about my web site. I have had it for many years (over 15 I think), and much of the stuff on it is just abandoned tinkering, so I hope that serves as enough warning.

ron_sutherland

I assembled the circuit board, and it looked very nice for hand soldering.


Unfortunately, the SMPS was going to allow current through with boost off, which was not what I wanted, but the boost was working, and Q9 did turn off the boost. After some time, I decided to move the P-channel FET to turn off the power to SMPS.


following these schematic changes:
http://epccs.org/indexes/Board/RPUShldGP/Change/RPUShldGP,Schematic(RDLN_14164.1A).pdf

With those changes things started to work well enough that I could plug an Uno on the board. But then I saw intermittent resets, so time to look at my power while driving the solenoid, especially with a 5 Ohm load.


The problem was again related to current shooting through the new P-ch (DMB)transistor I had added, the current went into C8 as well as through R9, L1 and D1 and then into C9. So I decided the original Q9 was a good idea after all, but it needed to be gated with the same signal as used for the new transistor. Combined with a 100 Ohm bypass around that new transistor, the voltage could rise slowly without putting my external supply into current limit. The power at C8 can now be boosted into C9 when the old Q9 was enabled, at the same time the 100 Ohms is shorted out with the new P-ch transistor. The result looks good on the scope.


but not so good on the board.


The schematic changes are as follows:
http://epccs.org/indexes/Board/RPUShldGP/Change/RPUShldGP,Schematic(RDLN_14164.1B).pdf

ron_sutherland

#2
Sep 02, 2014, 12:58 am Last Edit: Sep 02, 2014, 02:04 am by ron_sutherland Reason: 1
An odd thing happened when I plugged an Uno clone with this solenoid driver shield into the USB port; I got 24 Volts boosted from Vin, which for some reason had 4.3 Volts on it. After looking over the Uno schematics, all I can see is that the 5V on the linear regulator is back driving Vin from the USB power. I googled around but can't find much info about back-driving the linear regulator. During the boost, 300mA is taken from Vin for about 600mSec, but everything seems to be working fine, I was not expecting to see the voltage on Vin when the USB powered things. I think this is OK, can anyone offer an idea why it might hurt the Uno's linear regulator.


graynomad

I don't know what reg the Uno uses, some can handle back driving and some can't, those that can often have a shunt diode that conducts the current around the reg.

I would suggest that the Uno's reg has such a diode and that the USB 5v is passing through that and losing ~.7v in the process, hence the 4v3 on VIN.

Quote
I got 24 Volts boosted from Vin,

Are you saying that your SMPS is running off the VIN 4v3? Is there a connection via J1?

Maybe you should add a Schottky diode in series with J1 pin 3 to stop that and wear the small voltage drop.

Quote
I better put a disclaimer about my web site. I have had it for many years (over 15 I think)
Certainly time for a makeover, I think I've revamped mine 3-4 times over that period.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

ron_sutherland

Quote
"I would suggest that the Uno's reg has such a diode and that the USB 5v is passing through that and losing ~.7v in the process, hence the 4v3 on VIN."

YES :)

Quote
"Are you saying that your SMPS is running off the VIN 4v3?"

Also yes, I'm 99.9% sure that is happening, (and I'm 80% convinced it is going to be OK for USB operation)
   
Quote
"Is there a connection via J1?"

The P-ch FET (Diodes, DMP3098L with device marking DMB, so I call it a DMB) is soldered on top of J1 (see redline schematic at bottom of my second post, J1 is almost totally obscured on image above it). The Drain is on J1 pin 2 and Source is on J1 pin 3 (which runs to Vin from Uno). The plan was to have the option to select 5V or Vin with a jumper at J1, but now that I see Vin getting back-feed from 5V, I don't see much point in a direct connection to 5V. The reason I favor Vin has to do with battery power, I want to boost from the battery, but I don't much care about power loss from a USB supply. If I let the smoke out, then that diode will be the backup plan. Much thanks.

ron_sutherland

I am getting setup for outdoor testing using an 8x8x4 (inch not cm) enclosure. So far it includes flow meter, four valves, photocell, an Uno Clone, and my RS485 bus is resting on top, I have to solder another of my RS485 boards next. 



http://epccs.org/Video/SensActuIrrig_SetupToStartOutdoorTesting.mp4

more info about setup
http://epccs.org/indexes/System/SensActuIrrig/

ron_sutherland

Control how much water each zone gets, rather than run time. Video shows filling some bottles.
http://epccs.org/Video/SensActuIrrig_FlowMeterCountsContorlValve.mp4


As the bottles neck reduces in diameter, it gets tricky to not overfill. My test script shows the flow meter count and rate in this image.


The error count (typo in my image) is the number of flow meter pulses after my firmware has driven the solenoid with a reset pulse.  This number combined with flow rate means that it takes about 230 mSec to reset the valve. The shutoff seems to be consistent within about one flow count for each valve. However, one valve takes nine counts and another seven to shut off. The amount of liquid in the first pulse that I count when a bottle starts to fill is also an unknown. And I have some leaks and water drops hanging in the bottles, so overall this looks nicely accurate.

Go Up