Sep 21 2013
"Poor Man Scope" again
while i work on analog signal output i made a new revision of scope software.
PMS3 is not only new revision of PMS2,
also means i changed from 2 channel to 3 channel.
but while as expected, esp. on arduino it is much slower
i also test a faster code. It is a optional new setting for the ADC for ATMEL AVR ATmega.
( and not tested with different boards... ), but use normal analogRead.
while on the MAX32 i use a fast ASM code ( for one channel only / delaypoint ==0 )
the tuning of the delay values takes lots of time, if i want to reach a specific samplerate...
and the result will change with any change i make in the main sample loop.
and also the documentation is not easy.
But all is based on the microseconds i read back from the cpu between start and end of the batch.
and i have no way to verify any of that Hz. numbers until i can use my scope on a calibrated signal source.
pls see spreadsheet
as default use the arduino or mp IDE build in terminal to just print a line chart
for this a array of 38 is used, a one page thing on my desktop, when right length
of terminal window is adjusted.
pls see the channel numbers 0,1,2 in the chart, where 1,2 are PWM signals,
and 0 a by that created analog signal.
but that chart line pls. not send to processing, only the 3 analog read values,
as for processing scope connected need now 3 columns of 360 samples,
thats not possible from UNO.
pls select by compiler switch
// for chartline (38)
//Binary sketch size: 8,356 bytes (of a 126,976 byte maximum) - 6% used
//Minimum Memory usage: 1,119 bytes
// for processing (360)
//Binary sketch size: 8,362 bytes (of a 126,976 byte maximum) - 6% used
//Minimum Memory usage: 3,050 bytes
using a PWM signal from arduino UNO
D5 10% ( on channel 1 )
D6 50% ( on channel 2 )
D7 HIGH ( on channel 3 )
and the PMS3 on the arduino mega 1280
see 3 channel with 15kHz, and 1 channel with 35kHz
now i copy the PMS3 arduino code back to MPIDE and rename to .pde
and download to MAX32 board,
connect UNO Douts via a UNO 10k MAX32 10k gnd voltage divider
and start same processing software ( with a new serial port adjusted )
left again 15kHz, right 520kHz
UPS: it shows 3.5V for the UNO pulses.
while i already adjust the 3v3 range in MAX32, and the 2 for the voltage divider
to show 5V signals ( then the range is actually 6v6. )
in the controller code, ( and if adjusted there correct automatically the voltage output in the chart line is correct,
the processing don't know what is connected and what the values means.
in revision you now can adjust this too.
// ARDUINO UNO , MEGA
//float Vrange =5.0; // Volt for UNO...
//int Vlines = 5; // divs for UNO data
float Vrange =6.6; // Volt for MAX32 3v3 with voltage divider 10k 10k
int Vlines = 7; // used for number of division lines AND for multiplier calc
float Vresolution = 1023*Vlines/Vrange;
and the setup:
in Rev 3.2 there is a new button layout,
the SAVE to dataX.csv for each of the 3 channel.
the Channel button only at Channel3, so you can see: A0,A1,A(0 ..5)
and the ( latest ) PMS3 code
follow up here