Roadracing Sidecar Data Acquisition system

It's time to put this on. I've been working on it (on and off) for a year now. It is now wired prototype, looking into PC board making.
Using Propeller Project Board USB
Initial schematics were done by point to point tables, working on schematics for PC generation
Questions and coments are more than welcome, need to keep my brain fresh.

Data logging for Roadracing sidecar.
By Rick Murray, RGM Engineering
Requirements: Use Parallax products wherever possible, Use Spin if possible
Use existing code where possible,
Requirements:
Display for development will be on Composite CRT Done
Build 3 channel pulse generator (555s) and 8 channel Analog test box Done
1. 8 Analog (Use MCP3208 for A/D) Analog Values are 12bit (0-4095) (0v-5v)
    a. Oil Pressure (0-100Psi)                                                      Done 
    b. Oil Temperature                                                             Done
    c. Water Temperature                                                            Done
    d. Throttle position (0-100%)                                                   Done
    e. Air box pressure (-5 to +5)                                                  Done
    f.  TBD                                                                                  Done                        
    g. TBD                                                                                  Done
    h. TBD                                                                                  Done
2. 3 speed inputs (using counters) Each counter in own COG (Use 3 bits input)
    a. Front wheel (7Hz-300Hz) Done
    b. Rear Wheel (7Hz-300Hz) Done
    c. Engine RPM (8Hz-120Hz) Done
3. Digital outputs (LED Display in helmet)
    a. Rear wheel slip (exceeds percentage) Green <5%, Yellow >5%<9%, Blue >9%.
    b. Shift point (Flashing RED) Adjustable RPM setpoint
    c. Convert Front Wheel pulses to OEM Dashboard Speedo Done
4. Digital Inputs
    a. 3 axis acceleration (Using MMA 7455) Done
    b. Lap time marker with Existing Infrared unit {Drack}) down to 100ths/sec Need to use counter? Or perhaps GPS positions?
5. GPS Info (Using VPN1513) New Firmware from Forums Done
   a. Time (Time/Date)
   b. GPS Speed
   c. Long/Lat/ALt/dir/etc
   d. Run in own cog
6. Local storage of data (2GB SD?) 32 file entries in Root OK, use fsrw object? Uses Excel format on SD card 
7. Recording starts and stops at 5 MPH or by switch selection. 
8. Data recovery and display.
At this point, system uses 8 cogs and about 60% ram, Execution loop is 100ms per sample (all) and time in use is 40-50 ms.
Complete Debug display cannot be uses as same time as SD card recording (not enough time)

