PDA

View Full Version : Voltmeter/Lost model alarm/Glitch counter questions


sp1nm0nkey
Nov 03, 2005, 10:54 PM
I like to dabble in electronics, so I figured it wouldn't be too hard to make a Voltmeter/Lost model alarm/Glitch counter. How does the Glitch Counter algorithm work? Could you watch the input channel to see if it jumped to another position instantainously and too far? How should the lost model alarm work?

As for the Voltmeter, I'd like to power the whole thing with a low voltage AVR. For a 4-pack, I'd like to regulate Vcc to 4.0 volts, and divide pack voltage in half and pass it to the ADC. Would that work?

Thanks for the help,
Evan

flunki
Nov 04, 2005, 02:37 AM
IMHO:

For the glitch counting you will need to verify that the servo pulse does happen every time (frequency) and within the limits (+/- offset). Be aware that the frequency and timing does depend on on the number of channels sent. It could be more easy to just check a single pulse always being within the max offset.

For the voltage check would use a zener or precission voltage reference to "remove" any offset above your ADC input you dont want. Dividing the voltage in half would result into half resolution only.

Rodney
Nov 04, 2005, 12:44 PM
As far as the "lost model alarm" it is wise to have it self powered, i.e. not dependent on the receiver power supply, as the battery is often seperated from the receiver and other electronics in any violent crash. The alarm in essence becomes the preverbial "black Box" and functions independent of anything else other than the input pulse saying everything is okay.

sp1nm0nkey
Nov 04, 2005, 04:00 PM
I meant, I'd like to take the pack voltage, and regulate it to 4.0 volts with a zener to get Vref/Vcc for the ADC. That way, Vref is always below the minimum voltage of the pack and will always remain constant no matter the voltage of the pack. Then, I'd take the pack voltage, run it through a voltage divider and feed it into the ADC so that the input to the ADC would never exceed Vref.

flunki
Nov 04, 2005, 04:39 PM
Yep, should work. Try to avoid the voltage divider in case you want a better resolution. Point to remember: RX providing failsafe features might inhibit your glitch detection. They many times just "re-send" the last valid pulse, some do switch off servo output after reasonable time in case signal is lost. With such RX you only would create a lost model alarm. Like Rodney's idea of self-powered version very much. Some small watch type battery(ies) should do.

dj2u
Nov 07, 2005, 03:08 AM
Try to avoid the voltage divider in case you want a better resolution.
not necessarily true! if your Vref for the ADC is the same as the max voltage after the divider you have the full scale of the ADC.
If Vmax > Vref then it won't work!

Diego

flunki
Nov 07, 2005, 03:41 AM
My brain might be letting me down . . . getting older every day I dont fly.

Vref, should always just a bit more as the max voltage after the divider / offset to be monitored. As you want to monitor a certain range only (never down to zero) / large resolution never can harm do have a different opionin.

As an example lets just guess the ADC works from 0-1.0 Volts and we want to monitor from 5.0 to 4.0 Volts:

Using divider by 5:

In Out
5.0 = 1.0,
4.8 = 0.96
4.6 = 0.92
4.4 = 0.88
4.2 = 0.84
4.0 = 0.8

Alternative, reducing the voltage to be monitored by a certain range (4 Volts):
In Out
5.0 = 1.0
4.8 = 0.8
4.6 = 0.6
4.4 = 0.4
4.2 = 0.2
4.0 = 0.0

Using the divider gives just 20% of possible max resolution . . .

Thats what I like about forums. People can have opinions and can share them with others without getting shot. And I always like to learn something new . . .

dj2u
Nov 07, 2005, 03:50 AM
If you don't start at 0v you will loose precision, wheter you use a divider or not. Except if you use an OP-AMP as an analog frontend to your ADC.

diego

Bearded Flyer
Nov 07, 2005, 06:01 PM
Evan,

I use this http://www.designsoft.com.au/ahome/rc/PIC-LMA/LMA.html as a LMA/Glitch counter. It also has a low voltage alarm although I have not used that function. I was going to design one myself but why re-invent the wheel?

Richard