Laser Pointers

Laser Pointers (https://laserpointerforums.com/)
-   Laser Measurements (https://laserpointerforums.com/f70/)
-   -   Datalogging? On MY Scientech? (https://laserpointerforums.com/f70/datalogging-my-scientech-86145.html)

MarioMaster 11-03-2013 07:24 PM

Datalogging? On MY Scientech?
 
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 MK20DX128 32 bit Cortex-M4 ARM processor clocked at 48 MHz. 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.

https://dl.dropboxusercontent.com/u/1181169/cap12.PNG

https://dl.dropboxusercontent.com/u/...103_143946.jpg

Trevor 11-03-2013 08:22 PM

Re: Datalogging? On MY Scientech?
 
You sniffed the data going to the 7-segment display? Nice!

Well done. :D

Trevor

ARG 11-03-2013 08:50 PM

Re: Datalogging? On MY Scientech?
 
Impressive! I always wondered what would go into putting data logging into a professional meter.

crazyspaz 11-03-2013 09:15 PM

Re: Datalogging? On MY Scientech?
 
Very impressive- wish i had the know how to do stuff like this hehehe :D

ARG 11-03-2013 10:01 PM

Re: Datalogging? On MY Scientech?
 
Quote:

Originally Posted by crazyspaz (Post 1250492)
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

wee40811 11-03-2013 10:37 PM

Re: Datalogging? On MY Scientech?
 
Are you using Teensy 3.0 for this project?

MarioMaster 11-03-2013 10:40 PM

Re: Datalogging? On MY Scientech?
 
Quote:

Originally Posted by wee40811 (Post 1250501)
Are you using Teensy 3.0 for this project?

Yep, I wish their bootloader was open source, the freescale chips are much cheaper than the higher end Atmel stuff

ARG 11-03-2013 11:08 PM

Re: Datalogging? On MY Scientech?
 
Yup ^
Seems to be a problem with Open Source dev boards, the uC's are not cheap.

wee40811 11-04-2013 12:04 AM

Re: Datalogging? On MY Scientech?
 
That is actually not entirely true. The STM32F4DISCOVERY board is only $14. And it packed a lot more then Arduino.

Trevor 11-04-2013 12:19 AM

Re: Datalogging? On MY Scientech?
 
Quote:

Originally Posted by wee40811 (Post 1250515)
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.) :o

Trevor

ARG 11-04-2013 12:59 AM

Re: Datalogging? On MY Scientech?
 
Quote:

Originally Posted by wee40811 (Post 1250515)
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 11-04-2013 01:15 AM

Re: Datalogging? On MY Scientech?
 
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

MarioMaster 11-11-2013 01:45 AM

Re: Datalogging? On MY Scientech?
 
This LPM is now for sale :)

http://laserpointerforums.com/f39/fs...ing-86268.html

The Lightning Stalker 11-11-2013 02:51 AM

Re: Datalogging? On MY Scientech?
 
When you know asm, anything is possible.


All times are GMT. The time now is 12:19 AM.

Powered by: vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO
Privacy Policy | Advertising Disclaimer | Terms of Use
Copyright (C) 2017 Laser Pointer Forums, LLC