Author Topic: Driving watering electronic timer with Moteino  (Read 6660 times)

TomWS

  • Hero Member
  • *****
  • Posts: 1925
Re: Driving watering electronic timer with Moteino
« Reply #15 on: April 19, 2015, 10:16:07 AM »
<snip>

Wow. Just wow! I can't believe my luck and how timely this is! :) This forum is great for sharing ideas and knowledge.
No kidding!  I just got a very valuable piece of information from you!   And this is it:
Quote
<snip>
http://www.amazon.com/dp/B002HJOUYY?psc=1
I wasn't aware that they sold the valves separately!  Thanks for the link!  I just ordered one of these to check it out, but I'm sure it's simply a repackaging of the same valve used in the timer I referenced in my previous post.  I've attached a photo of the 'insides'. 

Quote
<snip>
Fast forward to today and you will find me doing "field tests" of this project. The problem I ran into is that things "kind of" work, meaning the valves (the new generation, which starting this year I am using exclusively) would open/close "most of the time". This is obviously catastrophic in this scenario -- imagine a valve that fails to close when you are not around to notice.
<g>  If you look very closely at the two traces below, you will see why you might have a problem and Orbit doesn't (as often).  Notice the first trace has a 'wiggle' a 4.5 mS into the pulse?  That is a result of the metal piece moving inside the core.  See in the second trace there is no such 'wiggle'.  Why?  Because the metal piece has already moved.  Orbit actually sends a second pulse about 10 seconds later than the first (probably the time it takes them to rebuild the charge), probably as a safety measure.  If it didn't go on the first one (sticky maybe) it will probably go on the second, would be my guess.
Quote

Why do I think I am so lucky and the timing of Tom's post is perfect? Well, I can't find any major flaws in my design, both hardware and software (perhaps some of you will, and I'd love to hear about it). And yet, the darn valves won't activate sometimes, so I have been scratching my head for a while. My next move was going to purchase a timer that can control the new generation valves to scope the output and make my own controller behave the same way. In fact, I was planning to go to Lowe's this weekend to get me one of these controllers. But, that won't be necessary now because Tom has just provided the measurements that I need!

Is that time base 4 milliseconds, for a pulse length of about 16  milliseconds,Tom? If so, I think my problem is too low initial voltage and two long of a pulse (I was using around 18 VDC, and afraid of going higher out of fear of damaging the valve, and 20 milliseconds), which are easy to change by modifying my device's configuration.

Once I am sure everything is working well 100% I will publish the software, the Eagle files, and documentation. As a preview, I am attaching a PNG of my design (it does not use a Moteino but the next generation will), a picture of a partially assembled board and a board before going into the reflow oven, and a picture of the board I have in the yard for my field tests (the twisted pair wires are for measurements with a scope on the other side of the brick foundation).

Thanks again Tom!

Cheers,

Eloy Paris.-
From what I've seen of this Orbit valve, there are three things you need to have to make sure you have a sufficient signal:
1. Sufficient voltage on the boost.  At least 22V, maybe even 25V.  The resistance of the coil was 4.6 Ohm IIRC, coupled with the high inductance you need a lot of volts to build up the current quickly.
2. It really needs 3.5A initially, at least for the first 7 mS the current needs to be very strong.  Your 2200uF should be enough, but can your H bridge drive this much current with very little voltage drop.
3. Duration of the pulse should be at least 16mS, 20mS should be fine.

My circuit, as it is, won't drive this relay.  I used 20V transistors and the cap is only 16V.  Both of those would need to change (in the H bridge anyway) and change the resistor divider on the voltage sense.  However, all of those would require only component replacement.  There shouldn't need to be any other circuit change.  I would need to tweak the SW, but I think I can handle that  ;)

On your circuit, I would put a current limit resistor in series with L1 'cause a SW controlled switch is bound to get stuck on at some point...  Otherwise it looks pretty good.  I like that you support multiple channels (especially for a hose type valve).  Your H-Bridge drivers have a higher Vgsth than mine, but probably at the point that the VBoost collapses to where this would be an issue, all the work has been done.

I really like your water-resistant enclosure with its customizable hanging system!

As you said, the beauty of a forum is sharing information.  Thanks for sharing!

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #16 on: April 22, 2015, 01:02:14 PM »
Hi Tom!

I wasn't aware that they sold the valves separately!  Thanks for the link!  I just ordered one of these to check it out, but I'm sure it's simply a repackaging of the same valve used in the timer I referenced in my previous post.

Ah, sorry, I forgot that you said you are using an integrated timer/valve. The standalone valves that I am using are different from a product point of view. But as you say, from an electrical point of view I am pretty sure that the valves work the same way. The standalone valves are available at Lowes, and probably at Home Depot as well.

Quote
Orbit actually sends a second pulse about 10 seconds later than the first (probably the time it takes them to rebuild the charge), probably as a safety measure.  If it didn't go on the first one (sticky maybe) it will probably go on the second, would be my guess.

