Voltage correction circuit
racecarguy
Posts: 2
I need to do the following:
Take input voltage (0 to 5v) and make a voltage adjustment to it.· i need to have a look up table, because there is no trend in the voltage compensation.
Logic,ie
take input voltage(var A). compare input voltage to column 1, find adjustment value in column·1 ( var ·(interpolate if necessary) add set C = A+B, and output C.· This table might take alot of work to get right (trial and error) so it needs to be relatively easy/fast to make changes.
I have a basic 1 that I have had for like 10 years now. I dont mind buying different hardware. I am an ME with little electrical experience, and some programming experience.·
Current is low, this is the signal wire on an airflow meter on a car.· I am hoping that parallax offers an easy solution for measuring and then outputing accurate voltages (thinking +-.01 approx). The logic/programming is pretty easy. I've done similar things 100s of times in Matlab.
Thoughts/reccomended hardware?
Thanks!
ALTERNATE:
I would like to read RPM (sine wave I would guess, maybe a square wave from the cam sensor) and add the voltage to the airflow sensor in relation to RPM.· This is the final result I want, but I can correlate airflow with RPM (roughly) so the first solution allows me to tap into less parts of the car.
Take input voltage (0 to 5v) and make a voltage adjustment to it.· i need to have a look up table, because there is no trend in the voltage compensation.
Logic,ie
take input voltage(var A). compare input voltage to column 1, find adjustment value in column·1 ( var ·(interpolate if necessary) add set C = A+B, and output C.· This table might take alot of work to get right (trial and error) so it needs to be relatively easy/fast to make changes.
I have a basic 1 that I have had for like 10 years now. I dont mind buying different hardware. I am an ME with little electrical experience, and some programming experience.·
Current is low, this is the signal wire on an airflow meter on a car.· I am hoping that parallax offers an easy solution for measuring and then outputing accurate voltages (thinking +-.01 approx). The logic/programming is pretty easy. I've done similar things 100s of times in Matlab.
Thoughts/reccomended hardware?
Thanks!
ALTERNATE:
I would like to read RPM (sine wave I would guess, maybe a square wave from the cam sensor) and add the voltage to the airflow sensor in relation to RPM.· This is the final result I want, but I can correlate airflow with RPM (roughly) so the first solution allows me to tap into less parts of the car.
Comments
·· It sounds relatively straightforward and shouldn’t be too much of a problem. You will need a DAC to output the new analog voltage. I can refer you to two examples which are written for the BS2, but may offer help on two aspects of what you need to do. One is a lookup table for ranges of voltages. Our thermocouple code examples (first link) can somewhat illustrate that idea for you. The second is interpolation. One example we have was for the Sharp GP2D12 Sensor which can be found at the second link. I hope this helps. Take care.
http://www.parallax.com/detail.asp?product_id=28022
http://www.parallax.com/dl/docs/cols/nv/vol5/col/nv114.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
www.emesys.com/BS2math3.htm#interpolation
For the input you need an Analog to Digital converter, and for the output you have a a DAC. There are quite a few examples avaialble for different types.
0.01 volt / 5 volt is one part in 500, so that calls for something like a 10 bit (or better) conversion.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Thanks for the information. Makes sense, ADC,stamp,DAC.· Wish I paid more attention in Digital Circuits back in college!
I am assuming when I order my stamp, Parallax can point me in the right direction for a 10bit DAC that can do what I need it to?· Looked at some DAC·white papers·and it seems pretty straight forward. Looking forward to learning some new things!
DACs are one thing we don’t carry (We do have a few ADCs) and something that is usually chosen specifically for the application. I’m not sure anyone here has a running knowledge of enough DACs to point one out for your application, but if you post the specifics here I’m sure you’ll get enough input to help you choose one or at least a place to pour through the datasheets. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Parallax carries the LT1298 ADC, a 2 channel 12 bit device.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com