Tuesday, December 22, 2009

GP2D12 Optoelectronic Device

IR SENSOR enough for balancing.
you can directly access from internet for manual detail.

FEATURES
• Analog output
analog output make your job more easier, because you can directly connect to the PIC port. but remember that, the signal receive will have noise, then you need to filter it out. here i use capacitor 0.1uF. if you don't know the correct value please do an experiment.
• Effective Range: 10 to 80 cm
place your IR sensor in between the range for better performance.

• LED pulse cycle duration: 32 ms

• Typical response time: 39 ms

• Typical start up delay: 44 ms

• Average current consumption: 33 mA

• Detection area diameter @ 80 cm: 6 cm


Monday, December 21, 2009

design concept

before i go for more detail let me explain the design concept. hopefully can help you during design stage

Outline
  • introduction
  • objective
  • project scope
  • methodology
  • achievement
Introduction
1.The two-wheel balancing robot has the exact behavior of the inverted pendulum system which is known for its nonlinear andsystem.
2.The robot will balance it self by

controlling the rotation of the wheels which is the main objective.

3.The robot has three degrees of

freedom (DOF).

Objective
§Build an autonomous two-wheel balancing mobile robot based on the inverted pendulum model as a Mechatronic development project.
§To explore the possibilities of implementing a control system to keep the syste m in equilibrium.
§To implement PID controller to balance the robot in equilibrium.

Project scope

§To design & construct the structure of the robot.
§To design the electronic circuit of the robot.
§Implement digital PID control system for the balancing system.
§Develop a soft ware to control the balancing robot.

The mechanical design.


The software design

using PID controller system


The control system design.


Achievement






Wednesday, June 17, 2009

1st stage



at 1st stage testing using servo motor. after study mechanical part i change back the actuator to DC motor

Friday, May 22, 2009

PIC 16F877A & L293 motor driver.

what needed to make it live!

1). PIC 16F 877A microcontroller

2). Oscillator 4MHz.

3). Coupling 22pF capacitors.

4). 5 Volt and Vss pin is connected to Ground.

The balancing robot has two DC motors as actuators. In order to drive the motor, an interfacing

circuit between microcontroller and motor is needed because the microcontroller itself is unable

to supply high current to each motor. Typically, the microcontroller it can only source and sink

approximately 25mA from their output pin. Therefore, a motor driver L293B was used to drive

the motor.

CIRCUIT DIAGRAM


This is the simplest circuit after do some reference.

the region selected must in linear characteristic, the suitable distance to mount the sensor where

the sensor acting in linear characteristic is in between 5cm to 11cm. The performance from sensor

is optimum here and the robot can maintain in upright equilibrium position.

SENSOR-GP2D12 distance measurement sensor




Two GP2D12 distance measurement sensor ; Two general purpose distance measuring sensors

(GP2D120) were used on the balancing robot in order to detect the current angular position of the

robot. The sensors are mounted on Perspex plate and placed at the front and back of the robot.

The line of sight is toward the ground at an angle of 90 degree. The output of the sensors is an

analog voltage. The GP2D12 can sense a height from minimum 4cm to maximum 30 cm. The

robots always balance by measuring the height at the front and back of it-self and rock the wheels

to maintain equal height.

The sensitivity of the sensor is measured by selecting the region of linearity the sensor behavior.

Fig. shown, the output sensor reading with small noise and this noise are filter-out by capacitor.

Monday, June 23, 2008

two wheel balancing robot -mechanical design


The chassis design............



In this section, it will be discuss on how to build the chassis of two wheeled balancing robot and material selected. Therefore, a proper planning is needed to ensure this project accomplish. Furthermore, the design of the robot chassis is kept as simple as possible but not compromising the objective of the project.






i have no time to think other design because of limitation of time, by doing a research and comparing with other model from internet. this what i got heee. just a simple model, i make it from perspex.



The robot chassis design is constructed using 4 Perspex plate as bases, 2 plate with the same dimension (220x220mm) and other 2 plate with different dimension (220x170mm), 4 aluminum rod with 400mm long and 5mm in diameter, the robot is tighten by screw and nuts. The robot design is mounting in a layer for component and sensor placing. The chassis height can be lowered and increase when desired. This adjustment is useful for calculating the center gravity (CG) of the robot.



"this material i choose because to reduce the cost. the price is only RM25 ringgit including tires, perspex, aluminium rod bolt and nuts.





The controller.......



The controller is used to implement the control algorithms is PIC16F877A microcontroller from Microchip. The reason why PIC16F877A is chosen due to easy of programming, it only 35 single-word instructions to learn, it operating speed is 4MHz clock input with 200ns instruction cycle, operating with DC voltage. It memory include 8Kx14 words of flash program memory,368x8 bytes of data memory(RAM), 256x8 bytes of EEPROM data memory. It pinout is 40 pin and this is suitable for high input output control. The program language use in this controller is PIC Basic Pro.
The controller has the analog-to-digital (A/D) converter built-in, the feature in controller is very important for input and output hardware communication, for example sensor and the actuator.



i got this microcontroller from penang electronic shop cost around RM30 ringgit.



the actuator.......



The actuator is 12 volt DC motors. DC motors take direct current (PWM) voltages as input and convert it into rotation movement. DC motors are reversible by reversing the polarity of the voltage supplied to the motor. Varying the voltage input into the motor will vary the speed of the motor. The motors used must be fast responding and high torque. SPG50 60K DC geared motor from Cytron was chosen as balancing robot’s actuator. SPG50 60K motor is a DC Gear Head Motor with 60:1 reducing gearbox. The continuous torque of the motor is 588 mNm. The speed of the motor is 56 rpm.



you must select the proper geared DC motor because it will result the robot performance, what can i say is plez use the DC geared motor with high tork and low speed, i got this motor from my awek's friend(awek usop) heee....... she buy for me. thank!



but the price is very expensive!!, better find your own DC motor.
lot of money for this!!!

the sensor.......

Two GP2D12 distance measurement sensor and gyro sensor is using; Two general purpose distance measuring sensors (GP2D120) were used on the balancing robot in order to detect the current angular position of the robot. The sensors are mounted on Perspex plate and placed at the front and back of the robot. The line of sight is toward the ground at an angle of 90 degree. The output of the sensors is an analog voltage. The GP2D12 can sense a height from minimum 4cm to maximum 30 cm. The robots always balance by measuring the height at the front and back of it-self and rock the wheels to maintain equal height.

as you can see, in the chassis pic above the distance sensor is in the red colour.

i'm really tired rite now, i will continue writing for next post.


the developement of two wheels balancing mobile robot

here i would like to share my really amazing experience in developing the two wheels balancing mobile robot.

for those interested we can make this as a platform to exchange the technique and our knowledge.

it very very challenging to built balancing robot, complex system, and because of it; balancing robot have attract many Researchers to take the challenge.

this project is a part of my final year project during my studies at university (USM penang yeah!!!). and it work!

i will share with you the experience in 'the making of balancing robot'.