i'm reading a signal that will take any of several values in the 0-3.3v range and i've used up all my analog inputs.
i'd be satisfied to know when the signal goes to 3.3 so in principle i could just hook it up and hope for the best but i seem to recall that giving the avr's sloppy inputs on digital pins is not a good idea. should i use a schmitt trigger gate to clean up the signal? any suggestions on a commonly available part?
i already have an lm358 type op-amp in the signal path so if there is a way to use that or something like it that would be great.
i've googled til i'm blue in the face but i can't tell if i'm overthinking this or what common practice would be.
What kind of asignal you are expecting? High frequency or something between 0 to 100hz, what? And when it should be triggered, if signal is anything between 0 to 3.3V, is 0.01V enough?
thanks, sorry for the imprecision. the input signal is a cyclic stairstep series of values changing maybe 200 hz e.g 0v, 1v, 2.06v, 3.15v then back to 0 and repeating. because i know the sequence i can accept any trigger point as long as i know which it is. now that i look at it the 0v is probably the solidest signal.
first question: is it in fact a bad idea to just feed this to a digital pin?
Hi
If you need only know if the signal is over one level (3 volts for example),of course yo can use one S.Trigger.One very affordable is SN74LS13 and you can use a pot. in the input for make some adjust
just in case
You can put lm358 in comparator mode, with output attached to arduino digital input (directly if OP
powered with +5V), apply input signal on one input and connect second one to the pot. In this case, varying pot "set" point you will change "trigger" level.
From your description it sounds like the 1->0 transistion can only happen at one place in your waveform, so use that as a trigger. The AVR input pins have some hysteresis if I remember correctly so that should help (unless too much noise).
Another approach is using analog multiplexing to free-up some analog input pins.
From your description it sounds like the 1->0 transistion can only happen at one place in your waveform, so use that as a trigger. The AVR input pins have some hysteresis if I remember correctly so that should help (unless too much noise).
if the op-amp circuit works i'll be hoping to push that 1v up to as close to vcc as it will go so yes, i'll trigger there.
it's one of the inputs to a multiplexed LCD from a clock. They use these stairstep waveforms that gyrate around each other to control the voltages across the individual segments. There are 4 backplanes and 8 segment signals all changing every 5ms. I only need one of the backplanes to synchronize with since they are predictable and repetitive. One of the digits (the leading "1") is only ever wholly on or off so i'm using this trick to catch one backplane and that leading segment. That leaves me 6 analog pins to get the 3 other digits at 2 per digit.
it's a crazy way to tell the time but i'm enjoying playing with it and, hey - I've learned that the avr adc's are quite low impedance and how to use an op-amp comparator!