19 Replies Latest reply on Jan 5, 2018 4:36 AM by mcb1

    Bistable/latching solenoid valve control circuit. Please help!  

    sim.parkin

      Hi there.

       

      This is my first time posting and it's about my first electronics project since school . So no need to say that i apologise if what I am asking is very simple but still I hope some one can help me.

       

      So here's the situ... I want to be able to remotely switch a hose pipe on, but the thing is, the system is fixed into my vehicle so the whole thing has to be portable and run off batteries. I have a remote switch that at the press of a button (on the remote) can momentarily (or it can be set to self lock also) connect the battery to the solenoid valve and switch it on but the valve needs the polarity to be reversed and pulsed to switch it off again. For love nor money can I figure out a way of doing this? My head is in a whirl from all the h-bridge... dpdt relays... flipflops... etc.... every time I research something it seems I need something else to make it work. (if that makes sense) I am lost.

       

      In short what I want to do is: Press the button on the remote control once and it turn the water flow on, and press it again and the water turn off. Basically its a momentary push button input that alternates between a +6v output and a -6v output. If that is possible.

       

      I want to use this latching type relay because you can get low power ones of this type, but they also save battery power by only requiring a pulse of electricity to change state, rather than energising a coil for longer periods of time. Oh and I also want to avoid using microcontrollers if possible because I can't code.

       

      Really hope someone out there can help. I also hope I remembered everything, if I missed something just let me know.

       

      Thanks for reading.

       

       

      Simon.

       

      p.s. I found one other post like this with a guy with my exact problem but he gave up and used a non-latching type.

        • Re: Bistable/latching solenoid valve control circuit. Please help!  
          jw0752

          Hi Simon,

          I may have a possible solution for you. This is a bistable or Flip flop that I was playing with the other day. This one is triggered by sound but it could just as easily be triggered with a momentary push button. Each time the bistable switches I am using it to control a couple of MOSFET which also switch to match the bistable. I take the output of the MOSFETs and feed them to a couple of small LEDs that are parallel but reversed polarity from one another. The LEDs simulate your solenoid. When one lights up you are seeing a + / - polarity and when the other lights up you are seeing a - / + polarity.

           

           

          I have inserted a brief demo of the circuit so you can see how it works. If you would like a schematic and some suggestions for building your own let me know and I will put some more work into it. I will also need to know the voltage of your solenoid as well as the current necessary to switch it from open to closed and closed to open if they are different.

           

           

          John

          3 of 3 people found this helpful
          • Re: Bistable/latching solenoid valve control circuit. Please help!  
            jw0752

            Hi Simon,

            I see that you already told me that the solenoid is 6 volts. This will work with the circuit above but knowing the current will still be needed so that the proper pull up resistors can be put on the drains of the MOSFETs

            • Re: Bistable/latching solenoid valve control circuit. Please help!  
              dougw

              It sounds like you need 3 states in succession:

              1. OFF
              2. Solenoid Closed
              3. Solenoid Open

              where the 3 state transitions are clocked by your button push.

              This can be done with relays, but relay logic gets tricky when dealing with state timing - you need to create predictable delays to avoid race conditions.

              It may require about 4 DPDT latching relays and a non-latching relay plus some capacitors and resistors.

              It is possible to get toggling relays and time-delay relays, but they are expensive and some require power.

              It might be possible to reduce the number of relays a bit if the relays have dual coils.

              Either way it starts to get expensive.

              You could imagine a 3-position rotary switch stepped by a ratcheting solenoid action, but it probably needs to be custom designed.

              You can do it with flip-flops and logic gates as John suggests or use logic chips like Johnson counters, or even an EPROM, but it is quite a bit of work to build such a circuit, power it properly, drive latching relays and make it survive the environment.

              Would it be possible to simply use 2 of your remote switches, one to open the solenoid and one to close it? If they were activated by a 3-position switch (momentary / center-off) they couldn't be turned on simultaneously. You might need some diodes, depending on output configuration.

              1 of 1 people found this helpful
              • Re: Bistable/latching solenoid valve control circuit. Please help!  
                sim.parkin

                Hi there Guys.

                 

                Wowsers!! That was both quick and excellent!! Thanks so much for your help with this! Sorry for not being able to reply until now... life . I knew it was possible but couldn't get there like you guys can, just don't have the experience i guess. (always learning though)

                 

                I have found a data sheet for the valve (or a similar one as I haven't bought it yet, still shopping around) http://www.solenoid-valve.world/image/data/PDF/115bb.pdf

                 

                Thanks so much for the video John and your advise!! It looks to me like that will work great from what i understand so please send me along a schematic if its not too much trouble. I would really enjoy diving into that. I really can't thank you enough even with what you have shown me so far though. You're a good egg as they say here in the UK. I would go as far as to say a double yolker!

                 

                I really like the way you thought about it Douglas as the 3 states required. I hadn't thought of it that way before. I did manage to glimpse a scenario where I could use a two button remote in my research but i would like operation to be one button if at all possible (but not at the cost of battery life or anything else that may make the thing not fit for purpose). Thanks very much for your thoughts and ideas.

                 

                Mark I'm looking forward to hearing more about what you think now that you have the data sheet for the valve and other details.

                 

                Some other facts I failed to tell you before hand and might be helpful (or problematic for me and i don't even know ): I am planning to use 2x 3.7v 3000mAh 18650's connected in series to provide enough voltage (Will I need to use a voltage divider do you think?), the remote switch is like this one... https://www.ebay.co.uk/itm/4V-5V-6V-7-4V-9V-12V-Relay-DC-ON-OFF-Wireless-Remote-Control-Switch-Transmitter/172957190814?… I am planning to use this board to charge the batteries... https://www.ebay.co.uk/itm/1S-2S-2A-3-7V-7-4V-Lithium-Li-ion-18650-Battery-Charging-Board-Charger-Module/263267349824?ss… I think that is all of it.

                 

                I can't thank you enough for your most helpful direction guys.

                 

                Until soon.

                 

                 

                Simon.

                2 of 2 people found this helpful
                  • Re: Bistable/latching solenoid valve control circuit. Please help!  
                    jw0752

                    Hi Simon,

                    The additional information was helpful and from this information in the data sheet:

                     

                     

                    I have a little more confidence that my circuit can be made to work. Keep in mind you may have to experiment with the size of C3 and C4 as well as the value of R10 and R11. According to the Data sheet we need 375 mA for 15 mSec to actuate the solenoid.

                    Here is the schematic. I am not an engineer and sometimes I don't get things right. Fortunately there are some really sharp guys here that look over my shoulder and help with needed corrections.

                     

                    Click on the schematic to get an enlarged view. I have also attempted to attach a bit map file of the schematic so hopefully you can print a copy.

                     

                    Please continue to post your progress so we can see how your project turns out.

                     

                    John

                    1 of 1 people found this helpful
                      • Re: Bistable/latching solenoid valve control circuit. Please help!  
                        sim.parkin

                        Hi John.

                         

                        Thanks so much for the schematic. It is very interesting. I saw this type of flip flop in my research... its the inclusion of the mosfets i had no idea about. Good one!!

                        I will have to breadboard this out when the valve arrives and fine tune as you instruct. Cant wait.

                        After shopping around, I found this solenoid valve and bought it but it needs a longer pulse I notice. https://www.ebay.co.uk/itm/DC6V-1-2-Electric-Solenoid-Valve-Water-Fuel-Electromagnetic-Valve-White/122324613817?ssPageNa…  Can you help me understand how to alter the circuit to its spec? I think I have to change the capacitors but possibly also something else? the ad doesn't give a current draw but am i right in saying we can get this from the coil resistance in ohms that is given? 6v / 9Ω is 667ma is that right? Possibly missing something.

                         

                        Of course I will stay in touch and let you know how it all goes. Just have to wait for all the parts now.

                         

                        Kindest regards.

                         

                        Simon.

                          • Re: Bistable/latching solenoid valve control circuit. Please help!  
                            mcb1
                            6v / 9Ω is 667ma is that right?

                            Correct.

                            The reality is that an inductive coil (motor/solenoid) will draw more as it gets powered up due to the magnetic effect trying to resist change.

                            For smaller inductances 1.5 to 2 times is a general figure, but that is only for a short time, while the constant drain is as you calculated above ... not that they are designed to be on all time.

                             

                            In reality the length of time you are going to apply power onto the solenoid is nothing.

                            The standby power for the receiver is likely to be greater over 24hrs than the time to energise/de-energise the solenoid.

                             

                            Mark

                            1 of 1 people found this helpful
                        • Re: Bistable/latching solenoid valve control circuit. Please help!  
                          mcb1

                          sim.parkin

                          As I suspected this uses the water to provide the latching effect.

                          jw0752 cct will provide the required pulse but you need to reverse the voltage onto the solenoid.

                           

                          IMO the best idea is to use an HBridge.

                          The L298N series are often used to control motors, but the solenoid coil is basically the same thing.

                          Arduino DC Motor Control Tutorial - L298N | PWM | H-Bridge - HowToMechatronics

                           

                           

                          Motor2.png

                           

                           

                          For this application, the solenoid would be connected across J2 and you would tie ENA high, and then make IN1 High and IN2 low (or hold it low with a resistor), and it will operate one way, Reversing the IN1,2 will make it go the other way.

                          Most remote controls provide a pulse out, and you simply connect one remote output to IN1 and the other to IN2. (They can be either High or Low, it's when they are different the motor/solenoid is powered.)

                           

                           

                          The L298N boards are available for a few dollars on the Asian websites.

                           

                           

                          The other method involves a DPDT relay to reverse the connection to the solenoid, and a pulse of the power.

                           

                          Mark

                          1 of 1 people found this helpful
                            • Re: Bistable/latching solenoid valve control circuit. Please help!  
                              jw0752

                              Hi Mark,

                               

                              The circuit that I made does reverse the polarity with each trigger. It wasn't clear in your post if you caught this.

                               

                              I suspect that the solenoid has a plunger that is a magnet and hence the need to reverse the polarity to throw it in to the opposite state.

                               

                              John

                              2 of 2 people found this helpful
                              • Re: Bistable/latching solenoid valve control circuit. Please help!  
                                sim.parkin

                                Hi Mark.

                                 

                                Thank you very much for your input there. I did quite a bit of research on h bridges. I have been thinking about your solution and it appeals because i can just buy a board 'off the shelf' so to speak. But if i have a two button remote control can't i just hook one relay up to the battery and hook the other one in the opposite polarity? I think this is what you mention at the end of your post. I cant really see the advantage of using the h bridge because it has to have two inputs anyway, but if I missed something (quite probable) please let me know.

                                 

                                Thanks again for your help and advise!

                                 

                                Best regards.

                                 

                                 

                                Simon.

                                  • Re: Bistable/latching solenoid valve control circuit. Please help!  
                                    mcb1

                                    can't i just hook one relay up to the battery and hook the other one in the opposite polarity?

                                    Two SPDT relays driven from two buttons would work just as well.

                                    You can purchase dual relays from many asian suppliers, and most are 5v but will handle 6v for a short period.

                                     

                                    Most of the relays are set for ground to operate (Active LOW), but some allow either.

                                     

                                    You will need to check how long the remote receiver provides the pulse for.

                                    A simple LED (and resistor) will tell you, and if it's too long then it might still require some magic electronics.

                                     

                                     

                                    Mark

                                    2 of 2 people found this helpful
                              • Re: Bistable/latching solenoid valve control circuit. Please help!  
                                jw0752

                                Hi Simon,

                                I was back in the shop playing with this idea. I have changed the capacitors to 1000 uF and I have changed  R10 and R11 to 390 ohms. I hooked up a small 6 volt DC relay with a 100 ohm coil to see if it could be actuated. Here is the relay:

                                 

                                 

                                I put my analog ohmmeter across the NO contacts in parallel with my scope probes. This should give me about 3 volts on the scope when the contacts are open and zero volts when they close. Here is the scope image of the relays contacts.

                                 

                                 

                                As you can see the pulse was strong enough to close the relay contacts for 200 mSec. This relay is fairly easy to actuate so I am not sure that it is a good model for your solenoid. You will have to do some experimentation. I am calculating that we had a peak of about 70 mA to the relay coil and dropping from there as the capacitor charged.

                                 

                                John

                                2 of 2 people found this helpful