Servo freedom
Erlend
Posts: 612
Part of one of my projects is a propane burner, where a servo controls the throttle. An electric igniter lights the flame as the throttle is opened, and an UV Flame Detector is used to detect flame-out to close off the gas in such instance. Despite all the faith i have in the Propeller and in my own programming, I would prefer it to be possible to manually turn the knob on the gas burner in case of emergency. That would mean that the servo has to be powered down between operations, so that it does not 'protest'.
My simple idea is to modify the servo-control routines such that before and after sending pulses a separate DO controls a MOSFET which controls the power to the servo. It needs one I/O pin, but I can see no other solution.
Ideas anyone? - or cautions?
Erlend
My simple idea is to modify the servo-control routines such that before and after sending pulses a separate DO controls a MOSFET which controls the power to the servo. It needs one I/O pin, but I can see no other solution.
Ideas anyone? - or cautions?
Erlend
Comments
I don't see the advantage of the MOSFET. You still need the software to work correctly to power down the servo don't you? It seems like it would be easier just to stop the servo control cog.
If you don't want to trust the software, you could add a switch on the servo line (either the signal line or power line should work).
Hey Erlend: Yes & yes. I have built a few fire related devices. Will this ever run unattended? Bad idea to try to automate. What if the battery dies and can't turn the gas servo off?
My house has old-school gas heaters with millivolt generators to keep the pilot light going. Pilot light heats the generator (thermopile) to generate 750 millivolts, which is just enough to hold the master gas valve solenoid on. If the pilot goes out, the solenoid releases and shuts off the valve. Extremely reliable, millions have been used.
Having said that, and assuming you will never leave this unattended, is your propane valve a quarter-turn unit? If so, perfect. Get a strong servo that can rotate 180+ degrees, and test it to find out which way it rotates on power-up with no signal applied. Most servos will glitch consistently either CW or CCW. Find one that that will glitch in the direction to turn your valve OFF, for safety's sake.
Now make a mechanical coupler between your servo & valve that allows 90 degrees of travel between CW and CCW rotations, like a dog clutch. Assemble & write your code so that the servo's extreme off position (0 degrees) matches the valve's off position. Off means OFF, and you can't manually turn the gas valve on without backdriving the servo. Any powerup glitch still tries to turn the servo valve further off.
Now when you reverse the servo towards the on position, nothing happens for 90 degrees of dead travel (servo center position). As you drive the servo from 90 to 180 degrees, the clutch dogs engage and the valve turns on. After rotating to full on, always return the servo to the 90 degree center position, which leaves the valve full on, but moves through the dead travel zone to be ready to close the valve by any further motion. From this, you can manually turn the valve off or use the servo.
That 90 degrees of dead travel, coupled with a quarter-turn valve, allows this manual override to work.
]Now make a mechanical coupler between your servo & valve that allows 90 degrees of travel between CW and CCW rotations, like a dog clutch.
.[/QUOTE]
I was just going to suggest a clutch in there because servo gears can be stripped if you try to turn them too fast manually.
This applies to analog servos, but not most digital servos.
Erlend, depending on the application (observable robot in a competition vs an automatic control used in a building), you may need -- and required to have -- a simpler cutout device, such as a bimetallic valve. In a commercial or industrial setting, you'd be expected to use valves that automatically close if power is lost to the rest of the system.
So, really, the "solution" to this depends entirely on your application.
Famous last words! Something about your post made me recall this homeowner's tragic tale: http://www.youtube.com/watch?v=OSJH21WmALc
His house caught fire, and he assures several times that the origin of the fire was a 9-volt battery shorting out. Everyone agrees that the fire was an awful thing for sure, but a few other commenters (and myself) are in doubt about whether a 9V battery was really the source. But the homeowner is very passionate about it, and if nothing else, his video is a useful public safety reminder about the danger of electrical fires in the home.
Better safe than sorry, Erlend!
I was more interested in cautions regarding damaging servo, ending up with a buggy solution, etc.
The propane valve need allmost all of the 180 degrees of available servo turn, and it will not only open/close, but also modulate - i.e. adjust the heat. I was under the impression that a servo without pulses would be unpredictable, therefore the MOSFET to turn on/off the power. If I can achieve the same by just stopping the pulses between operations that would be perfect. Instead of starting a cog for this I would just execute a method in Main, something like MoveTo(servopin, pos), when gas needs to be (occasionally) opened, shut, or regulated. When not active the servo can be quite easily turned without overstressing the gears - I have tried.
In a potential next, industrialised version, there will & must be bimetallic shut-off valves, I agree. I am trained (and real-life scared) in the dangers of fire, including gas fires, so rest assured, I will not do something stupid (- at least not in this regard).
Erlend
Some servos, and their control electronics, can be damaged if they receive control pulses when unpowered. What can happen is that the servo tries to parasitically draw power through the control line. If you are wanting to cut the power line to the servo to remove juice (unnecessary in my opinion), you should also at least protect the control line with a current limiting resistor. Not all servos behave this way, but there are lots and lots out there to know for sure how each will behave.
There are a few reports of this every year, and occasionally the official investigation by the local fire department determines the 9V battery was indeed the culprit. I think it all depends on the type of battery (i.e. non-rechargeable lithium, not uncommon for smoke detectors), the amount of residual current, and any "fuel" nearby. The fire noted here:
http://www.nh.gov/safety/divisions/firesafety/news/20120808-9-volt-batteries.html
was said by the fire department to have been caused by a 9V battery in a junk drawer, that also had a cigarette lighter in it.
As can be seen from the picture it is quite a simple setup.
Erlend