Ahh, very interesting. That's kind of "cheating", but it's actually a good idea. I'll implement the same thing. Better safe (and cheater) than sorry.

Quote
From what I've seen of this Orbit valve, there are three things you need to have to make sure you have a sufficient signal:
1. Sufficient voltage on the boost.  At least 22V, maybe even 25V.  The resistance of the coil was 4.6 Ohm IIRC, coupled with the high inductance you need a lot of volts to build up the current quickly.

Yes, my voltage booster has no problem charging to 25 VDC. The actual design is borrowed from here:

http://www.arduino.cc/playground/Main/RegulatedPositiveVoltageBooster

The capacitor is cutting it close -- it's rated for 25 VDC. I need to check the tolerance but I probably should not go up to 25 VDC just to be safe.

Quote
2. It really needs 3.5A initially, at least for the first 7 mS the current needs to be very strong.  Your 2200uF should be enough, but can your H bridge drive this much current with very little voltage drop.

Indeed, transistor selection is a key part of this design. I think the H-bridge transistors I am using should be able to handle the task -- they are rated at up to 7.3 Amps continuous current and a max VDS voltage of 30 Volts.

https://www.fairchildsemi.com/datasheets/FD/FDS8858CZ.pdf

Quote
My circuit, as it is, won't drive this relay.  I used 20V transistors and the cap is only 16V.  Both of those would need to change (in the H bridge anyway) and change the resistor divider on the voltage sense.  However, all of those would require only component replacement.  There shouldn't need to be any other circuit change.  I would need to tweak the SW, but I think I can handle that  ;)

Agreed. The circuit itself is actually not too complicated. The key is component selection.

For the next version of my project I am planning to take the time to understand your H-bridge as it uses no transistors for driving it, which would reduce component count.

Quote
On your circuit, I would put a current limit resistor in series with L1 'cause a SW controlled switch is bound to get stuck on at some point...  Otherwise it looks pretty good.  I like that you support multiple channels (especially for a hose type valve).  Your H-Bridge drivers have a higher Vgsth than mine, but probably at the point that the VBoost collapses to where this would be an issue, all the work has been done.

Current limiting resistor in series with L1 is a good idea -- in fact, a software glitch is not even necessary for the switch to get stuck: If the pulse duration is too long the capacitor will discharge completely and at that time your power supply will start providing all the current. If the power supply is 5 VDC and the solenoid has a resistance of 4.6 Ohms then the current sucked by the solenoid will be around 5/4.6 =  1 Amp.

Could you elaborate on your comment regarding H-bridge drivers and Vgsth? Is a higher Vgsth not a good thing because the transistor goes (and remain) into saturation more easily?

Quote
I really like your water-resistant enclosure with its customizable hanging system!

Well, I am going one thing at a time :-) The enclosure is from a Hummus plastic container. It's not permanent but I needed to focus on circuit itself first and not on the enclosure. I also view this as an opportunity to do some stress-testing of the circuit -- it's not exposed directly to water even if the enclosure gets wet with heavy rain, but humidity definitely gets in there all the time.

Quote
As you said, the beauty of a forum is sharing information.  Thanks for sharing!

And thank you as well for your information sharing! :-)

Cheers,

Eloy Paris.-

TomWS

  • Hero Member
  • *****
  • Posts: 1925
Re: Driving watering electronic timer with Moteino
« Reply #17 on: April 22, 2015, 06:16:12 PM »
Hi Tom!

Ah, sorry, I forgot that you said you are using an integrated timer/valve. The standalone valves that I am using are different from a product point of view. But as you say, from an electrical point of view I am pretty sure that the valves work the same way. The standalone valves are available at Lowes, and probably at Home Depot as well.
I bought one from Amazon.  It's sitting in my workshop now.  May get to test it tomorrow.  My primary interest was in permanently installed irrigation valves, but I have a need for a number of 'hose end' type sprinkler systems and it's tough to beat the cost and convenience of the Orbit add-on valve.   I'm very glad you pointed it out to me.
Quote

Ahh, very interesting. That's kind of "cheating", but it's actually a good idea. I'll implement the same thing. Better safe (and cheater) than sorry.

The only drawback is the extra power it takes to run another charge cycle.  This will effectively cut your battery life in half (since almost all of the overall power is consumed in the charging).  However, as you say, reliability is critical in this application.

Quote
Yes, my voltage booster has no problem charging to 25 VDC. The actual design is borrowed from here:

http://www.arduino.cc/playground/Main/RegulatedPositiveVoltageBooster

The capacitor is cutting it close -- it's rated for 25 VDC. I need to check the tolerance but I probably should not go up to 25 VDC just to be safe.
It would ok for a test, but I'd use 35V for 'real life'.
Quote
<snip>

Agreed. The circuit itself is actually not too complicated. The key is component selection.

