Author Topic: Analog Input  (Read 25001 times)

Offline M-Tech

  • Jr. Member
  • **
  • Posts: 25
  • BHP: 2
Analog Input
« on: November 30, 2007, 11:40:55 am »
Hello
I did not understand very well what has to be done to tiny to get the analog input to work.
I have the newest firmware installed!
Where do i have to change the offset?

Thank You for help!

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Analog Input
« Reply #1 on: November 30, 2007, 01:39:56 pm »
Have you read the section Connecting An Analog Signal in http://www.vems.co.uk/VEMSWB/UserGuide/README.html?

There are no offsets deal with, although you will have to do a little bit of customisation work to scale the value that you're trying to log and the resistor that you're using.

What are you looking to use the Analog input for?

Rob

Offline kuuno

  • New Users
  • *
  • Posts: 1
  • BHP: 0
Re: Analog Input
« Reply #2 on: December 07, 2007, 10:02:49 am »
hello, im the originator of this question

I have read that topic and also the topic where i originally posted this
i have hooked up the vems map sensor to analog input and i get 0 voltage reading
i tested the map and i get a reading from it directly!
In previous topic people stated that there is a problem with firmware configuration? and offset has to be changed for analog input to work?

Thank You!

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Analog Input
« Reply #3 on: December 07, 2007, 12:09:45 pm »
You'll need the most upto date firmware http://www.vems.hu/download/round/round_2007-04-25.zip which you'll need to unzip and upload to the gauge.

In the directory \round_2007-04-25\MegaTune2.25\mtCfg you'll find a file round.ini

Scroll down to the section [OutputChannels]

and at under the line internaltemp= scalar, U08,   13, "",    1.000, 0.000
add the line analogIn    = scalar, U16,  22, "kPa",    1.000, 0.000

Then below o2       = { o216bit / 2560}
add the line map      = { (5/255)*analogIn } you will have to play with the equation to get it to reflect the value you're wanting.

To include the value in the datalog go down to [Datalog]
and change the line entry = boost_pwmpct,     "boostPWM",   float,   "%.2f"
to entry = map,     "MAP",   float,   "%.3f"

Offline ranz

  • Full Member
  • ***
  • Posts: 137
  • BHP: 6
Re: Analog Input
« Reply #4 on: April 29, 2008, 08:49:42 pm »
Before connecting my analog input wire to TPS i measured it and i get 4V from it? is that ok? it should be input not output...

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Analog Input
« Reply #5 on: April 29, 2008, 09:20:13 pm »
It is correct, there is a reference voltage applied to the input line, the strength of the TPS signal should pull it down to the correct voltage - you may want to use a resistor in line to make sure that the voltage does not effect the TPS reading in some cases.

Offline ranz

  • Full Member
  • ***
  • Posts: 137
  • BHP: 6
Re: Analog Input
« Reply #6 on: April 30, 2008, 07:06:19 am »
It is correct, there is a reference voltage applied to the input line, the strength of the TPS signal should pull it down to the correct voltage - you may want to use a resistor in line to make sure that the voltage does not effect the TPS reading in some cases.
OK, then i'll try with resistor, becase without it the TPS reading is effected.

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Analog Input
« Reply #7 on: April 30, 2008, 10:44:42 am »
You can use quite a large resistor as the A2D is a high precision unit so reducing the voltage wont kill the tps accuracy much.
If you feel comfortable with firmware upgrades you might want to try:
http://www.vems.hu/download/round/round_2008-02-12.zip

As it has some analog in and out improvements.

Rob

Offline z0tya

  • Sr. Member
  • ****
  • Posts: 252
  • BHP: 11
Re: Analog Input
« Reply #8 on: November 02, 2008, 07:13:12 pm »
Hello!

Is it possible to disable the reference voltage 4V from the input? I want to put map sensor signal with 10 k resistor to the gauge, but the signal is weak and cannot pull and push away enough from 4V.


Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Analog Input
« Reply #9 on: November 02, 2008, 09:05:32 pm »
The internal pull-up cannot be disabled.

Offline z0tya

  • Sr. Member
  • ****
  • Posts: 252
  • BHP: 11
Re: Analog Input
« Reply #10 on: November 03, 2008, 08:13:12 am »
And desolder it? Is it work w/o the pullup? Does the vemsgauge have public schematic? How can I calibrate the input if I want to put this map on it: http://cosworth.hu/content/hasznos/Weber-Marelli%20sensors/aps02_03-05_01.pdf

Thanks

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Analog Input
« Reply #11 on: November 03, 2008, 08:53:36 am »
Which pull-up resistor are we talking about?  There is an internal pull-up to dampen noise, and we recommend a resistor:
http://www.vems.co.uk/VEMSWB/UserGuide/README_files/WBAnalogIn.png
But this is so that the voltage on the pin (brought high by the pull-up) does not effect the sensor you are reading from.
Usually you will find that there is enough resolution to read even the smallest signals.

There is no public schematic and the units are not serviceable

Offline z0tya

  • Sr. Member
  • ****
  • Posts: 252
  • BHP: 11
Re: Analog Input
« Reply #12 on: November 03, 2008, 09:34:45 am »
Okay, I put the map signal across this resistor (somwhere in wiki I read 10k for it). The sensor signal on atmospheric pressure is about 2.5 V. With linear input curve (new firmware, 0-15-30-45 and so on), with calibration 255, with offset 0, megatune show about 1418. If use some vacuum (map signal is about 1.8V), megatune drop to about 1350 (if I remember good), so the input changing not to much. I would like calibrate it to show something like pressure or any readable format.
I will try do a log, maybe understandable....:)

Offline rob@vems.co.uk

  • Hero Member
  • *****
  • Posts: 3115
  • BHP: 49
    • VEMS Forum
Re: Analog Input
« Reply #13 on: November 03, 2008, 12:19:56 pm »
If these figures are correct it means:
A change of 700mV gives a change in reading of 68, which is pretty close to being an accuracy of 10mV a unit.

The range of the sensor is 250mV to 4750mV = 4500mV / 10mV =  450units.

The APS05 is shown to read from 17kpa to 308kpa = 291kpa / 450units = 0.64kpa

So you will have around 0.65kpa resolution.

You do not have to use that resistor, it was put in line when we were taking a reading from a Mass Air Flow sensor,  and the pull-up on the analog in pin was causing the MAF output to rise.
Putting the sensor's Signal Out directly into the analog input would be a useful experiment.

Offline z0tya

  • Sr. Member
  • ****
  • Posts: 252
  • BHP: 11
Re: Analog Input
« Reply #14 on: November 03, 2008, 02:20:11 pm »
Thanks!

Yes, I see the resolution is enough, I will try find some equation for human readable output.
I will try w/o the serial resistor.

I have another question, but about the rpm input, so I will ask there:)