Announcement

Collapse
No announcement yet.

Raspberry Pi Datalogger

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Been looking at these for a while, would be great to implement this with a VFD or small TFT, they can be had on ebay very cheap, purely to display usefull data from obd source. Small enough to be a seperate unit.

    Something like this..

    http://www.ebay.co.uk/itm/1210046072...84.m1438.l2649

    Or

    http://www.ebay.co.uk/itm/2210371761...84.m1438.l2649

    How easy would it be to program? Could it be run without an operating system?

    Comment


    • #17
      Originally posted by Greg_S View Post
      Defintely have a look at the twitterbootstrap as this could be an elegant way of serving up alot of the more static content without needing a full LAMP stack behind it. Certainly be worth looking at getting it ported. I came across pyOBD library a while back but havent had the opportunity to do anymore with it
      Yes jqueryui/bootstrap is exactly the kind of thing i was thinking for a gui. The nice think about the pi is the flexibility with either a directly attached HDMI monitor (you could launch a browser on the pi) or using a device over LAN/wifi with HTTP.

      I've not looked at pyOBD, but my primary aim is to log data from prj's fast diagnostics mode which i'll be using on my ECU soon and comes through the OBD serial interface. Integrating the "stock" OBD data will likely be a separate concern and i expect it will encounter problems due to the **** speed it runs at (ever tried logging a run from VAGCOM, it always bombs out for me).

      I have the serial spec from Zeitronix, so that looks like a good starting point to mock up some code when i get the S2 back on the driveway.
      S2Forum.com Administrator

      Comment


      • #18
        I've compiled node.js with socket.io on the RPi and written a GPS relay server on node.js and a simple client.. this is good because it means we get push through a browser with WebSockets in HTML5, as the classic request/reply HTTP isn't going to work with AJAX requests > 1rps.

        My demo has the node.js app listening to the GPS device and pushing any data to any clients. It will be easy to log this behind the scenes to a database as well, regardless of what clients are listening.
        S2Forum.com Administrator

        Comment


        • #19
          I have the nodejs code connected and listening to the Zeitronix serial interface, and should be parsing the data correctly... i just need to the car back to test it.

          In the meantime i've thought up with a switching mechanism to turn it on/off along with the car using the GPIO and buttons on the dash.

          I've also had a simple DC-DC converter knocked up to power the pi and the usb hub running the peripheral usb devices from the car.

          S2Forum.com Administrator

          Comment


          • #20
            I also knocked up a jquery plugin to display gauges... works well and is very configurable

            https://github.com/andyburton/Sonic-Gauge

            S2Forum.com Administrator

            Comment


            • #21
              Just wow... this is super cool.

              Eagerly awaiting results, looks like just the sort of thing I'd like to include on my build.

              Keep up the good work and progress updates!!!!
              Find me on Instagram @pry4sno
              2010 Golf Sportwagen TDI /// #farmenwagen
              2002 Dodge Ram 2500 24v Cummins 4x4
              1992 80q 20v /// Eventual AAN'd Winter Sled
              1990 Cq /// Project: Because Racecar

              Comment


              • #22
                Man and i thought talking to software developers was challenging... electronics engineers are a different breed all together!!

                I think i understand most of this... there is a rough design for a graceful shutdown button (shutdown -h now) on the RPi to shutdown the OS through its GPIO interface, and an LED status indicator so you know if the thing is running.

                Also a power button with some circuitry to auto power down and reset the button after the shutdown request.

                Should mean a simple case of "push button to power on" and then "push button to shutdown", all dealt with gracefully behind the scenes.

                I was originally thinking to power the RPi up with the car, and auto shutdown along with the ignition, but then i like the flexibility of being able to have it running independent from the ignition, and at times i might not want it running.

                S2Forum.com Administrator

                Comment


                • #23
                  Already have a working demo.. nice!

                  The LED lights up when you hit the button, then auto turns off after 5s

                  S2Forum.com Administrator

                  Comment


                  • #24
                    Graceful OS shutdown button working...



                    shutdown.py

                    Code:
                    import RPi.GPIO as GPIO
                    import os
                    
                    # Use GPIO numbers not pin numbers
                    
                    GPIO.setmode (GPIO.BCM)
                    
                    # Setup channel 11 as input
                    
                    GPIO.setup (11, GPIO.IN, pull_up_down=GPIO.PUD_UP)
                    
                    # Wait for falling edge on pin 11
                    
                    GPIO.wait_for_edge (11, GPIO.FALLING)
                    
                    # Shutdown when the button is pressed
                    
                    os.system ("sudo shutdown -h now")
                    S2Forum.com Administrator

                    Comment


                    • #25
                      will it boot up OK if it was not shutdown nicely? a friend is building an audio streamer based on the pi, and he experienced problems is power was cut without proper shutdown (forgot the details).

                      Comment


                      • #26
                        Short term I think it would be fine, but long term there is a lot of housekeeping performed with a graceful shutdown , which can prevent filesystem problems, especially if you run other daemons/services .
                        Eric

                        95 S2 Avant under rebuild.

                        Comment


                        • #27
                          I have pulled the power on mine a few times and its always booted back up, that said, i fully expect that it might not, hence going to the effort of adding a graceful shutdown.

                          If you're running services with disk IO then you further run the risk of corrupting it and not being able to boot cleanly.

                          You can never be too sure!
                          S2Forum.com Administrator

                          Comment


                          • #28
                            Once you've got this carputer up and running, do you think it's something you could reproduce easily? I reckon there'd be a fairly big market for it!
                            Last edited by urS6Tom; 6 March 2013, 12:38.

                            Comment


                            • #29
                              gotta say I like the devices and the ideas. nice dev tool for sure.

                              packaged up with a prj chip you may have a sale item.

                              well done. seems to be something your interested in too so even better.

                              Comment


                              • #30
                                Originally posted by GazzaG60 View Post
                                gotta say I like the devices and the ideas. nice dev tool for sure.

                                packaged up with a prj chip you may have a sale item.

                                well done. seems to be something your interested in too so even better.
                                The initial aim of this project is hooking up to the fast diagnostics mode in prj's code which he's been developing, as the standard ECU doesn't provide what i want - so a prj mapped ECU is a requirement to get ECU data.

                                A diagnosis tool was exactly what i originally though, but i can see myself doing quite a bit more once i have the foundations in place.

                                Originally posted by urS6Tom View Post
                                Once you've got this carputer up and running, do you think it's something you could reproduce easily? I reckon there'd be a fairly big market for it!
                                Yes it should be easy - all of the hardware and software packages i'm using are readily available, and with the addition of the code i'm writing and configuration of the hardware... no reason it can't be replicated easily.

                                I will end up writing it for OBDII after i've got it working with the S2, so it should be compatible with any recent car out there.
                                S2Forum.com Administrator

                                Comment

                                Working...
                                X