Git Product home page Git Product logo

elektronikprojekt's Introduction

School Project - Self-driving RC car - Ela21, YRGO

Fig.1 - The final version of our car.

Introduction

The aim of this school project was to transform a radio-controlled car into a self-driving car, capable to win a race on a race track. But the desire to learn led to completely different goals. As i was responsible for software development, i took the opportunity to fill these weeks with as many new experiences as i could come up with.

Development environment

All code was written in Visual Studio Code using the PlatformIO extension and the wizio-pico

CARISMA GT24TR 1:24 4WD MICRO TRUGGY RTR

The car that was chosen met the competition rules size requirements. Also appeared to have sufficient ground clearance, strong brushless motor and support for 2s lipo battery.

Arduino Nano RP2040 Connect

Tired of the arduino uno we used in school, I looked for a more powerful MCU. Preferably with floating point support which could come in use for the pid regulation.

VL53L0X TOF - distance sensor

Two sensors were found among the leftovers from last year's students. The official drivers were really heavy. But found this lightweight driver made by artfulbytes. This lightweight bare metal drivers were easy to follow so i made a port but slightly different..

MPU-6050 IMU

This Six-Axis gyro was also found among the leftovers. All info about registers was clearly written in the data sheet but it was harder to understand how to use this device properly. A few days were clearliy not enough to master this device.

QUICRUN 10BL60 ESC 1/10

Cheap and relatively small ESC was bought to come further in the project. Had to remove the brake function to enable a proper reverse. The ESC was controlled with a 50Hz pwm signal that was based on a duty cycle of 1.5ms.

Savöx SH-0257MG

The 3-pole servo has built-in control and therefore requires only power and a pwm signal to change its position. The servo was controlled with a 240Hz pwm signal that was based on a duty cycle of 1.5 ms.

Drivetrain issues

Only a fraction of the power from the brushless motor was used. The reason was the high ratio to the transmission(5:1). When the power supplied to the engine was too high, the car ran the risk of either fly over the obstacle or do a backflip, see Movie.6. As the power was too low, the car could not pull itself up the obstacle. The difference between too much and too little power was very low and was hard to adjust. More time, a voltage regulator and a 10T gear should have helped alot. (Watch the movies at the end for more details.)






Fig.2 - schematics.






Fig.3 - pinplaning.






Fig.4 - This project actually inspired me to buy my own oscilloscope. A necessity if you want to debug or verify the communication regardless of whether it is i2c or pwm signals. Can highly recommend the 1104X-E.

flowcharts

Fig.5 - Overview.



Fig.6 - The pid regulation that turned out to work very well.





Fig.7 - The speed control function..





Videos

Watch the video Movie.1 - First testrun with drivetrain. However, the pid regulation was already tested by pushing the car forward by hand.





Watch the video Movie.2 - Obstacle avoidance system. Fun to develop. But caused issues when discovered the uphill obstacles.





Watch the video Movie.3 - Gyro in action. To solve the issue that was caused by the "obstacle avoidance system" a very experimental feature implemented like 2 days before the competiotion. Not ideal but fun tho.





Watch the video Movie.4 - Uphill start with gyro. worked like a charm.





Watch the video Movie.5 - Just before the competition. Top notch pid regulation. Without competitors though. Turned out that the "obstacle avoidance system" was a huge disadvantage in the competition. XD





Watch the video Movie.6 - High voltage issue. Too high voltage caused by a new charger. A voltage regulator would solve many problems and make adjustments more easy.





Watch the video Movie.7 - ESC issue. Too fast restart sets the Electronic speed controller in a "slow-mode". We knew the problem but thought we could handle it by wait 10 seconds every restart. Probalby caused by the capacitors and a better solution should have been to discharge them on shutdown.

elektronikprojekt's People

Contributors

dwunome avatar peter-strom avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.