For the next version of my project I am planning to take the time to understand your H-bridge as it uses no transistors for driving it, which would reduce component count.
I can drive directly because the low Vgsth I'm using (0.85V to begin conduction), but that's a double edged sword: low Vgsth, low Vgs breakdown.  And, on further evaluation (looking boosting to support the Orbit), I realized that the Vgs breakdown on the si2302s is only 8V (it's that on the si2365 as well, but the voltage is never more than 3.3V).  With this cross coupled approach I'm driving full VSolenoid into the gate!  Might be ok for 9V but very NOT good at 25V! 

For my initial tests I'm going to try to get away with putting a resistor in series with the gates and hope that they break down gracefully (I think it does).
Quote
<snip>
Could you elaborate on your comment regarding H-bridge drivers and Vgsth? Is a higher Vgsth not a good thing because the transistor goes (and remain) into saturation more easily?
Simple, your gate bias on both top and bottom transistor comes entirely from VBoost which collapses as the cap discharges, at some point it will collapse below the Vgs threshold and the transistors will go linear.  Fortunately, as I said, 'all the work' is probably done by then, so no major problems, assuming you've delivered all the energy needed to trip the solenoid.  It's a similar problem in my case, but it's only the bottom transistors driven from VBoost and the threshold is lower voltage.
Quote
Quote
I really like your water-resistant enclosure with its customizable hanging system!

Well, I am going one thing at a time :-) The enclosure is from a Hummus plastic container. It's not permanent but I needed to focus on circuit itself first and not on the enclosure. I also view this as an opportunity to do some stress-testing of the circuit -- it's not exposed directly to water even if the enclosure gets wet with heavy rain, but humidity definitely gets in there all the time.
I wasn't criticizing, I really do like the pragmatic approach.  You focused on getting the job done and your work shows that you'll take care of the 'other' stuff later.

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #18 on: April 24, 2015, 03:20:45 PM »
Hi Tom!

This thread has been great, and is helping me realize the errors of my ways :-)

I bought one from Amazon.  It's sitting in my workshop now.  May get to test it tomorrow.  My primary interest was in permanently installed irrigation valves, but I have a need for a number of 'hose end' type sprinkler systems and it's tough to beat the cost and convenience of the Orbit add-on valve.   I'm very glad you pointed it out to me.

Unrelated (to this discussion) question -- are your permanently installed irrigation valves of the 24 VAC type? Just curious because it is my understanding that 24 VAC valves are what real irrigation systems (not of the garden hose type) use.

Quote
I can drive directly because the low Vgsth I'm using (0.85V to begin conduction), but that's a double edged sword: low Vgsth, low Vgs breakdown.  And, on further evaluation (looking boosting to support the Orbit), I realized that the Vgs breakdown on the si2302s is only 8V (it's that on the si2365 as well, but the voltage is never more than 3.3V).  With this cross coupled approach I'm driving full VSolenoid into the gate!  Might be ok for 9V but very NOT good at 25V! 

Aha! I completely missed the breakdown voltage! Whoops! This means I need to scrap my current design and re-design -- my P-channel transistors have max. VGS voltage of 25 volts. However, the N-channels have a max. VGS of 20 volts. And not only that, but the gate of the N-channel transistors is connected via pull-up resistor to VBOOSTED, so if I boost voltage goes higher than 20 volts (which is a requirement for those Orbit valves) then I'm in trouble. So, this design is not good and I need to fix it (I won't give up!).

To start, I can drive the low-side N-channel transistors directly from the microcontroller I/O pin. That fixes the problem of too high VGS on the N-channel transistors.

The high-side P-channel transistors also have a problem -- the transistors that I am using can go up to 25 volts VGS. However, that is cutting it too close, and if I want to use another transistor with a lower max. VGS, then the design doesn't work. So, to address this, I'll use a voltage divider. That'll give the P-channel transistor some breathing room.

My new design is attached. Any thoughts are more than welcome.

Quote
For my initial tests I'm going to try to get away with putting a resistor in series with the gates and hope that they break down gracefully (I think it does).

The gate current is very small; how does a resistor in series with the gate help with the problem of too high of a VGS voltage?

Quote
Simple, your gate bias on both top and bottom transistor comes entirely from VBoost which collapses as the cap discharges, at some point it will collapse below the Vgs threshold and the transistors will go linear.  Fortunately, as I said, 'all the work' is probably done by then, so no major problems, assuming you've delivered all the energy needed to trip the solenoid.  It's a similar problem in my case, but it's only the bottom transistors driven from VBoost and the threshold is lower voltage.

I understand now; thanks for explaining. Driving the low-side transistors directly from the microcontroller in the new design will decouple boosted voltage from gate driving, but the problem will not go away for the high-side transistors. I do think you are right in that by then all the energy has been supplied to the solenoid so this is not a problem.

