Which microcontroller to use for this?
Hi all,
I am trying to design a circuit that will do the following
1) Take 0-5V analog input from a temperature sensor, an airflow or pressure sensor, & a VR or hall effect sensor. Also from a position sensor & lambda (O2) sensor.
2) Scale that voltage for the temp sensor, pressure sensor & VR sensor based on a pre-loaded table of RPM vs signal.
3) Output the scaled voltage in 0-5v analog form.
4) Typical sensor response time to transient input is 1 ms. So the circuit should be able to generate output as fast.
This is basically for building a unit which tricks a standard automotive EMS (engine management system), effectively changing the ignition & fuel injection parameters. I came across a circuit which does the exact same thing using BASIC stamp 2, however it used only two inputs & controlled a digital pot. I'd prefer to use something that can be programmed with C.
Can you guys suggest me a suitable means of doing the above? Any help will be greatly appreciated.
Sorry if I am sounding very elementary, I am a mechanical engineer, I know very little electronics other than basics.
Post Edited (Pier39 Labs) : 12/3/2007 1:16:35 AM GMT
I am trying to design a circuit that will do the following
1) Take 0-5V analog input from a temperature sensor, an airflow or pressure sensor, & a VR or hall effect sensor. Also from a position sensor & lambda (O2) sensor.
2) Scale that voltage for the temp sensor, pressure sensor & VR sensor based on a pre-loaded table of RPM vs signal.
3) Output the scaled voltage in 0-5v analog form.
4) Typical sensor response time to transient input is 1 ms. So the circuit should be able to generate output as fast.
This is basically for building a unit which tricks a standard automotive EMS (engine management system), effectively changing the ignition & fuel injection parameters. I came across a circuit which does the exact same thing using BASIC stamp 2, however it used only two inputs & controlled a digital pot. I'd prefer to use something that can be programmed with C.
Can you guys suggest me a suitable means of doing the above? Any help will be greatly appreciated.
Sorry if I am sounding very elementary, I am a mechanical engineer, I know very little electronics other than basics.
Post Edited (Pier39 Labs) : 12/3/2007 1:16:35 AM GMT
Comments
http://forums.parallax.com/showthread.php?p=682422
Using http://search.parallax.com type in "SXC" and take it from there.
The SX can be programmed in its assembly language or in a version of Basic (SX/B). There are one or two C compilers for the SX, but none of them are currently supported by Parallax. I can't vouch for their quality. I'm sure others have experience with them.
The Propeller can be programmed in a mixture of Spin (a language with some features of C, Pascal, and Python) and assembly language. There's a 3rd party C compiler that is expected to be available in a month or two (from ImageCraft). The Propeller is a 3.3V processor, but can interface to a 5V ADC and can do its own digital to analog conversion, but only to about 3V. You'll need a buffer to get that up to 5V full range.
The way I see it, if each sensor sends a signal every 1 ms, then there are 5 sensors, so that makes it 5 instructions / ms, and multiply that by 2 for the output. Meaning I need a controller capable of handling atleast 10000 instructions/second. . Is this correct?
One other requirement is that it should take power from a DC 12v input source (can go up to 15v sometimes).
I looked at the SX, but it seems to be too expensive & over-powered (atleast at first glance) for my needs. For that money I can get a standalone EMS which will replace my existing one. I am looking for an inexpensive option to that.
Mike as you said it needs a ADC, 8 channel means that it can handle 8 inputs? And I presume I would also be needing a DAC for converting the signal back.
Sorry I am asking so many questions all at once.
What does a "standalone EMS" cost then?
Essentially this is what I'm trying to do:
http://www.umaine.edu/MechEng/Peterson/Classes/Design/2005_6/Projects/ECU/Piggyback Design.html
But, like I said before, it will have more than one potentiometer to control multiple outputs, and also some way to govern the VR sensor's output.
Let me rephrase my question: What is the best & most economical way to achieve this functionality?
Post Edited (Pier39 Labs) : 12/3/2007 3:44:40 AM GMT
2) Both the SX and the Propeller can do the digital to analog conversion with only an external resistor and capacitor although usually you'll need a buffer which could be an op amp or a transistor and a couple of resistors. The Propeller can also do the analog to digital conversion with only two resistors and two capacitors, but you'll need a voltage divider to reduce the input range from 0-5V to 0-3.3V. I think the SX can do one or two channels of ADC, but the Propeller can do two per cog (processor) and there are 8 processors. One processor can do the DAC and all the computations involved.
3) Even though it seems like overkill, the Propeller would simplify the development work assuming that you're only making one. You could use one cog to feed a VGA monitor to provide real-time monitoring of the sensor data. $20 would get you a Propeller Protoboard and you'd need a PropPlug USB to serial adapter for $30 that you could use for other things. $15 would get you the VGA adapter if you want to use it and that gets you a PS/2 keyboard and mouse connector. The Protoboard would run off 12-14V if you don't draw too much current (the regulator is designed for 6-9V input and will overheat at 12-14V if you try to draw anywhere near its 1.5A rating). A Propeller by itself would draw under 100mA.
4) If cost is the major consideration, one of the PICs with multiple ADCs would probably work, but you'd have to look for help elsewhere.
Post Edited (Mike Green) : 12/3/2007 6:33:02 AM GMT