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, 11:45 AM   #1 (permalink)
Master EcoModder
 
Ecky's Avatar
 
Join Date: Dec 2011
Location: New Zealand
Posts: 5,096

ND Miata - '15 Mazda MX-5 Special Package
90 day: 39.72 mpg (US)

Oxygen Blue - '00 Honda Insight
90 day: 58.53 mpg (US)
Thanks: 2,907
Thanked 2,571 Times in 1,594 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, 06:21 PM   #2 (permalink)
Master EcoModder
 
teoman's Avatar
 
Join Date: Jan 2017
Location: Istanbul
Posts: 1,245

A3 - '12 Audi A3
Thanks: 65
Thanked 225 Times in 186 Posts
Tvago would be the man to ask I think about mpguino specifics.
  Reply With Quote
Old 08-03-2018, 06:25 PM   #3 (permalink)
Master EcoModder
 
teoman's Avatar
 
Join Date: Jan 2017
Location: Istanbul
Posts: 1,245

A3 - '12 Audi A3
Thanks: 65
Thanked 225 Times in 186 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, 10: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, 05:55 AM   #5 (permalink)
Master EcoModder
 
teoman's Avatar
 
Join Date: Jan 2017
Location: Istanbul
Posts: 1,245

A3 - '12 Audi A3
Thanks: 65
Thanked 225 Times in 186 Posts
Were you able to have a look at the signal?
  Reply With Quote
Old 08-05-2018, 08:25 AM   #6 (permalink)
Master EcoModder
 
Ecky's Avatar
 
Join Date: Dec 2011
Location: New Zealand
Posts: 5,096

ND Miata - '15 Mazda MX-5 Special Package
90 day: 39.72 mpg (US)

Oxygen Blue - '00 Honda Insight
90 day: 58.53 mpg (US)
Thanks: 2,907
Thanked 2,571 Times in 1,594 Posts
Not yet, I have several projects going on at once.

  Reply With Quote
Reply  Post New Thread






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