In the Part 1 I wrote about an idea and a basic scheme of a self-learning robot "My turtle" I am going to create. The first part is described here.
This part is about creating a mechanical base for this project. Generaly we can say it is a robot car. You can find a lot of pages and videos about constructing robot cars so I will focus to important or interestings parts only of My turtle.
Hence the first goal was to create a robot car that will start to exist and do these basic actions:
- do nothing
- move forward
- move back
- move to the left or right forward
- turn to the left or right
- turn its head (with an ultrasonic sensor)
As follows from the first part I knew that if I want to do many diffrent actions and read values of more sensors I will need to use more Arduinos. Fortunatelly the price of Arduino Nano on ebay is around 2.50 EUR only so to connect more arduinos together can give us more pins and more memmory for a software.
But first I had to find out how two or more Arduinos can cooperate together to know how many pins I will need for it. To my suprise it is very ease to do and we need to use pins A4 and A5 only that were set for I2C communication by Arduino's creators. The great and easy explanation is in this article:
https://www.instructables.com/I2C-between-Arduinos/
So I decided to put into the base of My turtle with one Arduino a movement unit that consists of motors, motor drivers, an ultrasonic sensor, a servo motor that turns the ultrasonic senor, a front and rear bumper, bluetooth module and, of course, a power supply.
I had step motors 28BYJ-48 with motor drivers UNL2003. They are slow (only 15 rotations per minute) but just suitable for My turtle that must do precise and considered movements like a lunar robot. Their voltage is 5V as Arduino has so it seemed I can spare some time not to solve more power supplies.
The basic requirement for the power supply was to be portable. I used here a solution from my previous electronic projects. I took a battery from an old broken tablet and joined it with a charging module from a portable charger for phones. Such module charges a battery of voltage about 3.5 V with a 5V charger and supplies 5V from this battery to our circuit. It is cheap to buy it sepparately from ebay too. The battery I used is 4500mAh, 3.75V, so it seemed to be power enough to supply enough current to the circuit. Its another advantage is it is flat so it does not take a lot of space in My turtle.
All the parts of the movement unit are connected to the power supply as in the picture:
Arduino is connected to the power supply with its 5V pin. Arduino must have its own switch. When we load a new code to Arduino and join it with a PC through an USB cable, it would power all the circuit and it can damage Arduino.
Step motors are not in the picture, they are connected to motor driver modules.
Individual components are connected to Arduino this way:
- PIN 0 - TX of BT module HC-05
- PIN 1 - RX of BT module HC-05
- PIN 2 //reserved for causing an interrupt if I need it
- PIN 3 - Servo motor SG09 (orange wire) / PWM pin
- PIN 4 - INT1 of right stepper motor module ULN2003
- PIN 5 - INT2 of right stepper motor module ULN2003
- PIN 6 - INT3 of right stepper motor module ULN2003
- PIN 7 - INT4 of right stepper motor module ULN2003
- PIN 8 - INT1 of left stepper motor module ULN2003
- PIN 9 - INT2 of left stepper motor module ULN2003
- PIN 10 - INT3 of left stepper motor module ULN2003
- PIN 11 - INT4 of left stepper motor module ULN2003
- PIN 12 - Echo of utrasonic sensor HC-SR04
- PIN 13 - Trig of ultrasonic sensor HC-SR04
- PIN A0 - left front bumper (switch ON/OFF)
- PIN A1 - right front bumper (switch ON/OFF)
- PIN A2 - rear lef bumper (switch ON/OFF)
- PIN A3 - rear right bumper (switch ON/OFF)
- PIN A4 //reserved for a communication between Arduinos
- PIN A5 //reserved for a communication between Arduinos
- PIN A6 //not used yet
- PIN A7 //not used yet
I decided to make the chassis from a plywood. Later when I will work on finishing works of My turtle I will join it to the body that I will make from the plywood too.
A challenge appeared when I fixed front wheels and had to solve a rear wheel. It should be a freely rotating wheel that will not block front wheels when they move. But I had no such wheel and could not find a solution. As a wise man said: "If you don't know ask your children". So I asked my creative daughter if she has an idea. She said: "I will show you something....". Then she showed me the video about an Apple car and told me: "It should have a wheel like this".
I said: "Great, but how to do it???" But then the idea revealed and I said: "Wait, I got it!" In few minutes later the head of an old deodorant was cut off and used as my third futuristic wheel.
In a next part I will solve bumpers yet. As it is a sensor of hitting something, probably it will come with the final body of My turtle.
Ultrasonic headMy turtle should have a head to be a normal turtle. I used an idea from other robotic cars where the ultrasonic sensor is put on the servo motor that turns it to the left or right and can find out obstacles around the car. I made the head now to be able to turn the head but I will use the ultrasonic sensor in the next part of this project.
The software part shows basic procedures I made for the movement unit. Loop() actually randomly chooses an action and does it.
In the next part I am going to set the ultrasonic sensor to catch obstacles in the way and make a simple app for bluetooth communication. If it is finished I will give here the link.
Actual links
Comments
Please log in or sign up to comment.