Quote
I wasn't criticizing, I really do like the pragmatic approach.  You focused on getting the job done and your work shows that you'll take care of the 'other' stuff later.

Oh, I didn't think you were criticizing. I actually thought it was funny that you noticed. Besides, constructive criticism is always good (and I most definitely welcome it!).

Thanks for a great discussion!

Cheers!

Eloy Paris.-

TomWS

  • Hero Member
  • *****
  • Posts: 1925
Re: Driving watering electronic timer with Moteino
« Reply #19 on: April 24, 2015, 03:46:49 PM »

Unrelated (to this discussion) question -- are your permanently installed irrigation valves of the 24 VAC type? Just curious because it is my understanding that 24 VAC valves are what real irrigation systems (not of the garden hose type) use.
In the installed system, yes, they are standard 24VAC solenoids that I control via an 8 way X10 controller (http://www.wgldesigns.com/rain8.html).  These new valves will be permanently installed as well, I just set up the first one as hose end because it was easier to test and that's what I needed for my stream auto-filler.  If, no, 'when' I get the Orbit valve working, then I'll switchover the auto filler to the Orbit and move this other one underground.

Quote
<snip>
My new design is attached. Any thoughts are more than welcome.
I'll look at your new design over a glass of wine later...
Quote
Quote
For my initial tests I'm going to try to get away with putting a resistor in series with the gates and hope that they break down gracefully (I think it does).

The gate current is very small; how does a resistor in series with the gate help with the problem of too high of a VGS voltage?
IF the gate breaks down, I want some kind of current limit on it. I'm hoping I can just lift the gate off the pad and stick in an 803 resistor.  Worse things have been done  ::)

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #20 on: April 24, 2015, 03:50:15 PM »
The high-side P-channel transistors also have a problem -- the transistors that I am using can go up to 25 volts VGS. However, that is cutting it too close, and if I want to use another transistor with a lower max. VGS, then the design doesn't work. So, to address this, I'll use a voltage divider. That'll give the P-channel transistor some breathing room.

My new design is attached. Any thoughts are more than welcome.

Hhhhmmm. Your initial design and that voltage divider I mention above got me thinking... What about using the boosted voltage to drive the high-side transistor gates (like in your initial design) but using a voltage divider to bring down the VGS voltage of the high-side transistors; do you think that might work? I am very tempted to test this because if it works it would reduce the number of parts by two NPN transistors and two resistors, and make for a very elegant solution (thanks to you ;-) ).

Design attached.

Cheers,

Eloy Paris.-

TomWS

  • Hero Member
  • *****
  • Posts: 1925
Re: Driving watering electronic timer with Moteino
« Reply #21 on: April 24, 2015, 04:51:01 PM »
Eloy,
I'd rather modify your previous design for one very simple reason, I am not confident that a 3.3V processor can reliably drive your N channel transistors.
If you look at the FDS8858 datasheet, it is very tempting to focus on the current vs Vgs curve (Figure 1, attached below).  Here you see gobs of current with a Vgs of 3.0V.  However, if you look at Figure 4, also attached below, you'll see the Rds(on) vs Vgs showing that the knee of the control voltage is at around 4V, well above the processor output voltage (unless you're using 5V Arduinos, in which case, ignore all this  :D

