Subrat Nayak - ROBOTICS@UF
Hello !!
My name is Subrat Nayak..
Graduate Student,
Electrical and Computer Engineering,
University of Florida,
Gainesville, Florida 32611, US.
Phone - +1-434-2291826.
EEL5666 :
IMDL Robot
sensor ppt
sensor ppt in pdf with notes
robot platform design is ready -- allinone-Model.pdf
weekly report1 - submitted hand written hard copy
iSTAND – I can Stand
A Self
Balancing Platform
to
demonstrate the concept of Inverted
Pendulum
iSTAND is a two wheeled self balancing robot. As we know a body cannot normally stand on two wheels. The analysis goes like this - the two point of contact of the body with ground can be seen as a straight line. For a body to remain standing and not tip over the vertical line of gravity passing through the body’s CG should pass through it self. Now for a line to intersect another line is always difficult in real time scenario. Any slight displacement of the body may cause the line of CG to miss the straight line formed by the point of contacts with the ground. This will cause it to tilt more and more, so it can never make up and finally falls. Now the challenge in this case is that whenever the line of CG misses the line of contact, we need to do some thing so as to ensure that it comes back to position of stability. For this the robot must move on its two wheels in the direction of the fall. But then how much to move and at what speed should it move is the challenge and the key objective of this project. Some parameters of the system that will come handy and needs to be sensed at any instant are the directions of tilt, tilt angle or the amount of tilt and rate of fall. These data are being sensed in iSTAND using an accelerometer and a gyroscope. On basis of the tilt data, the processor unit takes decisions and commands the motor controller to let the motors move in desired direction by specific amount in a closed loop control system and thus balancing is ensured.
The iSTAND system can be outlined by the block diagram below.

The Input devices form as the window of the system to the external world. The SONAR and IR sensors will combine to provide data about presence and position of obstacles around the robot system. In case these two sensors fail, the bump switches will be the last line of defense to detect any obstacle lying very near and touching the robot body. The wheel encoders will provide input about the angular displacement and the rotational speed of the wheels. While the Special sensor formed by combination of solid-state chip-based Accelerometer and Gyroscope will provide the data about the tilt angle with respect to vertical and the speed at which the body is falling/tilting in one direction.
The output devices are the mode through which the robot does actions that can be felt by the external world. The LCD display will be used to display Tilt Data and Wheel Speed, they can be used to keep an eye on various parameters of the system while testing and debugging. The Motor Driver will be commanded to drive the motors in desired direction and to switch the required amount of current from the Motor Power supply to the Motors.
The Brain of the iSTAND will be formed by the MAVRIC IIB board which holds the ATMEL ATmega128 MCU. It has a built in crystal clock with frequency of 14.7456 Mhz which is fast enough to provide quick response needed by iSTAND to keep itself balanced. The MCU is fully programmable using familiar languages such as C and BASIC will hold the balancing algorithm that will keep monitoring the input data sent by the sensors and send drive signals to the motor controller when needed as well as send data to be displayed on the LCD.

The mobile platform will be made symmetrical so that it can be easily balanced. It will have two big wheels driven by two bidirectional geared DC motors. The Encoder will be fitted directly onto outer end of the wheel axis.Since one of the key point that helps in balancing is that the CG should be as high as possible so the battery system will be mounted as high as possible on the robot body. Long threaded rods will be used to make the robot tall and move the CG high and at the same time provided rigid structure which doesn’t sway or bend while the robot tries to balance itself. This can be felt by comparing the difficulty in balancing a base ball bat about its handle and about the heavy rounded end, it’s always easier to balance using the lighter end below. This is simply because the heavier end with higher inertia takes more time to move and fall. While the lower end with lesser inertia can always move faster and try to reach a position in lesser time such that the line of CG remains between the two wheels.
Faulhaber 1524E006S motor with 141:1 gearhead and HES164A magnetic quadrature encoder




This little motor is the right size, speed, and torque for small wheeled mobile robots like mine. They are used motor bought for just 7$ from robotics store bgmicro.com
The pins on the connector are (see figure at right):

The encoder is connected via a 6 wire ribbon cable to a 2x3 0.1-inch spaced female-socket connecter. The pinout is:
Motor positive. Connect to GND or 3V-to-9V. Pin 1 is nearest the side of the ribbon cable with the stripe.
Encoder Vcc. Connect to 5V.
Channel A digital output. Pulled up to Vcc through a 10 kilohm resistor. Switches between GND and Vcc.
Channel B digital output. Pulled up to Vcc through a 10 kilohm resistor. Switches between GND and Vcc.
Encoder GND. Connect to GND. You can use the same GND for the motor and the encoder or you can use a separate ground if you're using a different power source for the motor.
Motor negative. Connect to GND or 3V-to-9V.
Encoder channels A and B can sink (connect to
ground) up to probably
25mA like most Hall sensors. There is only a a weak pull-up resistor
inside, perhaps 10K, so they can only source (connect to +5) about 2mA.
If one finds the logic high signal from the encoder channel is not
close
enough to +5, which can happen even due to loading by an LED, one may
want to add an external pull-up resistor from each encoder channel to
+5. 470ohms is a good choice.
To drive the motor, i designed the motor driver circuit for the dual full bridge driver STmicroelectronics L298HN which can handle 2A per channel.
Datasheet can be found at : - http://www.st.com/stonline/books/pdf/docs/1773.pdf
I designed the PCB for this SOIC SMD on the altium designer and cut it out on the T-tech quick circuit machine.


