Hi to all electronic experts. I run an Arduino inside my RC Car and it works great. I already got helpful advice here. Basically the Arduino is “listening in” on the RC PWM and does its thing based on the crude schematics here:
Now I started an experiment. If I turn round Pin 3 to become an OUTPUT and set the Pin to HIGH, basically it jams the PWM signal from the RC receiver. Result: the motor stops. It works.
But I do not know if I am risking to damage other components. Is there any way to tell if there might be a problem for the RC Receiver or the ESC Motor Controller, if a second source puts 5v on this line?
Yes, there is the potential for damage. You are connecting 2 outputs together (RC receiver and Arduino pin) which could cause a large current to flow when one output is HIGH and the other is LOW.
Ahh! I see your point! I there a simple solution to tackle this Problem? Meaning: "listening" to the PWM signal with the pin as INPUT & when needed jaming the signal somehow???
Example usecase:
Normally recording PWM throttle values voming from the RC Receiver
But if a obstacle is deteced by a sensor, stop the car by jamming the PWM?
Take the signal from the RC receiver and send it to the MCU. The MCU can then either send the signal as is to the car or send a new modified signal depending upon sensor detections.
My thinking is that the PWM from the receiver can be sent directly to the MCU which can convert the incoming PWM to PPM. With the PPM the MCU can read and adjust the original PWM signal based upon sensor readings. Then convert the PPM back to PWM to send to the ESC's.
There are several Arduino libraries that convert PWM to PPM and PPM back to PWM.
I'd use a 32 bit board with a speedy clock rate to deter latency.
So if your receiver has the buffer resistors you should be safe. Still current will flow, but the resistor will limit it. The fact that your receiver or Arduino has not died yet makes me suspect it has resistors.
Yes, if @thomasi 's receiver has similar resistors, that should work fine. The resistor will prevent excessive current from flowing and damaging either component. When the Arduino pin is an input, the RC receiver output will drive the logic level of the signal to the motor controller. When the Arduino pin is an output, it will control the logic level because it is stronger, having no resistor connected.
Even if @thomasi 's receiver has no resistors, they can be added easily to the circuit. 1K should work I think, and will limit any current to about 5mA, which is not enough to harm any component.