smoothing out the Analog out PWM signal?

Hey all,

I'm making a simple piggyback fuel controller. For those who aren't familiar, it's pretty simple. It reads a 0-5v analog DC input from an air flow sensor, intercepts the signal, multiplies the signal by a correction factor, and then simultaneously outputs a 0-5v analog DC signal to the engine computer. This allows the user to effectively modify how much fuel is squirted by the engine computer.

The car in question was built in 1985, and the ECU was manufactured by Bosch.

I'm curious as to how I could go about determining if the 490hz PWM signal from the arduino will work for this task, or if I will need some kind of signal smoothing.

I have no oscope, sadly, so I'm not sure how I can go about testing the effect of caps on the cleanliness of the output signal.

Does anyone have any guidance? I'm just starting to learn this stuff, so any help is much appreciated.

This appears to be the last piece of the Piggyback puzzle for the time being.

I ended up making a low pass filter with a 220 uF cap and 10 ohm resistor.

Pretty simple, eh?

Sounds like a good purpose for an LM741 op amp and a pot!

I ended up making a low pass filter with a 220 uF cap and 10 ohm resistor.

That is quite a low resistor and will cause excessive peak current from the arduino output if connected directly.
The arduino output pins must not have more than 40mA flowing in or out of them otherwise damage will occur. A discharged capacitor looks like a short circuit so the only thing limiting the current is the 10R, that means the peak current will be 0.5 Amp, that is 12.5 times more than when damage starts to occur. You won't get that much current actually flowing but this:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html
Shows you can get quite high currents from a pin.
So either drive that filter with a transistor or make the resistor value at least 125R

PWM filter discussion here:-
http://www.thebox.myzen.co.uk/Tutorial/PWM.html

And its pretty insidious - over-driving the output stages like this might not appear to cause damage for ages until one day your circuit goes dead - taking a device past its absolute maximum ratings means that it may slowly degrade and fail in service (rather than in testing), which is not good.

Another option for low pass filtering is to run the PWM at a higher frequency (then a much smaller capacitor can be used, saving money and space) - this does, however, require changing the hardware settings from the Arduino default.

A further issue with a simple RC low-pass filter like this is that the Bosch system may require a low impedance drive signal, so that increasing the R value (to protect the Arduino) might mean the signal is too weedy to drive it. Some research/experimentation may be required. Using an opamp circuit would be a option if this is an issue.

Your filtering needs to be an LC filter with suitable flyback diode on the mosfet, secondly petlier devices hate ripple, they work best with smooth dc not chopped. Control the fet with a suitable pwm controller for power supplies such as a LM494, then use the analog write to control the pwm's reference for its feedback loop via a very low pass rc filter. At the ~400Hz rate the analogWrite generates PWM output your inductor would be huge, the approach I suggested gets your inductor requirements down into the millihenry range as opposed to several henry. If you wanted to be really anal about it you could even snoop the petlier drive voltage with an analogRead port and make a software based global feedback loop. But it brings me full circle, why use the cpu at all when the temp sensor could reference the LM494 directly and be a done deal on 3 sqin of pcb?

Your filtering needs to be an LC filter with suitable flyback diode on the mosfet, secondly petlier devices hate ripple, they work best with smooth dc not chopped. Control the fet with a suitable pwm controller for power supplies such as a LM494, then use the analog write to control the pwm's reference for its feedback loop via a very low pass rc filter. At the ~400Hz rate the analogWrite generates PWM output your inductor would be huge, the approach I suggested gets your inductor requirements down into the millihenry range as opposed to several henry. If you wanted to be really anal about it you could even snoop the petlier drive voltage with an analogRead port and make a software based global feedback loop. But it brings me full circle, why use the cpu at all when the temp sensor could reference the LM494 directly and be a done deal on 3 sqin of pcb?

Is there a single word of this reply that isn't nonsense. No one is talking about a mosfet, a peltier device or temperature control. Where large inductors come in I don't know.
It is almost as if this post were in reply to some other thread.

sorry for the cross post, target was intended for a post on a cooling project on CMOS imager.