Shop OBEX P1 Docs P2 Docs Learn Events
Converting data to serial or analog — Parallax Forums

Converting data to serial or analog

Brian SmithBrian Smith Posts: 44
edited 2006-10-26 16:00 in General Discussion
I am working on a data acquisition/display project. When finished, I want to have a small device that logs data to an sd card and displays selected data on its 8 digit led display. I have the display working and I am pleased with it (thanks Nuts n Volts). I have used the maxim 8 digit driver and looked at example code from parallax. Right now it is being used to display heading and speed in my car·and it has been used as a clock(time from gps signal), acurate to the 1/10th of a second (useless, i know·smile.gif ) in my room. The sensors that I currently use are the memsic 2125 2 axis accelerometer (pwm), 2 infrared temperature sensors from melexis·with pwm output and my 5hz serial gps with adjustable baudrate serial output.

So there is an SD data logger that I am considering using, but·input data has to be·one channel·serial data·or·up to 10 ADC channels (im assuming this means the signal needs to be a varying voltage from 0-5??). My gps is serial but my other sensors are not. So I guess I need to either come up with a way of sending all·of these signals in one serial line or convert them all to analog data.·What do you guys think. Is this possible and what is the best way? The whole point of this is to free up signal converting from the stamp and use it to just run the display and a few input buttons. The stamp can't output an analog signal so it wouldn't help with·ADC and it can't output all that serial data fast enough for the logger to reach its full potential. The logger will accept up to 38400 baud so the stamp will really limit its logging speed.

What do you guys/gals think? Is there·some sort of a converter chip out there that·could help me?

The logger is at: http://www.sparkfun.com/commerce/product_info.php?products_id=752

Thanks
Brian

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2006-10-24 13:01
    Had quick look at the SD device. What it does is accept a serial string of information and stores it as a file on the SD card.

    The stamp will read your gps and any other sensors you want to use then send it out to the SD device in the form of a serial string on one pin.See the SEROUT help file. Serial speed is relatively unimportant and a good choice would be 2400 or 4800.

    I used this technique on a research boat and was able to read gps, depth, water temp, water quality measurements, time, battery voltage, plus a bunch of other signals.

    Cheers

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Brian SmithBrian Smith Posts: 44
    edited 2006-10-24 19:41
    Well I would like to log at high frequencies and I dont think I can do that with a stamp alone. It can't do 4 pulsin's one serin and a serout plus run the display fast enough to log data at a high frequency(say 10 to 150 hz). I guess its not the baud rate thats slowing me down, its just trying to do too much at once. Thats why I would like to use·some sort of·chip·to convert the signal.
  • stamptrolstamptrol Posts: 1,731
    edited 2006-10-25 00:16
    Brian, when the SD is configured for ADC use, it doesn't read/store the serial string, from my read of the spec.

    Are you doing something with all that data in real time? Also, is your gps really calculating a new position at the 5HZ rate? You may have to trade off some speed of updates in exchange for a system that has time to do the real-world stuff. Any chance of more detail of the overall project?

    With so much data being stored, there must be some off-line processing afterwards,no? How about using two SD units; one set to store the gps data via serial communication and one set to do the ADC stuff. During post processing, you would use the time track to sync the readings.

    Or, is realtime control the over-riding concern in which case, more processing power (maybe a Propeller) may be the answer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • Brian SmithBrian Smith Posts: 44
    edited 2006-10-25 18:02
    Yes the logger only logs serial data or (not and)·up to 10 ADC chanels at a time.

    The only real time thing I am doing with the data is displaying it and that only needs to be at 1 or 2 hz.

    Yes the gps is actually sending a new set of data (velocity, position ect.)·5 times a second. Its a garmin gps-18 5hz.

    The project is just a data logger and display primarily for use in·testing cars. I can post a concept picture of it when I get to my home computer. I have been using stampDAQ to log raw data into excell in order to get reasonable sample rates (5 hz or less). This requires a laptop to be in the car and swapping it for a card reader would save me a lot of hassle. After the data is in excell i use equations to turn it into actual values and then graph. I know very little about the propeller but would be willing to give it a try. I just learned the BS2 last summer using "What is a Microcontroller", so the propeller may be over my head...
  • Brian SmithBrian Smith Posts: 44
    edited 2006-10-26 01:43
    This is the first time I have uploaded pictures here so I hope·I do it right. They were drawn in solidworks. There are three circuit boards. The top one is the display board with leds and maxim driver. This board is fully designed and I·plan to etch it myself.·The middle board isnt really designed but·may hold the stamp, serial port, voltage regulator and any other ic's i decide to use. The bottom board is the sd logger. Two of the top buttons go to the logger and the other two are stamp inputs. The plan is to have a display code that can show one of·four programed modes and light the coresponding blue led.

    Brian

    Post Edited (Brian Smith) : 10/26/2006 1:53:09 AM GMT
    1400 x 1050 - 76K
    1400 x 1050 - 100K
    1400 x 1050 - 97K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-10-26 16:00
    Brian,
    ·
    ·· I like the planning that went into the sandwiching of these boards together…I recently did the same thing with two boards that were made at different times but designed to sandwich together.· The project will be posted soon, but the concept is the top board is the display board while the main PCB underneath is the controller board and also contains the MAX7219 driver for the display.· I didn’t use conventional headers/sockets for my connection though as you can see.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    1304 x 976 - 124K
Sign In or Register to comment.