Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Datalogging? On MY Scientech?

Joined
Jul 27, 2007
Messages
3,642
Points
63
It's more likely than you think ;) For the Scientech 36-5002T2 anyway.

This project started as a request that saw my past involvement with LPMs and asked if it was possible to add datalogging to his LPM he ordered from Daguin. I agreed, imagining adding a board I had originally designed for a digital Radiant LPM that was never released.

The LPM arrived, I hooked up the analog output to my test setup and wrote up a basic test program. Then I grabbed a laser and pointed it at the sensor. The results were....bad. The value spiked way up but then rapidly trailed off and continued testing gave unreliable results.

I managed to find a manual for the series of LPMs and found the lovely tidbit in the writeup about the analog output that said effectively that the rear analog output was uncalibrated, it was all done in the processor of the LPM. Also interesting to note is that the series is actually natively datalogging capable, although the option wasn't purchased for this specific meter. I probed the associated output pins of the microcontroller anyway but they were inactive. (along with an unpopulated RS232 transciever chip)

So I decided to change gears; if the data wasn't available as an analog signal perhaps I could snag it digitally somewhere. Sniffing data on the ADC bus was out since it would be prior to calibration (stored in an EPROM on the board). So I looked at the display controller. Looking up the datasheet I found it to use a super simple serial input protocol: the CPU simply sends a string of 35 bits over a synchronous data bus to the display driver chip, the chip then turning out the respective leds in the 7 segment displays on the front of the meter. If I could grab that string of bits as it goes to the display driver I could reconstruct the numeric values and send it to a PC.

So I had a plan. I got out an Arduino from my parts bin and used my soldering iron to tap into the pins on the display controller for the serial data, serial clock and ground. Wrote up some code to grab the bits whenever the data was valid.

I started to receive data, but it wasn't regular and seemed to sometimes skip some updates of the LED display. Hooked up the data lines to my oscilloscope to find that the data was clocked at a pretty fast rate and that there were other devices on that data bus. The Arduino only had a few microseconds to grab the valid data before it flew by. The little atmega168 running at 16MHz just wasn't fast enough to grab the data with the C++ environment overhead of the standard programming language.

I bumped up my CPU horsepower to a Freescale Semiconductor[SIZE=-1] MK20DX128 32 bit [/SIZE][SIZE=-1][SIZE=-1]Cortex-M4[/SIZE] ARM processor clocked at 48 MHz[/SIZE]. Success! Data was being reliably read and I could begin making a bitmap to convert strings of ones and zeros back into decimal numbers from the 7 segment LED format.

cap12.PNG


20131103_143946.jpg
 





Trevor

0
Joined
Jul 17, 2009
Messages
4,386
Points
113
You sniffed the data going to the 7-segment display? Nice!

Well done. :D

Trevor
 

ARG

0
Joined
Feb 27, 2011
Messages
6,772
Points
113
Impressive! I always wondered what would go into putting data logging into a professional meter.
 
Joined
Jul 4, 2012
Messages
2,834
Points
63
Very impressive- wish i had the know how to do stuff like this hehehe :D
 

ARG

0
Joined
Feb 27, 2011
Messages
6,772
Points
113
wish i had the know how to do stuff like this hehehe :D

If you want to start buy an Arduino, a breadboard, a push button, a trimmer resistor and some LED's. You can get all of that at Sparkfun or Adafruit.

It's not hard to start, the Arduino tutorials start at the very basics :)
Check it out! Arduino - Blink
 

ARG

0
Joined
Feb 27, 2011
Messages
6,772
Points
113
Yup ^
Seems to be a problem with Open Source dev boards, the uC's are not cheap.
 
Joined
Apr 5, 2010
Messages
196
Points
0
That is actually not entirely true. The STM32F4DISCOVERY board is only $14. And it packed a lot more then Arduino.
 

Trevor

0
Joined
Jul 17, 2009
Messages
4,386
Points
113
That is actually not entirely true. The STM32F4DISCOVERY board is only $14. And it packed a lot more then Arduino.

Had one since they came out. Great board!

(Mine was free.) :eek:

Trevor
 

ARG

0
Joined
Feb 27, 2011
Messages
6,772
Points
113
That is actually not entirely true. The STM32F4DISCOVERY board is only $14. And it packed a lot more then Arduino.

The uC is $120 per 10 from digikey though :p

I have to buy one of those dev boards, knew I was forgetting something when I did by digikey order.
 
Joined
Jan 7, 2007
Messages
6,309
Points
83
I use one of my Scientech 362's to run my old chart recorder.
The 365's don't seem to work well on analog output.
Guess I'm "OLD SCHOOL" !!!!!!!
HMike
 





Top