Introduction: Let's Make Robot - U-Bot
This is the 1st post regarding with Robotics. In this post I will guide you to make your own robot step by step. Robot includes Mechanical design, electronics circuit design, and firmware development. Robot is a Machine specially one programmable by computer capable of carrying out complex series of action automatically
This robot i used to build to learn some basic aspects of robotics like sensing, processing, controlling.
Step 1: Mechanical Design
To build chassis of a robot I used MDF (Median Density Fiber). A reason to choose MDF are it is light in weight, it provides rigidity to the whole robot as compare to other materials, MDF is less expensive. In this case I cut MDF in a U-Shaped. U shape is much more useful in two-wheel robot it provides 3 wheel contact to the ground as well as it provide equal weight distribution among these contacts. You can take reference of this frame structure and design your own robot chassis. To make individual compartment are spaced by using six to eight inch nut and bolts it creates spacing between each compartment. Space are used to mount motors, drivers, all electronics circuits, control switches, batteries etc in between. two SLA(slealed lead acid) batteries are placed sucha that weight is equally distributed on two wheels. One 12 volt battery is used as a dead weight (if required it can be connect in parallel with two batteries in order to we get more amount of current)
Step 2: Electronics Design
In electronics there is one microcontroller (brain) is used to control an overall controls of a robot. Sensors are a device that takes input from external environment and convert that into equivalent electrical signal. In this robot there are some basic sensors 2 SHARP IR Sensor, HMC5883 Magnetometer, 2 EC-11 Encoder, Battery Current Sensor. SHARP is an infrared sensor which used to detect obstacles in a range between 10 – 80 CM. it is connected to an ADC0 and ADC1 channel of a Microcontroller. HMC5883 Magnetometer sensor is a compass which detects orientation of a Robot with respect to magnetic north and South Pole of an earth and it gives appropriate 16 bit value with respect to it. It is connected to an I2C Channel of a Microcontroller. EC-11 Encoder is a quadrature encoder it is used to detect rotation of a wheel. It generates two pulsed from one encoder which are 90 degree shift from each other first encoder is connected to External hardware Interrupt source and second one is connected to digital I/O Pins ( in this case I didn’t used encoder there are one measure reason I will explain later), Battery Current Sensor is connected to ADC 5 channel. it is simple voltage divider network which downs 12Volt to 1.2Volt.
Step 3: Actuators
Actuators are nothing but transducers which convert electrical signal into mechanical motion. In robot there are two 12 Volt 300RPM Motors which convert electrical signal into rotational movement to drive these motors there is one Dual channel motor driver which is used to control direction of motors as well as speed of a motors. Cytron Motor driver is used which is operating in 12volt.
Step 4: Controls and Indicators
there are four push buttons on a robot these buttons are used to control specific mode of a robot (Manual mode, Auto mode, Serial mode). All switches are being active high and all are connected to a digital I/O pin of a microcontroller. There is one joystick switch is there which is used to control forward, reverse, left, right motions of a robot and that is connected to a ADC2, ADC3 pin of a microcontroller. On a robot there is one 16×2 LCD display which used to indicate information to the user on a display. Display is connected to a 7 digital I/O pins of a microcontroller. Electric buzzer is there on a microcontroller and that is connected to a single digital I/O Pin.
Step 5: Interface
To communicate with a computer or laptop there is a PL2303 USB to TTL module on a robot. That is connected to a UART section of a microcontroller.
Step 6: Power Source
Two 6Volt 4.5Ah sealed lead acid batteries connected in series with each other and that provide power to whole systems. There is one 12Volt 1.2Ah battery that is optional. We can connect both 12Volts with parallel with each other in order to get more current. Whole microcontroller based system consume 5Volt and magnetometer module consume 3.3 Volt. In order to get these voltages from 12 Volt power source there are two LM2596 switching buck regulator modules are being used in order to get constant 5Volt and 3.3Volt output. Cytron motor driver take direct 12 Volts directly from battery. To charge whole batteries there is XL6009 boost regulator module is used. Module take external 12Volt DC input and it gives 15Volt output to charge 12Volt lead acid batteries.
Step 7: Programing
To program this robot I used Atmel Studio 7.0. That is used to generate .HEX file for microcontroller. To burn a .HEX file inside of a microcontroller there is third-party software AVRdudess or you can use command line to flash hex file.
Step 8: Block Diagrams and Pin Connections
BLOCK DIAGRAM – A
external source is external 12volt supply that goes to a boost converter that 12volt boost into 15Volt by sawitching regulators by doing that a lead acid battery is charge. those 12 volts again step down into 5 Volt and 3.3Volt by buck converter. Constant 5Volt and 3.3Volt supply to respectivve circuits. motor driver recieves direct 12Volt input from battery.
BLOCK DIAGRAM – B
Step 9: CONNECTIONS
PORTA – Sharp Sensor [0, 1], Joystick switch [2,3,4], Current sensor 
PORTB – 16×2 LCD [0,1,2,4,5,6,7], USBasp[5,6,7], Motor Driver PWM A 
PORTC – Magnetometer[0,1] Push Buttons[2,3,4,5], Motor Drive DIR [6,7]
PORTD – UART Interface[0,1], Encoder 1 [2,3], Buzzer , Motor Driver PWM B 
Step 10: Assembly of a Robot
Robot consist of 4 U-shaped pieces which are connected one into another. 8mm nut bolts have been used to provide specific height. Height must be well enough to mount all components in between them.
Lower most compartment is used to mount motors and motor driver. Motors are connected to the base via L brackets. 2.5mm nut bolts are used to joint L bracket with a base frame. Second compartment is used to hold all electronics parts as well as batteries. Electronics include microcontroller circuits, sensors, buck-boost converter, master switch. Batteries are placed such that all weight should be on the side-wheel of a robot which provide efficient drive. Robot doesn’t get skid on a surface. It provides stability to a robot. Third section is used for display and control switches and joystick switch. Very top most part of a robot is used to put any type of language of maximum 10 KG. It can also use to hold a laptop, or other accessories. User can increase a compartment as per their requirement.
Step 11: Working
U-bot robot is operate in three different mode. Mode can be select using three push buttons which are there on 3rd compartment of a robot .
Mode 1 – mode 1 is manual mode operation in manual mode robot receives input from joystick switch. Joystick switch is consist of two potentiometer and one switch these two potentiometers and switch are connected to ADC2,3,4 channels of a microcontroller. it receives analog input and it proportionally convert into a certain actions like forward, reverse, left, right, stop. Analog input can proportionally map into variable speed of a motors.
Mode2 – mode 2 is automatic mode once robot enters in a this mode robot start moving forward and avoiding obstacles by their own by adding additional sensors user can increase sensing part of a robot. For this time I used only two sharp sensor and magnetometer. Sharp sensors are infrared sensor that used to detect obstacles in between 10cm to 80cm. magnetometer is used to develop straight path of a robot. By receiving compass reading robot can move straight path. if robot deflects from its mean position it will generate error. that error is corrected by adding proportional speed into opposite wheel. robot is tuned such a that there are less oscillations.
Mode3 – Pl2303 module is used to communicate with a computer or laptop. To communication with a robot by serially sending character of A, S, D, F. A = forward, S = reveres, D = left, F = left, rest of all are for stop.
Step 12: Videos
Thank you all
for more information contact - email@example.com
We have a be nice policy.
Please be positive and constructive.