Smooth PWM to control other micro

Hi all,

I am trying to take control over a trolley using Arduino. The existing control is done into what I assume is a microchip, by means of a potmeter with a switch. I want to control the trolley independently of the pot. This means that I want to leave the pot in place, and connect a radio controlled Arduino in parallell with the pot, and reproduce the potmeter signal.

Since the pot will conduct to ground in its lowest position and to 5v (i checked) in its max position, I was thinking of using diodes from the pot and from the arduino "pot output" to direct the current towards the micro and not to the other parallell "pot". Am I on the right track here?

Also, the "pot output" from the arduino will be pwm, will the other micro understand that as an analogue signal, or should I try with a low-pass filter as described in

Awaiting the experts, thanks in advance.


There is no need to use diodes just connect the ground of your system to the arduino ground and connect the pot to an analogue input. The impedance of the arduino is so high that it will not affect the other electronics.

As to feeding that to other arduinos, if you use the pulseIn() you can read in directly a value related to the PWM. This will probably be better than smoothing the PWM and then reading it with an analogue input on an other device. This is because analogue signals are more susceptible to noise than digital ones and you should be able to transfer the information more precisely. Even better would be to transfer the value digitally using I2C in a master slave arrangement.

Thanks for a very quick reply. In order to explain more of the unhacked system: I have a pot controlling a micro which in turn controls the motor. I want to leave all that as is and add my RC arduino to control the micro when not using the pot on the trolley. The problem is that I do not have or want control over the other microchip in the motor control. I want the remote controlled arduino to fool the other micro into beleiving that I am turning the potmeter whilst I am actually remote controlling...

As to the diode question. If the pot is at zero and I feed a signal of 2.5V, won't the pot short the signal to ground and disturbe the signal?

Thanks again

I think what you want to do is to inject a signal into this pot rather than taking the reading from the pot. Is that right as I am a bit confused by your explanations?

The problem is that a diode would not work in the case where the pot is turned up to a higher voltage than the controlling arduino is giving out. So if the pot was turned up full you would not have any control.

I can't help thinking you actually need a switch.

Thanks again,

That's a valid point, but I'm not so worried. I will either use the pot or leave the pot closed and use the arduino.

arduino pwm out - diode - diode - pot | foreign microcontroller

Now do you think it will work having the pwm output smoothened with a first order lp filter?

Thanks again, Joachim