Go Back   EcoModder Forum > EcoModding > Instrumentation > OpenGauge / MPGuino FE computer
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 08-03-2018, 10:45 AM   #1 (permalink)
Master EcoModder
 
Ecky's Avatar
 
Join Date: Dec 2011
Location: Vermont
Posts: 2,815

Gaptooth - '00 Honda Insight
Team Honda
Gen-1 Insights
90 day: 66.06 mpg (US)

Such Fit - '07 Honda Fit Sport
90 day: 41.27 mpg (US)

Velomobile - '13 Sun Seeker EZ-TAD SX
Last 3: 2142.86 mpg (US)
Thanks: 969
Thanked 1,074 Times in 681 Posts
Help with simple code for reading VSS

Hi all, I'm working on a project where (with an Arduino Uno) I need to read VSS and, depending on its value, output one thing or another. It's been a decade since I've done any significant coding.

I looked over the MPGuino schematics and noted that the VSS signal wire has a 50k ohm resistor and then feeds into the analog 0 pin. I've been trying to figuring out how to pick out the code used in the MPGuino project which is used to read and store this, without success. Can someone explain to me in brief how the Arduino records this? Does the MPGuino code count the frequency of ground pulses?

What does the logic and the code, look like to store this value so it can be queried?

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 08-03-2018, 05:21 PM   #2 (permalink)
Master EcoModder
 
Join Date: Jan 2017
Location: Istanbul
Posts: 753
Thanks: 41
Thanked 76 Times in 62 Posts
Tvago would be the man to ask I think about mpguino specifics.
  Reply With Quote
Old 08-03-2018, 05:25 PM   #3 (permalink)
Master EcoModder
 
Join Date: Jan 2017
Location: Istanbul
Posts: 753
Thanks: 41
Thanked 76 Times in 62 Posts
But for starters there is a sample project, analog read serial. Use tht, delete the unnecessary text and the use serial plotter on the arduino ide to see what signal you are getting.

If it is just pulses the i would probably use an interrupt instead of the analog input.
  Reply With Quote
The Following User Says Thank You to teoman For This Useful Post:
Ecky (08-03-2018)
Old 08-03-2018, 09:40 PM   #4 (permalink)
EcoModding Apprentice
 
Join Date: Jun 2010
Location: Virginia
Posts: 114
Thanks: 33
Thanked 56 Times in 38 Posts
Haven't used it , but FreqMeasure may help: https://www.pjrc.com/teensy/td_libs_FreqMeasure.html

Direct usage of the timers as used by the MPGuino isn't exactly simple.

Some info/keywords to aid your searching here: Advanced Arduino: direct use of ATmega counter/timers
  Reply With Quote
The Following 2 Users Say Thank You to Ardent For This Useful Post:
Ecky (08-03-2018), seifrob (08-04-2018)
Old 08-05-2018, 04:55 AM   #5 (permalink)
Master EcoModder
 
Join Date: Jan 2017
Location: Istanbul
Posts: 753
Thanks: 41
Thanked 76 Times in 62 Posts
Were you able to have a look at the signal?
  Reply With Quote
Old 08-05-2018, 07:25 AM   #6 (permalink)
Master EcoModder
 
Ecky's Avatar
 
Join Date: Dec 2011
Location: Vermont
Posts: 2,815

Gaptooth - '00 Honda Insight
Team Honda
Gen-1 Insights
90 day: 66.06 mpg (US)

Such Fit - '07 Honda Fit Sport
90 day: 41.27 mpg (US)

Velomobile - '13 Sun Seeker EZ-TAD SX
Last 3: 2142.86 mpg (US)
Thanks: 969
Thanked 1,074 Times in 681 Posts
Not yet, I have several projects going on at once.

  Reply With Quote
Reply  Post New Thread


Thread Tools




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