Go Down

Topic: Arduino Logic Analyzer Idea to capture data (Read 98 times) previous topic - next topic

mrwildbob

Being somewhat new to Arduino, I need some help in figuring out the way I should go about making a logic analyzer to be able to capture data and output to console.  What I would like to do is read the packet and convert the data to 1's and 0's on the console.  That way I can dump it to a text file and compare the results.  I know the output is not a standard protocol.

The device outputs on 2 wires (DATA and GND) a packet about 2-3 times a second.  I am trying to log the data to to see the changes in the different packets.  The output is 5v.  I used my oscilloscope and I am able to see the packets, problem is, I can not keep up with the decoding.  I was able to capture one packet and figured out there was 550 bytes or transitions.  The smallest pulse shows to be about 4ms.

I am thinking I need something to trigger when it sees the packet, then read the data and output to console. 

Any help would be great.

Thanks

boB

robtillaart

most important is that you need to know how the bits are coded. Are zero and one bits equal in length or unequal?
In case 1 you need to sample the data line with a fixed frequency to see what the value is
In case 2 you need to measure the duration of each pulse

can you post a picture of a (partial) shot of teh scope?
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

chucktodd

Being somewhat new to Arduino, I need some help in figuring out the way I should go about making a logic analyzer to be able to capture data and output to console.  What I would like to do is read the packet and convert the data to 1's and 0's on the console.  That way I can dump it to a text file and compare the results.  I know the output is not a standard protocol.

Bob,
 try this Arduino Logic Analyzer

And here is the OLS JAVA client Software

They work just fine for me,  I use a Mega2560 as the Probe, 7k of sample data at 4mhz is the max,  If you need more Dangerous Prototypes Logic Sniffer has more depth and speed for $50. 200Mhz, 216k (8bit)

Chuck.


Check out my Kickstarter Project Memory Panes an expansion RAM Shield for Mega2560's.  It adds 1MB of RAM for those projects where 8KB is not enough.

mrwildbob

most important is that you need to know how the bits are coded. Are zero and one bits equal in length or unequal?
In case 1 you need to sample the data line with a fixed frequency to see what the value is
In case 2 you need to measure the duration of each pulse

can you post a picture of a (partial) shot of teh scope?
Hello Rob,

I took your advice and got some results.  Thanks for the help.  What I ended up doing was measuring the packet with my Saleae Logic Analyzer and found the shortest pulse at 420uS.  The data is variable in length.    I was able to come up with my data packets.

Then I wrote a simple sketch to monitor a digital input pin and use a delay of 420uS and read the input in a loop.  Then I wrote the value to the console.  Now, I can get fairly accurate information.  To take things a step further, I would like to be able to only output to the console when data is present ie. trigger.  There is about a 1/2 second between packets and outputs logic 0's between packets.  What would be the best way to monitor the pin and as soon as the packet starts, it will then output only the packet to console?

boB



 

mrwildbob

Chuck,  That is some good information.  I am going to look into it.  Thanks

boB

Bob,
 try this Arduino Logic Analyzer

And here is the OLS JAVA client Software

They work just fine for me,  I use a Mega2560 as the Probe, 7k of sample data at 4mhz is the max,  If you need more Dangerous Prototypes Logic Sniffer has more depth and speed for $50. 200Mhz, 216k (8bit)

Chuck.


Check out my Kickstarter Project Memory Panes an expansion RAM Shield for Mega2560's.  It adds 1MB of RAM for those projects where 8KB is not enough.


Go Up