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

Now available from EcoModder: ScanGauge II fuel economy gauge.  Click for details.  

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: 57

ScabbySentra - '93 Sentra SE
90 day: 44.37 mpg (US)
Thanks: 1
Thanked 1 Time in 1 Post
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.


(Support Ecomodder.com & get rid of these annoying ads!)      
 
  Reply With Quote
Old 11-10-2008, 12:09 PM   #2 (permalink)
EcoModding Lurker
 
Join Date: May 2008
Location: western Colorado
Posts: 57

ScabbySentra - '93 Sentra SE
90 day: 44.37 mpg (US)
Thanks: 1
Thanked 1 Time in 1 Post
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,032

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

schnitzel - '01 Golf TDI
90 day: 53.56 mpg (US)
Thanks: 156
Thanked 259 Times in 203 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,032

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

schnitzel - '01 Golf TDI
90 day: 53.56 mpg (US)
Thanks: 156
Thanked 259 Times in 203 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: 57

ScabbySentra - '93 Sentra SE
90 day: 44.37 mpg (US)
Thanks: 1
Thanked 1 Time in 1 Post
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,032

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

schnitzel - '01 Golf TDI
90 day: 53.56 mpg (US)
Thanks: 156
Thanked 259 Times in 203 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: 57

ScabbySentra - '93 Sentra SE
90 day: 44.37 mpg (US)
Thanks: 1
Thanked 1 Time in 1 Post
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


(Support Ecomodder.com & get rid of these annoying ads!)      
 
  Reply With Quote
Reply  Post New Thread

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
100+ hypermiling / ecodriving tips & tactics MetroMPG Hypermiling / EcoDriver's Ed 371 05-16-2012 01:40 PM
iDuino MPGuino wyatt OpenGauge / MPGuino FE computer 146 02-20-2009 12:23 PM




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