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



Laser Pointer Store

Datalogging? On MY Scientech?

MarioMaster

Well-known member
Joined
Jul 27, 2007
Messages
3,643
Likes
187
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.



 

Trevor

Well-known member
Joined
Jul 17, 2009
Messages
4,513
Likes
548
Points
113
You sniffed the data going to the 7-segment display? Nice!

Well done. :D

Trevor
 

ARG

New member
Joined
Feb 27, 2011
Messages
6,987
Likes
575
Points
0
Impressive! I always wondered what would go into putting data logging into a professional meter.
 

ARG

New member
Joined
Feb 27, 2011
Messages
6,987
Likes
575
Points
0
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

New member
Joined
Feb 27, 2011
Messages
6,987
Likes
575
Points
0
Yup ^
Seems to be a problem with Open Source dev boards, the uC's are not cheap.
 

wee40811

New member
Joined
Apr 5, 2010
Messages
196
Likes
26
Points
0
That is actually not entirely true. The STM32F4DISCOVERY board is only $14. And it packed a lot more then Arduino.
 

ARG

New member
Joined
Feb 27, 2011
Messages
6,987
Likes
575
Points
0
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.
 

Hemlock_Mike

Well-known member
Joined
Jan 7, 2007
Messages
6,275
Likes
313
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