Pages: [1] 2   Go Down
Author Topic: "rev-matching" box; Arduino Mega?  (Read 1156 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm attempting to create a revmatching box that essentially matches the engine rpm with the rpm the gearbox is spinning depending on the gear (perfect down/up shifts). Inputs would include : clutch switch, 6 gear position switches, rpm (12v pulses), speed sensor (12v pulses) and throttle position (there are two on my car for some reason. One that ranges from 0.5v to 4.5v, the other from 0.2v to 2.3v) It would need to output (via the pwm) the two throttle position signals. I'm quite a noob when it comes to microcontrollers but after reading reviews and such this seems to meet the requirements. I think I have a handle on the programming aspect but I'm not sure the built in analog in/out will be able to handle the signals. Is the Arduino Mega a good microcontroller for this project? Would I need to buy stronger a stronger dac or adc? Open to suggestions!
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 332
Posts: 16566
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like a reasonable project for a Arduino. The I/O count you listed might even be met with a 328 board rather then the more expensive Mega1280. However you may end wanting to use more user interrupts then 2, so the Mega is probably a safer choice upfront even if you don't end up needing the extra I/O and memory.

 Most of those switch inputs and your stated speed pulses will might end up being 0/12vdc (you stated the speed pulses were 0/12vdc) so you will need some small amount of external components to make sure all input signals are 0/5vdc, via voltage divider resistors or zener clamping diodes, etc.

Be sure you understand what a PWM output signal is, it's not a pure analog 0-5vdc output voltage unless you do some external low pass filtering on the PWM signal. So you will need to know what the receiving devices is expecting of your analog output signals.

Good luck on the project

Lefty
« Last Edit: November 05, 2009, 05:34:50 pm by retrolefty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the response!
Do you have any recommendations for voltage dividers or low pass filters?

something like this active filter? :-/

http://www.mouser.com/ProductDetail/Maxim-IC/MAX7480ESA+/?qs=sGAEpiMZZMuXVhsoTePomqNEDmatyUj8

I honestly have no clue when it comes to electronic components (anything more than analog volts). More of a programmer but I'm learning. 8-)
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

would a 5v Voltage Regulator (LM7805) work to lower the voltage for the rpm and speed, or would it overheat/not regulate fast enough being pulsed? Would a pwm + capacitor react too slow as well? Would a digital potentiometer be quicker?

Logged

New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
arduino: far too much like electrical engineering.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

use an opamp to amplify it down to 5V!

Alec
Logged


-- Alec

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 332
Posts: 16566
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well in the industrial world most speed pulse inputs wire to a comparator type op amp so that the threshold switching valve can be set (either fixed or adjustable) and the output cannot go over the +5vdc of the comparators +5vdc Vcc.

Lefty
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 332
Posts: 16566
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
would a 5v Voltage Regulator (LM7805) work to lower the voltage for the rpm and speed, or would it overheat/not regulate fast enough being pulsed? Would a pwm + capacitor react too slow as well? Would a digital potentiometer be quicker?

A regulator has much too much minimum input current requirement for use as a signal processor, speed issues also.

PWM output conditioning is a separate issue, you first need to know the input signal requirements for where the signal is being wired to.

Digital pot would work, with additional parts, but much too complicated for the simple task of lowering signal voltages to 0-5vdc range. Just two resistors make a simple voltage divider that would work fine. Or use a comparator op amp.

Lefty
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I should use two resistors to lower the 12v pulses down to 5v? Then use a low pass filter for pwm output back to the throttle position inputs of the ecu? I don't have any technical specs for the signal requirements, any way to test? If the ignition is turned on and 0.5v/0.2v is not present it throws an error code and disables the sensor inputs. I imagine this will be easier to test when my arduino mega arrives. smiley
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 332
Posts: 16566
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I should use two resistors to lower the 12v pulses down to 5v?

Yes two series resistors wired from the signal to be converted to ground and then the voltage measured at the junction of the two resistors and ground would be wired to the Arduino. Example, two equal 10k ohm resistors would divide a 12v level to 6 volt, still too high to wire to the Arduino max is +5vdc. You could also just use a 10k ohm potentiometer with the the signal to one fixed terminal, ground to the other fixed terminal and the wiper terminal adjusted and wired to the Arduino digital input terminal.

 Then use a low pass filter for pwm output back to the throttle position inputs of the ecu?

Probably, a simple low pass filter is just a resistor and cap wired in series to ground and the filtered signal available at the junction of the resistor and cap.

 Lefty
« Last Edit: November 06, 2009, 09:31:29 am by retrolefty » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You've been extremely helpful! smiley Would the two resistors in a series not put strain on the 12v pulses?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 :-/....I am willing to paypal someone $20 if they help me figure this out (and it works!)
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 332
Posts: 16566
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would the two resistors in a series not put strain on the 12v pulses?

That depends on the output impedance of the device generating the speed pulse. The higher the ohms of the resistors the less load it places on the signal. I suspect anything at or above 10k ohms would be OK. The signal is going to a digital input that doesn't require a perfect voltage, just above the switching threshold of the digital input, around 2.5v I think. It's not a analog measurement, just a on or off digital pulse with the pulse frequency being relative to the RPMs.

Lefty
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So a 15k and a 30k to be safe or a 10 and 20? That would give me 4v pulses?
Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 332
Posts: 16566
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would start with a 7K and 5k in series, with the 5K at the ground end.

Again a small trimmer pot of 10K or so would work fine and would be adjustable:  http://www.allelectronics.com/make-a-store/item/MTPS-10K/10K-MULTITURN-TRIMMER-POT/-/1.html


Lefty
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 34
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'll just save myself the hassle and use the trimmer pot. If you could point me out a suitable low pass filter I'll be all set (and leave you guys alone)

Thanks again
Logged

Pages: [1] 2   Go Up
Jump to: