Go Back   EcoModder Forum > EcoModding > Instrumentation
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 11-10-2008, 11:16 AM   #1 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: western Colorado
Posts: 59

ScabbySentra - '93 Nissan Sentra SE
90 day: 44.37 mpg (US)
Thanks: 2
Thanked 7 Times in 6 Posts
Tips for USB datalogging out of an iDuino?

My Iduino is working pretty reliably now, but I want to get some data logged to use for detailed analysis of mpg at different situations. I can only find sparse mention of how to interface a laptop to the beastie, and I was wondering if there are any specific posts that I'm not finding with the search function.

Thanks, all.

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 11-10-2008, 12:09 PM   #2 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: western Colorado
Posts: 59

ScabbySentra - '93 Nissan Sentra SE
90 day: 44.37 mpg (US)
Thanks: 2
Thanked 7 Times in 6 Posts
Hmm- couldn't edit post. I wanted to emphasize that I have the USB version of the iduino, in case that matters. I can use a VB app on the laptop, unless there's an easier way.
  Reply With Quote
Old 11-10-2008, 12:15 PM   #3 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
The data is in the following format
instant mpg, instant mph, instant.injHius, instant.injPulses, instant.vssPulses

000.00,000.00,000.00,000.00,000.00

It uses the display formatter and mpg/mph will be to two decimal places if under 99.995. The other values will be 000.00 if zero, or the actual integer number.

With this basic info, a laptop application can compute instant gph and apply a vsspulses/mile and us/gallon correction factor and keep track of accumulated distances, fuel usage. It gets sent out the serial port once per 1/2 second.


I'm not sure about connectivity in vb, it should just be a serial port if you have the ftdi driver installed, same one you connect to from the arduino ide for uploadign sketches.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 11-10-2008, 10:37 PM   #4 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
FYI, played around with vb express and was able to echo the arduino serial output to the console without much fuss. would still need to parse it, but it is entirely doable (change COM4 to your com port):

Code:
Module Module1
    'based on http://support.microsoft.com/kb/904795/
    Sub Main()
        Using comport As IO.Ports.SerialPort = _
                My.Computer.Ports.OpenSerialPort("COM4")
            Do
                Dim Incoming As String = comport.ReadLine()
                If Incoming Is Nothing Then
                    Exit Do
                Else
                    Console.WriteLine(Incoming)
                End If
            Loop
            comport.Close()
        End Using

        Console.WriteLine("Press ENTER to quit")
        Console.ReadLine()
    End Sub

End Module
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 11-11-2008, 10:28 AM   #5 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: western Colorado
Posts: 59

ScabbySentra - '93 Nissan Sentra SE
90 day: 44.37 mpg (US)
Thanks: 2
Thanked 7 Times in 6 Posts
Thanks, that gives me a great starting point. Now what I have to do is hack a hole in the duino case for a USB cable.
  Reply With Quote
Old 11-11-2008, 07:13 PM   #6 (permalink)
dcb
needs more cowbell
 
dcb's Avatar
 
Join Date: Feb 2008
Location: ÿ
Posts: 5,038

pimp mobile - '81 suzuki gs 250 t
90 day: 96.29 mpg (US)

schnitzel - '01 Volkswagen Golf TDI
90 day: 53.56 mpg (US)
Thanks: 158
Thanked 269 Times in 212 Posts
If you are windows/dos you can use the following two commands also just to log it to the screen (change com4 to your com port number, and redirect the type command if you want a file). Similiar options in unix/mac land certainly.

mode com4:9600,N,8,1 >nul

type com4:
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
  Reply With Quote
Old 11-12-2008, 06:55 PM   #7 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: western Colorado
Posts: 59

ScabbySentra - '93 Nissan Sentra SE
90 day: 44.37 mpg (US)
Thanks: 2
Thanked 7 Times in 6 Posts
Unfortunately under win2k the easy way won't work. USB ports don't show up as COM ports, afaik. At least, I've never been able to use a USB port directly that way. I've tried to get my GPS to work outside of the proprietary software's specs, to no avail.

I haven't played with VB's communications capabilities yet, but USB seems to be much less friendly to the direct approach than plain serial ports.

Thanks for your attention to the questions I ask, though.

Jim

  Reply With Quote
Reply  Post New Thread




Similar Threads
Thread Thread Starter Forum Replies Last Post
100+ hypermiling / ecodriving tips & tactics MetroMPG Hypermiling / EcoDriver's Ed 457 02-11-2022 03:57 AM
iDuino MPGuino wyatt OpenGauge / MPGuino FE computer 146 02-20-2009 12:23 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com