Comments

  • 13 Comments sorted by Date Added Votes
  • shimniokshimniok Posts: 177
    edited December 2012 Vote Up0Vote Down
    That sounds really cool! I'd love it if you'd post more detail on how you handled each of those problems...

    So, I had to look up "roadracing sidecar" as I've never heard of it before... you mean this?

    side_car_champs.jpg
    Check out my eeZee Propeller Breakout Board

    Michael Shimniok | www.bot-thoughts.com | "It should work..."
  • sidecar-racersidecar-racer Posts: 71
    edited December 2012 Vote Up0Vote Down
    Yes, that's correct. Ours looks just like that but different color. We do some roadracing still but main efforts now are for Bonneville Land Speed Record (our record is 155.5mph)
    I'm going to do a discription on each major module starting with the SD card system. It'll give me a chance to review my docs.
    I had intended to use some of the resources on the VPM1513 GPS but I think now I may use a faster refresh GPS and a second Prop with one Prop doing DataAq and the other process and storage.
  • prof_brainoprof_braino Posts: 4,312
    edited December 2012 Vote Up0Vote Down
    Totally cool. Insanely dangerous, even cooler.

    Are you going to add more cogs or props, or will the remaining functionality fit in the rig you have?
  • sidecar-racersidecar-racer Posts: 71
    edited December 2012 Vote Up0Vote Down
    I used the VPN1513 with the thought of needing a second prop. Still could do that in hand wiring. Now that I'm considering a faster GPS module, a second prop seems reasonable. Probably use one prop for raw data acquisition and the other for data conversion/storage/transmission

    *** _readme_.txt *** (sorry about formatting, better way?)
    RoadRacing Sidecar Data Acquisition
    12/22/12
    RGM Engineering
    Included Objects :
    dataacq_demo_5
    |
    +-----sparecogs
    |
    +-----mirror_TV_text
    | |
    | +-----mirror_TV
    |
    +-----fsrw
    | |
    | +-----safe_spi
    |
    +-----MCP3208
    |
    +-----simple_serial
    |
    +-----simple_numbers
    |
    +-----PSB_I2C_driver (for 3-axis sensor)
    
    All the above modules are from OBEX
    
    In Main:
    PRI GPS
    Serial access to VPN1513 GPS
    FRONT
    Convert 6 pulses/wheel rev to MPH
    tweak MPH to match OEM dashboard 
    REAR
    Convert 6 pulses/wheel rev to MPH
    RPM
    Convert engine pulses to RPM
    
    **********
    Notes: 1. all data is global
    2. Excel format records are created by making spreadsheet with only the column names and saving it as CSV file.
    This single record is put in a DAT string.
    Main fills a second DAT string with recorded data at proper byte locations every 100ms
    Main writes DAT string record to SD if debug is off and front wheel speed is over 5mph.
    As long as system is running, filename is incremented whenever speed drops below 5mph.
    File Limits: 2GB, FAT32, 32 file names. More than enough for project.
  • prof_brainoprof_braino Posts: 4,312
    edited December 2012 Vote Up0Vote Down
    Use the Go Advanced button when editing, and find the button with # to put [ code ] tags in front and [ /code ] behind the source code

    Also, you can edit you previous posts and fixes the numbering etc using the same go advanced button

    Are you using SPIN or pasm? I guess you are using SPIN. There are some other options that are less widely used, but can have certain advantages.
  • sidecar-racersidecar-racer Posts: 71
    edited December 2012 Vote Up0Vote Down
    Yes, I am using Spin. I got out of heavy programming about the time C began (!!). So, learning Spin seemed the quickest way. So far performance has not been an issue.
    The configuration of the VPN1513 GPS is serial request for data; speed, date, time, etc, with a serial response. By expanding that code with requests for analog, digital, etc, seems like I could do one prop for processing and one for acquistion.
  • sidecar-racersidecar-racer Posts: 71
    edited January 2013 Vote Up0Vote Down
    I've run into a problem with GPS (runs for 1-2 minutes then stops updating), but will post what was working.

    Two pieces probable of interest are;
    1. Frequency counters (one counter, one cog) in spin,
    2. Main code body which uses existiing OBEX objects.

    Attached are pictures of unit. I'm going to put it in machine to test "real-world" conditions.
    Top board with terminals contains the analog filters
    Bottom board contains everything else.
    This fits in a Parallax box, you can see the bottom peeking out underneath.
    DSCN0012.jpg
    DSCN0011.jpg
    1024 x 768 - 157K
    1024 x 768 - 124K
  • sidecar-racersidecar-racer Posts: 71
    edited January 2013 Vote Up0Vote Down
    Attached is main routine. All externals are from Parallax
    Here is a picture of our outfit, race garage at Miller Raceway

    DSCN0028.jpg
    1024 x 768 - 88K
  • sidecar-racersidecar-racer Posts: 71
    edited October 2013 Vote Up0Vote Down
    Well, we're back after long medical outage. Still plan on racing:smile:
    Now for technical question;
    We're using fsrw2.6 and generating up to 32 files of csv data (telemetry varibles).
    When speed goes below 5 mph file closes, back above 5mph, new file opens (date & time stamp still in progress, getting that from GPS).
    What we need is a piece that runs in prop that allows copying these files to PC for display, etc.
    We've spend time goiing through site and haven't found anything.
    Rick & Nida Murray
  • prof_brainoprof_braino Posts: 4,312
    edited October 2013 Vote Up0Vote Down
    Well, we're back after long medical outage. Still plan on racing:smile:

    I hope it wasn't racing related?
    Now for technical question;
    We're using fsrw2.6 and generating up to 32 files of csv data (telemetry varibles).

    Is that 32 FILES or is it 32 pieces of daya in each record? There is a limit how much data you can send, and opening and closing files add to the overhead.
    When speed goes below 5 mph file closes, back above 5mph, new file opens (date & time stamp still in progress, getting that from GPS).
    What we need is a piece that runs in prop that allows copying these files to PC for display, etc.
    We've spend time goiing through site and haven't found anything.
    Rick & Nida Murray

    If you can stand FORTH, the logger package supports writing records fairly quickly, about 30 records per second, in the demo. Each cog can have its own currently open file, and swtiching to a new file isn't too bad. You can send it off to the PC using bluetooth terminal.
  • sidecar-racersidecar-racer Posts: 71
    edited October 2013 Vote Up0Vote Down
    No, just age related :)
    It is up to 32 files (fsrw limit), size of file is based on run time; about 150 bytes/record, records are created every 100ms of run time. My spin code does use all 8 cogs, but I can shut down the ones associated with data acquistion when pulling records. The entire system uses about 40% of 100ms cycle time while recording, doesn't really matter how long it takes to "download" files, kinda figured to start with usb port, then bluetooth or wireless.
    Rick
  • Moved to Customer Projects
Sign In or Register to comment.