Hello everyone,
recently I started to be interested in the Arduino platform. So I decided to implement a remote control car project of my idea. So I built a remote control and a car at the beginning on contact plates, both are based on the Arduino Pro Mini 16 MHz. They include:
Remote:
- analog joystick module ps3 5V (two potentiometers and a button),
- regular button,
- XY-FST 433 MHz radio transmitter
Car:
- led diodes,
- Tower Pro SG90 servo 9 grams,
- DC 5V motor with gear,
- L293D H bridge for DC motor control,
- buzzer,
- radio receiver (sold with the transmitter),
After uploading the programs to the remote control and the car, everything works, but not quite as expected. The problem is that there are large delays in operation in the car's system, i.e. when I tilt the joystick on the remote control (e.g. to the left maximum) responsible for turning, the servo in the car does movement, but not smooth, but stepwise (the servo turns by required 90 °, but by doing it in the following way: turn e.g. by 15 ° -> stop -> turn by 15 ° etc. up to 90 °) during such movement, the LED notifying about receiving the radio signal flashes with a lower frequency. Similarly, the motor, instead of making a continuous rotary motion, performs a stepwise motion in accordance with the LED blinking frequency. If, on the other hand, I do not press anything on the remote control, the diode flashes with greater frequency.
Pilot code (emitter):
Car code (receiver):
PWM is fixed so far. I had an idea to solve the problem so that when the first signal was received, the values responsible for the control were saved, the program would continue to use them, but every few executions of the void loop so that their values were updated. Maybe that would help with car tagging, I just don't know how I could do it. Perhaps it is the fault of the poor quality of the transmitter and receiver, if someone has already encountered such a problem, please help. I would like to add that the values obtained from the signal are correct.
recently I started to be interested in the Arduino platform. So I decided to implement a remote control car project of my idea. So I built a remote control and a car at the beginning on contact plates, both are based on the Arduino Pro Mini 16 MHz. They include:
Remote:
- analog joystick module ps3 5V (two potentiometers and a button),
- regular button,
- XY-FST 433 MHz radio transmitter
Car:
- led diodes,
- Tower Pro SG90 servo 9 grams,
- DC 5V motor with gear,
- L293D H bridge for DC motor control,
- buzzer,
- radio receiver (sold with the transmitter),
After uploading the programs to the remote control and the car, everything works, but not quite as expected. The problem is that there are large delays in operation in the car's system, i.e. when I tilt the joystick on the remote control (e.g. to the left maximum) responsible for turning, the servo in the car does movement, but not smooth, but stepwise (the servo turns by required 90 °, but by doing it in the following way: turn e.g. by 15 ° -> stop -> turn by 15 ° etc. up to 90 °) during such movement, the LED notifying about receiving the radio signal flashes with a lower frequency. Similarly, the motor, instead of making a continuous rotary motion, performs a stepwise motion in accordance with the LED blinking frequency. If, on the other hand, I do not press anything on the remote control, the diode flashes with greater frequency.
Pilot code (emitter):
Code: C / C++
Car code (receiver):
Code: C / C++
PWM is fixed so far. I had an idea to solve the problem so that when the first signal was received, the values responsible for the control were saved, the program would continue to use them, but every few executions of the void loop so that their values were updated. Maybe that would help with car tagging, I just don't know how I could do it. Perhaps it is the fault of the poor quality of the transmitter and receiver, if someone has already encountered such a problem, please help. I would like to add that the values obtained from the signal are correct.