Sensors are the Input devices that form the window of the system to the external world.
I plan to use the MAXBOTICS LV-MaxSonar- EZ1 which uses only one Ultrasonic transducer compared to other competitive SONAR Sensors like the Devantech SRF05 and the Parallax PING. Hence the board size is smaller and power consumption is lesser.


Since the combination of SONAR and IR proves to be best for Obstacle avoidance as each makes up for the others draw backs in operating environment, distance of obstacle and accuracy of readings, I aim to put suitable IR LEDs modulated at 40Khz and compatible IR sensors.
In case the above mentioned two sensors fail, the bump switches will be the last line of defense to detect any obstacle lying very near and touching the robot body and make the motor stop else it may cause the current through the motor to go very high and cause damage to motor, circuitry and battery.
Attached to the motor.and used in order to measure the
angular
displacement and the rpm of the motor/wheel. This data will be used as
a feed
back to the control system used to achieve balancing.
I am yet to do more study on how they work and how I can interface them to the MCU to get stable accurate tilt data.
The
accelerometer is a device that measures static and dynamic acceleration
of
gravity with respect to the Earth. Using the static acceleration
measurements,
the accelerometer can provide an excellent measurement of the platform
tilt
angle. Unfortunately, there is an undesired result with the dynamic
acceleration measurements. If the platform were to be to accelerate
towards the
ground (e.g. falling), the increase in acceleration appears at the
accelerometer output (after all, this is what it is supposed to do!).
Because
of this, using the accelerometer alone as a tilt sensor is only
effective if
the platform is not accelerating. In addition, any vibrations that the
motors
create within the platform are also picked up by the accelerometer.
These
vibrations tremendously decrease your output resolution since a few of
the bits
will be lost due to noise. To remedy this problem, another sensor is
needed.
A
gyroscope is a device that measures angular rate/velocity. If the
output of the
gyro is integrated, the position of the platform can be determined.
Ideally,
the gyro can be used as a tilt sensor but there is an error introduced.
Gyroscopes tend to drift over time and therefore report inaccurate
information
and the running integration of the output also introduces small errors.
However, if the accelerometer and gyro were combined using a
complementary
filter, they would be able to help each other. The accelerometer would
correct
the drift of the gyro when the platform was not falling.
For the accelerometer, I am using freescale MMA1260EG: Z AXIS SENSITIVITY MICROMACHINED ACCELEROMETER ±1.5g .
Datasheet can be found at : - http://www.freescale.com/files/sensors/doc/data_sheet/MMA1260EG.pdf
I designed the PCB for this SOIC SMD on the altium designer and cut it out on the T-tech quick circuit machine.
For the Gyro, I aim to use the melexis MLX90609 Angular Rate Sensor ±75 °/s
Datasheet can be found at : - http://www.melexis.com/prodfiles/0005359_MLX90609_standard_datasheet.pdf
I designed the PCB for this CLCC32 SMD on the altium designer and cut it out on the T-tech quick circuit machine.
Due to the soldering difficulties inherent with the MELEXIS MLX90609, I also explored on an alternative to it. It is the GWS PG-03 SINGLE AXIS PIEZO GYRO designed specifically for and popularly used in RC toys, planes, helicopters, boats, etc to provide stability. Although I won’t be any more implementing this on the robot but I included some information about it in brief because I studied this and pursued it as an alternate option. This is also a single axis sensitive gyro as shown in the figure below.
I bought it from www.junun.org for $35 (shipping $ 4.60).
inside the GWS PG-03 ---



As shown in the diagram below typically it receives PWM signal (exactly same as the one given to drive a servo motor) from the RC receiver and in turn provides PWM signal output to a servo motor. The signal gets stabilized when sent to the servo thru this gyro rather than sent directly from the RC receiver.

I simulated the same using a signal generator to provide PWM signal that ensures neutral position in an un-hacked servo motor. The output was seen on a CRO, it gave exactly the same PWM signal as output after doing the setup adjustment. But under such a condition if the Gyro is given a angular rate about its rotation axis in one direction, the pulse widths in the output started decreasing like the PWM signal that causes the servo to move to 0 degree position and when given an angular rate about its rotation axis in the other direction the pulse width in the output started decreasing like the PWM signal that causes the servo to move to 180 degree position.

Hence, I concluded that if a standard PWM signal (neutral) is given as an input to this gyro using a 555 timer or the microcontroller, then the output contains pulses whose width indicates the angular rate of the gyro and hence, of the body on which it is mounted. This pulse width can be easily read by the microcontroller to determine the angular rate.
It will have the two most important behaviors of Static Balancing (stands upright in one place) and Dynamic Balancing (Stays upright while moving on flat and inclined terrain). It will also keep track of obstacle around it and will not only avoid bumping into them but also change its path. If time permits, I will make a mechanism with which it can stand up from horizontal condition on its own.