Compare that to the si2302 (which I'm not recommending, just pointing out the difference) you'll see the Rds(on) vs Vgs knee is below 3V, safely within the processor's output.

Now, how does that affect your circuit?  In the latest one and the previous one you're driving the N transistors from the processor and, as I say, I'm not sure that's a good thing.  One thing to notice on the FDS8858 datasheet, however, is that they explicitly show the 'zener' diode between the gate and source pins.  This implies that you can reliably overdrive if you current limit and I think that's a safe bet, especially given that the Vgs breakdown is 20V for the N device.

So, on your various implementations:
1. for your original, I would simply put a 10K resistor in series with all the gates.  This will limit the current at breakdown but still provide enough drive on the P channel gate.
2. for your circuit #2, I'd change R19 and R22 to a much higher value so that your P channel gate doesn't get cut off too soon as VBoost collapses (right now it only gets 1/2 of VBoost).  For the N channels, cross couple like I did but use 10K resistors in series with the gates.
3. for your circuit #3, Uh, don't do this one... unless, as I said, the processor is 5V.

Tom
Now on to Happy Hour...

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #22 on: April 24, 2015, 05:58:13 PM »
Hi Tom,

[...]
So, on your various implementations:
1. for your original, I would simply put a 10K resistor in series with all the gates.  This will limit the current at breakdown but still provide enough drive on the P channel gate.
2. for your circuit #2, I'd change R19 and R22 to a much higher value so that your P channel gate doesn't get cut off too soon as VBoost collapses (right now it only gets 1/2 of VBoost).  For the N channels, cross couple like I did but use 10K resistors in series with the gates.
3. for your circuit #3, Uh, don't do this one... unless, as I said, the processor is 5V.

Thanks a lot for the insight and suggestions. Decisions, decisions, decisions. Lots of things to consider!

By the way, I am not married to the FDS8858CZ -- there are several options for dual N & P-Channel in SOIC-8 package (and it seems like with compatible pinouts), which I think is very convenient for putting four valve drivers in one board. The FDS8858CZ just happens to be the first one that I looked at and bought a few samples of.

Enjoy happy hour!

Cheers,

Eloy Paris.-

TomWS

  • Hero Member
  • *****
  • Posts: 1925
Re: Driving watering electronic timer with Moteino
« Reply #23 on: April 26, 2015, 12:19:34 PM »
I finally got a chance to test the Orbit AddOn valve (not with my circuit, just a breadboard setup).

Here's what I've learned:
  • The valve appears to trip reliably with 24V and 1000uF capacitor.
  • It does trip with 20V and 1000uF capacitor.  Not sure if this would require multiple trips to count on it 100% of the time.
  • It does NOT trip at 18V and 1000uF capacitor.
  • It DOES trip reliably at 18V and 2000uF capacitor.
  • It tripped everytime at 17V and 2000uF capacitor, but same caveat applies.
  • It only trips in one direction at 15V and 2000uF cap. (Not sure which direction, I think ON, but I didn't run water through it)
Note that I didn't have 1000 or 2000uF caps at this voltage so paralleled multiple 470s, so the measurements should be reliable at the stated capacitance.

Given this, you MIGHT be able to get away with 20V transistors and 2000uF cap if you pump the VBOOST to >18V.  In the tests, even with 2000uF, the voltage was pretty much discharged within 20mS so I'd use this length pulse.

I will probably design the next version to operate up to 24V with the option to use 2000 or 1000uF cap.  I'd rather use a 1000uF cap since it will only take 1/2 the time to charge and that's where my load is...

Here's the next iteration of the circuit.  I swapped the polarity.  The previous version was an attempt to avoid the transistor cutting off supply to the inductor, but that failed so, back to plan A.  This version uses dual transistors like you do, only different ones to keep the N channel Vgsth within safe limit.  I might go back to discrete transistors since these dually's are more expensive and don't seem to save any space.  Don't know yet...

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #24 on: April 26, 2015, 01:51:17 PM »
Hi Tom!

Great testing! I've been thinking about this all weekend so your update is very timely...

I finally got a chance to test the Orbit AddOn valve (not with my circuit, just a breadboard setup).

Here's what I've learned:
[...]
Given this, you MIGHT be able to get away with 20V transistors and 2000uF cap if you pump the VBOOST to >18V.  In the tests, even with 2000uF, the voltage was pretty much discharged within 20mS so I'd use this length pulse.

Agreed, that is what I have seen in the oscilloscope traces -- after 20 msecs that 2200 uF capacitor is pretty much discharged.

I have not had a chance to do live tests using a boosted voltage greater than 18 volts but in the few tests that I have done things seems to have worked well when using 22 volts. I started to use 22 volts for testing without water after you posted the oscilloscope traces for your broken integrated timer/valve.

Also, keep in mind that for a couple of weeks I was operating the valves for real (I needed to keep wet some new seed I put down) using 18 volts -- I mentioned that every now and then the valves failed to open. I think that was because the voltage I was using for the pulse was too low. But now I am also thinking that my H-bridge driver circuitry was a bit flawed (specifically, exceeding the maximum VGS on the N-channel transistors).

Quote
I will probably design the next version to operate up to 24V with the option to use 2000 or 1000uF cap.  I'd rather use a 1000uF cap since it will only take 1/2 the time to charge and that's where my load is...

Yes, I think it is a good idea to design so one can go up to 24 volts. You never know what solenoid you may encounter down the road :-)

Quote
Here's the next iteration of the circuit.  I swapped the polarity.  The previous version was an attempt to avoid the transistor cutting off supply to the inductor, but that failed so, back to plan A.  This version uses dual transistors like you do, only different ones to keep the N channel Vgsth within safe limit.  I might go back to discrete transistors since these dually's are more expensive and don't seem to save any space.  Don't know yet...

I like it! I see that you put a voltage divider to bring down the voltage used to drive the P-channel transistors. Great! That's what I had in mind too. And driving the P-channels through the H-bridge N-channels is great too. That eliminates the NPN transistor I had in my 1st and 2nd designs. I think I will go with this design as well!

This weekend I've been looking for better transistors for the H-bridge. Like you, I will be using Moteinos for this so I don't have 5 volts to drive the H-bridge (you mentioned this in your post from Friday where you offered suggestions for my three possible designs). For some reason that dual N-channel/P-channel that you are planning to use is not showing up in my search at mouser.com.

You do have a point about the dual transistors in a single package... Options are also more limited. It might make sense to use discreet components. I'll look into that as well.

Other things I like about your design:

- Gate pull down resistors. Good best practice. My H-bridge is driven by a serial register, which produces logical 0 at power up, but I still think it is a good idea to put them there.
- Transistor to turn on the voltage booster subsystem. Saves battery. Good to have it there. I think I'll borrow this idea.
- Driving the H-bridge directly from a microcontroller GPIO pin -- that is what I have wanted to do all along but as you pointed out to me, I chose the wrong power transistor to begin with.
- The on-board antenna saves space. Did you build it yourself?
- Soil moisture sensor: I have a rain/freeze sensor input (for this: http://www.lowes.com/pd_172955-74985-57069_0__?productId=1043275) but I think a moisture sensor is also a must. What are you planning to use? I am thinking about using something based on this: http://wemakethings.net/chirp/. I'd probably build something based on that without using the microcontroller he has because the ATmega on the Moteino should be able to take on that job.

I am planning to add a .1 uF in parallel with the big capacitor to try to control a bit of high-frequency noise that I have seen there when the voltage booster is on.

I think I will be done with my redesign soon. Hopefully I'll have to time to finish all this and receive prototype PCBs before watering season goes into full swing.

Speaking of EAGLE work... would you happen to have an updated library part for the Moteino? I have the one you pointed me to previously but it seems like the one you are using now is more polished.

Thanks again for sharing your knowledge and design ideas!

Cheers,

Eloy Paris.-

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #25 on: April 26, 2015, 02:16:30 PM »
Hi Tom,

I've been thinking about this a lot this weekend so I thought I'd share my thoughts on a couple of points...

Eloy,
I'd rather modify your previous design for one very simple reason, I am not confident that a 3.3V processor can reliably drive your N channel transistors.

Right, this is something that I overlooked big time. Thanks for pointing that out to me. However, I rather use different transistors so I can drive the N-channel transistors from a 3.3V signal than figuring out a way to keep the initial transistors that I chose *and* drive them from 3.3V.

Quote

Now, how does that affect your circuit?  In the latest one and the previous one you're driving the N transistors from the processor and, as I say, I'm not sure that's a good thing.  One thing to notice on the FDS8858 datasheet, however, is that they explicitly show the 'zener' diode between the gate and source pins.  This implies that you can reliably overdrive if you current limit and I think that's a safe bet, especially given that the Vgs breakdown is 20V for the N device.

This is the other thing that has kept me thinking all weekend -- I did see the clamping zener diodes in the FDS8858CZ data sheet but the data sheet also says that the +/- 20V VGS is a maximum. I suspect the transistor might get destroyed if the VGS voltage exceeds the maximum indicated in the data sheet. I have an open query with the manufacturer to see what they say regarding exceeding that voltage even with the clamping diodes there but I think they'll say the value is what the data sheet says it is, i.e. the maximum value, after which the transistor can be destroyed.

Quote
So, on your various implementations:
1. for your original, I would simply put a 10K resistor in series with all the gates.  This will limit the current at breakdown but still provide enough drive on the P channel gate.

Resistors in series with the gates would still not protect them against voltages exceeding the maximum VGS voltage, right? If so, I rather not use this implementation.

Quote
2. for your circuit #2, I'd change R19 and R22 to a much higher value so that your P channel gate doesn't get cut off too soon as VBoost collapses (right now it only gets 1/2 of VBoost).  For the N channels, cross couple like I did but use 10K resistors in series with the gates.

Right, I did not do any work to calculate the right values for the voltage divider resistors. This design could work if I find a transistor that can be driven with 3.3 volts.

Quote
3. for your circuit #3, Uh, don't do this one... unless, as I said, the processor is 5V.

This design is the one that I like the best because it uses one less transistor. However, I would need to use different transistors for the H-bridge, as you helped me realize, but I am perfectly fine with that. The way I see it, at this stage, it is better to scrap a flawed design and start over than trying to make the flawed design work.

Thanks again for your insight and ideas.

Cheers,

Eloy Paris.-

TomWS

  • Hero Member
  • *****
  • Posts: 1925
Re: Driving watering electronic timer with Moteino
« Reply #26 on: April 26, 2015, 03:42:16 PM »
<snip>I have not had a chance to do live tests using a boosted voltage greater than 18 volts but in the few tests that I have done things seems to have worked well when using 22 volts. I started to use 22 volts for testing without water after you posted the oscilloscope traces for your broken integrated timer/valve.
You've made me realize that there is a flaw in my measurements!  I had been thinking that this solenoid valve is merely a low cost version of what I've been using, but your comment about testing without water reminded me that there is a FUNDAMENTAL difference between these two solenoids!  The Hunter solenoid, like virtually all commercial solenoids have a diaphram/gasket, that isolates the plunger from the water.  The Orbit plunger is in contact with the water and, as a result, the timing on the plunger is going to be affected by the viscosity of the water and any crud that's built up over the years.   If you do use this valve, I wouldn't use it at anything less than 24V and 2000uF.  I'm beginning to ask myself if I want to bother with the Orbit...
Quote

I like it! I see that you put a voltage divider to bring down the voltage used to drive the P-channel transistors. Great!
The resistors on the gate are really to current limit the gate voltage when On, and bias off the transistor when Off - not really a voltage divider (hence the large difference in resistance.
Quote
<snip>
For some reason that dual N-channel/P-channel that you are planning to use is not showing up in my search at mouser.com.
Mouser PN: 781-SI4564DY-T1-GE3, http://www.mouser.com/ProductDetail/Vishay/SI4564DY-T1-GE3

The N-Channel discrete I'm looking at is: http://www.mouser.com/ProductDetail/Vishay/SI2356DS-T1-GE3, and P Channel is: http://www.mouser.com/ProductDetail/Vishay/SI2319CDS-T1-GE3

All 40V parts...

Quote
<snip>
- The on-board antenna saves space. Did you build it yourself?
- Soil moisture sensor: I have a rain/freeze sensor input (for this: http://www.lowes.com/pd_172955-74985-57069_0__?productId=1043275) but I think a moisture sensor is also a must. What are you planning to use? I am thinking about using something based on this: http://wemakethings.net/chirp/.
The antenna I used on this prototype was a commercial one that I bought from Linx Technologies a while ago.  But winding your own is pretty easy.

LOL on the Lowes 'digital rain/freeze sensor'!  Did you ever take one of those apart?  They have a fiber washer that expands when its wet and contracts when it dries and probably expands when it freezes.  The expanding washer pushes the conductive washer on the top of it to close a circuit. You adjust the 'rainfall amount' by mechanically changing the gap between the contacts...

The Soil Moisture circuit, which you perceptively noticed the hooks in this updated schematic, is one I've used for years.  It is very reliable although you won't like the price of the probe (WaterMark Soil Sensor http://www.irrometer.com/pdf/sensors/403%20Sensor%20%20Web5.pdf).  If you're nice to me I just might send the other page of the schematic...  :D 
Actually I had planned to post my individual moisture sensor this past week but had a mishap that prevented that posting (I accidentally got the insides wet and it crapped out after a day!)  It's going back on the 'air' today.  If all is well over the next couple of days I'll be posting that.  The new Sprinkler Valve circuit has this and a ground temperature probe included...

Quote
Speaking of EAGLE work... would you happen to have an updated library part for the Moteino? I have the one you pointed me to previously but it seems like the one you are using now is more polished.

My latest library is attached below...

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #27 on: April 26, 2015, 05:05:08 PM »
Hi Tom!

You've made me realize that there is a flaw in my measurements!  I had been thinking that this solenoid valve is merely a low cost version of what I've been using, but your comment about testing without water reminded me that there is a FUNDAMENTAL difference between these two solenoids!  The Hunter solenoid, like virtually all commercial solenoids have a diaphram/gasket, that isolates the plunger from the water.  The Orbit plunger is in contact with the water and, as a result, the timing on the plunger is going to be affected by the viscosity of the water and any crud that's built up over the years.   If you do use this valve, I wouldn't use it at anything less than 24V and 2000uF.  I'm beginning to ask myself if I want to bother with the Orbit...

I don't have experience with other solenoid valves but I understand the Orbit valves are low cost, perhaps not the best quality. The old Orbit valves (the ones with two solenoids) lasted a few years. I don't know about these new ones because this would be the first season that I use them. I did have one go bad after almost no use, but Orbit replaced it promptly. As always, we get what we pay for, i.e. cheap probably means not very good quality. I like that I can go to Lowe's and find them there and that they come with a 5-year warranty.

(Yes, I am planning to keep the 2,200 uF capacitor and I'll drive the solenoids with at least 22 volts, just like the Orbit timer does.)

Quote
The resistors on the gate are really to current limit the gate voltage when On, and bias off the transistor when Off - not really a voltage divider (hence the large difference in resistance.

Hhhhmmm. I'll have to think about this some more. I thought we want to keep the VGS voltage under the maximum specified in the data sheets to prevent damage to the transistor, and the "voltage divider" was a way to accomplish that. I have not (perhaps incorrectly) worried about current into the gate because of the very high impedance at the gate. But I have worried a lot about VGS voltage, as you've probably noticed by now.

Quote
Mouser PN: 781-SI4564DY-T1-GE3, http://www.mouser.com/ProductDetail/Vishay/SI4564DY-T1-GE3

I am sorry, what I meant is that when I use their tool to search for transistors matching certain criteria (like dual transistors, VDS > 30V, SOIC-8, etc.), this specific dual N-channel/P-channel transistor does not show up in the search results. I do see several options (about 40 in total) but not the Vishay that you are looking at. It's possible that a classification field is missing and that causes this part to not be included in the results.

By the way, that dual transistor in SOIC-8 that you are looking at looks great. I see the low VGS threshold as well as some key data sheet graphs that you have pointed out before and can see how one should be able to drive them with 3.3V. Nice find; thanks!

Quote
LOL on the Lowes 'digital rain/freeze sensor'!  Did you ever take one of those apart?  They have a fiber washer that expands when its wet and contracts when it dries and probably expands when it freezes.  The expanding washer pushes the conductive washer on the top of it to close a circuit. You adjust the 'rainfall amount' by mechanically changing the gap between the contacts...

I haven't taken it apart but a friend once did. I did suspect that its operation is very "mechanical" and simple. I think soil moisture is a better way to determine when to water but the rain sensor is relatively cheap so I installed one.

Quote
If you're nice to me I just might send the other page of the schematic...  :D 

I'll get you a bottle of wine sometime ;-)

Quote
My latest library is attached below...

Wonderful; thanks a lot!

Cheers,

Eloy Paris.-

TomWS

  • Hero Member
  • *****
  • Posts: 1925
Re: Driving watering electronic timer with Moteino
« Reply #28 on: April 26, 2015, 05:31:04 PM »
<snip>

Quote
The resistors on the gate are really to current limit the gate voltage when On, and bias off the transistor when Off - not really a voltage divider (hence the large difference in resistance.

Hhhhmmm. I'll have to think about this some more. I thought we want to keep the VGS voltage under the maximum specified in the data sheets to prevent damage to the transistor, and the "voltage divider" was a way to accomplish that. I have not (perhaps incorrectly) worried about current into the gate because of the very high impedance at the gate. But I have worried a lot about VGS voltage, as you've probably noticed by now.
Well, it IS a Vgs problem.  Once you go past the breakdown voltage, the junction will act like (IS) a zener diode.  The 10K resistors simply keep the current, at breakdown, to a safe level, yet supplies enough current into the junction capacitance to turn on the transistor with sufficient speed.

Quote

I am sorry, what I meant is that when I use their tool to search for transistors matching certain criteria (like dual transistors, VDS > 30V, SOIC-8, etc.), this specific dual N-channel/P-channel transistor does not show up in the search results. I do see several options (about 40 in total) but not the Vishay that you are looking at. It's possible that a classification field is missing and that causes this part to not be included in the results.

By the way, that dual transistor in SOIC-8 that you are looking at looks great. I see the low VGS threshold as well as some key data sheet graphs that you have pointed out before and can see how one should be able to drive them with 3.3V. Nice find; thanks!
Ok, yeah, I understand.  I didn't find it on the Mouser site using their tool either.  I went to the Vishay site and used their selection tool (which isn't great, but at least usable).
I like the part too, it's just more expensive than I'd prefer.


Quote

I'll get you a bottle of wine sometime ;-)


For a bottle of wine you might even get a circuit board!!!   8)

Tom

EloyP

  • Jr. Member
  • **
  • Posts: 58
Re: Driving watering electronic timer with Moteino
« Reply #29 on: May 02, 2015, 10:22:24 AM »
Hi Tom,


[...]

Now, how does that affect your circuit?  In the latest one and the previous one you're driving the N transistors from the processor and, as I say, I'm not sure that's a good thing.  One thing to notice on the FDS8858 datasheet, however, is that they explicitly show the 'zener' diode between the gate and source pins.  This implies that you can reliably overdrive if you current limit and I think that's a safe bet, especially given that the Vgs breakdown is 20V for the N device.

This is the other thing that has kept me thinking all weekend -- I did see the clamping zener diodes in the FDS8858CZ data sheet but the data sheet also says that the +/- 20V VGS is a maximum. I suspect the transistor might get destroyed if the VGS voltage exceeds the maximum indicated in the data sheet. I have an open query with the manufacturer to see what they say regarding exceeding that voltage even with the clamping diodes there but I think they'll say the value is what the data sheet says it is, i.e. the maximum value, after which the transistor can be destroyed.

I finally heard back from Fairchild Semiconductor regarding this so I thought I'd share. My question was:

Quote
Would it be okay to drive the N-Channel MOSFET of the FDS8858CZ with                                 
 a VGS voltage of around 25 VDC? Data sheet says the max. VGS is +/-                                 
 20V but the pinout also shows Zener diodes between gate and source.                                 
 What would happen if VGS exceeds 20V? Would a resistor in series with                               
 the gate allow to exceed 20V? Thanks in advance for the                                             
 clarification.

Their response was:

Quote
Not recommended to exceed gate input specification even with gate                                   
zener. Zener can easily be damaged with any current. Zener is more of an esd                               
protection device than something to carry continuous current.

This is not a problem anymore because I am now going to use different transistors that I will drive directly from a 3.3V ATmega I/O pin (the same transistors and driver circuit you came up with for your design).

Cheers,

Eloy Paris.-