So far so good, controlling the motor works fine. But I want to install an Microcontroller (I'm opting for an RP Pico here) between the reciever and the motors. The idea: beeing able to add some "intelligence" to the vehicle, and eventually be able to switch between manual steering and some kind of autonomous driving.
This means: The inputs from the receiver should go to the MC. There, I read it with digitalread oder analogread, and subsequently, the correct signals should be sent to the actuators.
My problem: I thought the receiver sends a normal PWM signal to the speed controller. But I wasn't able to read a voltage there. (Perhaps 0.1V between idle and full throttle). As the speed controller is connected the same way to the receiver as a servo, I thought I could use the servo.h library and commands to control the speed controller. But again, it doesn't work. (If I replace the speed controller with an servo, the servo moves, so the code and wiring is correct).
Does anybody know how such an speed controller and foremost a receiver works, and how I can utilise the signals with an PICO?
I think that the problem is with the self learning feature. If the Pi isn't outputting a PWM signal when the ESC is powered up, the ESC will take 0 PWM as the throttle neutral position.
Do a servo.write (90) in your setup code for the ESC connection.
Thanks for your answer. I managed to use the servo commands to address the THOR speed controller. However, if i set it to 180, the motor isn't at full power. I tested myservo.write (90); and myservo.write (0); in the void setup(), but it never revs up completely. (My power supply is set to 5V, as I'm testing it with a 5V motor, but when it's running, it's only delivering around 3V)
I also connected the signal output of the receiver with an A0 of my Arduino UNO (for testing I'm not using the PICO, as the UNO allows me to use the serial monitor) and read the analog signal while using the remote. But the reading are pretty random. Usually just a 1 or 2, and occasinally spiked around 600. Now, if I unterstand the Wikipedia article correctly, it doesn't use the "strength" of the PWM, but the time between? So, how do I read this?
Your power supply can't deliver the current required by your moter or servo.
If your motoe or servo need 5A then you need a 5V supply rated at more than 5A