wullschj:
- More speed/bandwidth (may or may not be possible)
i know. but it's not possible.
"It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second."
Maybe not with the Arduino alone - but what about an externally clocked RAM (with separate ADC)? Ok - I'll admit I'm not super-serious on this; its well outside the scope of the project...
wullschj:
2) Allow for negative voltage readings
what do you mean? just draw a scale from -5 (input=0) to 0 (input=1024)?
Well, I mean allow for a true AC signal (from -2.5V to +2.5V) to be input (centered around 0 volts) - what you'd have to do then is bias the signal to raise it above the 0 volt threshold to sample it with the ADC - then alter the display output labels, of course.
wullschj:
3) How about a second channel (will reduce sampling speed in half, probably)
yes, it would be nice to have. and yes, it will cut speed in half.
3b) Of course, adding things like A+B,
yes, that would be possible. are thing like that important? (i'm not an expert on oscilloscope...)
It can be useful in some cases - you can use it for filtering (subtracting out noise and such), or other things like have one channel control the vertical component while the other controls the horizontal (you can then draw Lissajous patterns, which can be used to test components with - if you add on an "octopus interface").
wullschj:
3c) triggering and such (just like a real scope)
the code already has a (simple kind of) triggering: at the beginning, it waits for a while until the voltage crosses from below the average voltage to above the average voltage. what other kind of triggering would be nice to have?
Well - allow the user to set the voltage to trigger on, or to set the trigger on positive change vs negative change (or both). Also - if you are doing dual channels, then triggering on one channel while sampling the other could be useful (or trigger on a digital input?).
wullschj:
4) Can the resolution be increased?
of the screen? i guess not.
It just didn't look like you were using the highest res of the TVOut library, but maybe that's just me...
wullschj:
5) How about a different scope - a digital analyzer scope?
how would that work? just display 0 or 1 for different inputs? yes, maybe that would be nice to have. it might even be possible to get higher rates (reading digital is much faster than analog)
Yeah - just look for highs and lows on a digital port (do a port-based sample), and plot each over time as a square wave. Allow for triggering on one or more of the pins (maybe also allow for definable binary pattern triggering)...
wullschj:
6) Storage and Recall of sample data?
yes, that would be nice, but the RAM on an arduino seems to be pretty limited, especially since TVout already takes its part. (i once added another int array of size 100 and TVout didn't like it as i started to write into its memory!) so i guess that will not be possible.
I was thinking of an SD card (as was mentioned), or perhaps using an external I2C/SPI EEPROM or flash memory for such data. It also sounds like with the TVOut library, you're on the edge of what is possible code-wise anyhow (you'd have to work hard to get all of the extra features I noted put into place on it)...