Go Down

Topic: Latching solenoid circuit issue (Read 1 time) previous topic - next topic

lukewoodbury

Hello all, please excuse a software guy struggling with hardware...

I am trying to control a water pipe valve controller which I believe is a latching solenoid, it doesn't say much other than 'Norgren 9V 7.5W latching' on it. Connecting a 9V battery one way opens the valve, connecting it the other way closes, so I figured I needed some kind of H bridge thing going on.

I have made a circuit (attached) that uses a DPDT relay to feed 9V or -9V to the solenoid and the circuit tester confirms it is working. However, when I connect it to the actual solenoid (or a motor) it goes wrong as if there is a short circuit or something.

Can someone educate me to what I am doing wrong?

The circuit is controlled by an ATtiny which is fed through a voltage regulator and I am using another relay to cut the 9V supply to the solenoid relay when I don't need it so as to save battery life.

septillion



That Fritzing mess is useless. We have to know the pinouts and other specs of the relay. And most relays can't be controlled from a Arduino directly. Can you draw a proper circuit diagram? So no breadboard nonsens.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

lukewoodbury

Thanks for your reply. Sorry, I guess its the hardware equivalent of dumping a load of crappy code on the forum without isolating the issue! Truth be told, I sometimes struggle with circuit diagrams so I revert to my safe place which is Fritzing breadboard view, though I appreciate I should find more time to learn proper electronics conduct if I want some help. 

Anyway, attached is my (equally useless?) scrawl of the main part of the circuit and I am using the relay linked below which says it has a 5V coil so I thought it would be ok with an ATtiny (did I mention I don't really know what I am doing?).

https://www.rapidonline.com/good-sky-gs-sh-205t-5v-dpdt-subminiature-relay-60-4754

Meanwhile I will try and do a proper circuit diagram, I'm sure it will be good for me!



weedpharma

#3
Sep 21, 2016, 12:11 pm Last Edit: Sep 21, 2016, 12:14 pm by weedpharma
Looks like you are using two relays to achieve a DPDT function.

The timing of the operation of the relays can cause a short.

You need to use a single relay to reverse the voltage and another to turn the power on and off.

To operate, turn power relay on and off with polarity relay off.

To turn off, with polarity relay operated, turn power relay on and off then turn polarity relay off.

Weedpharma

Edit. Written before reading reply and seeing circuit.

weedpharma

The battery may not be able to supply enough current.

Try a plug pack supply

Weedpharma

lukewoodbury

Thanks, but same deal with plug pack. Still working on my proper circuit diagram...

septillion


That's already more of a schematic but it's not all. (A drawing like this is already fine, better a hand drawing then a Fritzing). A real schematic is easier to read to see what's wrong. A Fritzing is only useful to just build it wthout understanding. But if you have trouble building something from a schematic, just add pin numbers to the schematic (and maybe a drawing of the pin number on a component).

Alright, three parts. The first is driving the relay. The link is dead (Rapid is down...) but I found a datasheet. Although the relay is 5V the Arduino also has a maximum of current it can deliver. That's max 40mA and the relay draws in normal state already 71mA! That's not even counting the inrush current. So you have to use a driver for the relay like a transistor. Like so:


Second, like in that drawing, every coil needs a diode over it to protect the rest of the circuit from the fly-back voltage spike. A 1N4148 is great for that.

Third, like already mentioned by weedpharma, configure it in a way that one relay turn the solenoid on and the other for the direction.

But after reading all this, I would say, grab a simple motor driver and be done with it :)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

lukewoodbury

Ahh, thanks, I should have known to check the current draw for the relay! I am already using another relay to turn on the power to the second relay, but I had missed the diode off that one. Anyway I may follow your advice and get a motor driver I think!

I did finally get a schematic together (attached), but for some reason Fritzing schematic view would not let me connect the line that is coloured red. If anyone knows, is this my error or something to do with Fritzing/ the part? Is there a better tool you would recommend for schematics?

Many thanks for your time in helping me.

lukewoodbury

And can I not insert an image without first attaching or hosting it somewhere?


septillion

What I still find the best tool for quickly drawing schematics? Pen and paper :) And for attaching, yeah, just post it as an attachment and then edit you post to inline it (instead of a second post).

In your schematic, the relay configuration is good. But still a missing diode and the fact the Arduino can't drive the relay directly ;)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

lukewoodbury

Thanks Septillion, I learned something!

Go Up