Every and any colourful thing can be detected by the image processing technology. The purpose of this project is to show how a RC toy can chase a typical Yellow sponge ball. The whole project powered by Raspberry Pi that must identify and follow a yellow sponge ball using OpenCV, a library of programming functions for real-time computer vision and image processing.
First, let's tweak our RC Car. Take off things we don't need, like the extra frame. Keep the base, Direction motor, and Speed motor – these are what the motor driver uses to make the RC car go as the Raspberry Pi directs. It's like giving the car a makeover to follow new instructions and move just how we want it to!
Now that we've fixed up our RC car, let's take out its RC circuit and make the wires longer. This way, it's easier to connect them to the motor driver. Simple steps for smoother connections and more control over how our car moves.
Additionally, I attached the DC to DC Buck Converter where the RC circuit used to be. This converter changes the 12V DC power to 5V, allowing us to provide power to the Pi4. It's like a power translator, making sure the Raspberry Pi gets the right amount of power it needs to work smoothly.
Next up, I'm using Fusion360 software to create the base for my RC car, matching the design you see in the picture above. After designing, I 3D printed the part and attached it to the RC car. Now, we can easily stick or attach our components onto these plates, making it a simple and effective setup.
With the help of double-sided tape, I'm now securing the Raspberry Pi on top of the plate. At the back plate, I've positioned the battery, and above that, I've placed the motor driver. On the front side, I've attached the Pi Camera. Each component has its own 3D-printed case, and you can find the links if you'd like to use them too.
For power, I'm using a DC socket to draw energy from the battery. I've also soldered wires for both the buck converter and motor driver. To keep things organized, I 3D printed a small holder for the DC socket, attaching it to the side of the RC car chassis. Using Feviquick, I securely glued this holder onto the RC car. This way, everything stays in place and looks neat, ensuring a tidy and effective setup for our modified RC car.
Let's connect the motor wires to the motor driver. Make sure the Direction Motor Wire goes to 'Motor 1' and the Speed Motor Wire goes to 'Motor 2' on the motor driver. Keep the connections as it is, as I've specified these pins in the code. To power up the motor driver, connect the DC power socket output wire to +12V slot and GND to negative. Insert the wires into the designated slots and secure them with slot screws.
Now, I'm using a Pitch Female Berg Strip Connector, attaching it to the Raspberry Pi GPIO pins. Solder the specific pins mentioned in the code. Follow the circuit diagram to connect all the wires for power and motor driver. This careful wiring ensures everything works smoothly, so take your time to double-check the connections and make sure they match the diagram.
Our hardware setup is done! If you have any questions or are confused, check out my YouTube video. I go through each step with explanations to help you out.
Software & CodingIn our project, we're using OpenCV. To proceed, watch my video guide on installing OpenCV on your Pi4. For the project code, drop me an email at [amarkkr697@gmail.com]. I'll promptly share the code with you.
Want one for your self...?If you're interested in purchasing the entire project, feel free to reach out to us through our social media handle. We'd be happy to provide you with more information and assist you with your purchase.
Comments
Please log in or sign up to comment.