UCC monorail project.
UP: Steves AI Robots Index.;
Next: dual Sensorless DC motor driver.;
Prev: Help and support.;
A small monorail loop could be wall mounted around the edge of the ucc
clubroom at sufficient height to avoid any interference or consumption
of space in the room.
Using an ITX PC netboot pc for high level control and additional user
interface functionallity.
An AVR microcontroller for control of onboard hardware.
An aluminum carriage about 300mm long with 2 inverted solid rubber
wheels which can travel along the top of a 25mm diameter round pipe, the
idea is that the payload will hang under the carriage balancing it atop
the pipe.

prototype carridge
The carriage is constructed from 25mmx10mm rectangular section
aluminum bar and quite solid.
The track is suitably constructed and will support upto around 10kg of
carridge.

new version of carridge top down view.

new version of carridge top outer view.

new version of carridge view bottom.
The monorails AVR Mega 32 based driver control PCB is derived - being designed as a general purpose motor driver
circuit see the motor driver pages at Sourceforge.
Robotx.sourceforge.org.H_Bridge driver page.;
The AT MEGA 32 microcontroller pinout information specific to the monorail application is as shown below.
pin40 ADC0 and
pin39 ADC1 are motor current sensing resistor inputs.
pin35 ADC5 is the battery voltage monitor is battery voltage level
(0-20v range)
pin 38 ADC2 is temperature sensor input from lm35dz ic.
pin37 ADC2 input from an photodiode to detect obsticales at front end of robot.
pin36 ADC3 input from an photodiode to detect obsticales at back end of robot.
pin17 INT1 and
pin29 PC7 are for a quadrature encoder input (to measure distance
traveled and velocity).
pin4 is output to infra red diodes driven with a square wave
for detecting photoreflection from obsticles.
pin3 INT2 is input from IR receiver, for remote controll
PORT B0 and
PORT B2 drive red and green indicator leds to show system status.
8 Variously selected pins operate a 16x2 character LCD screen.
3 input buttons allow direct user interaction with the LCD screen
to display status , adjust settings and control the monorail.
4 pins on port C drive the Main Motor.
the RX - TX uart pins are used for the serial communications.
the 4 SPI pins are used for in system programming header connection.
The control communications is implemented as an RS232 compatible with simplex timing.
The eeprom file system in the microcontroller log or stores various information and loads it on powerup.
class drive{
allowing the following types of information to be maintained
short int ramp_time; or rate. =3 seconds
2 slowdown time. =3 seconds
3 top speed. =100%
4 count down timer varable. =0
5 quadrature set. =0
6 quadrature count. =0
battery low level. =11volts
battery high level. =14 volts
direction and state =forward and stopped.
present pwm setting.
present calculated velocity.
battery level.
The control loop has a state machine to allow the
following different modes of operation,
1 Stopped.
2 Ramp up to speed.
3 Driving constant speed.
4 Slowdown to stop.
The following conditions will allways cause a stop.
end stop detected for present direction activated.
emergency stop pressed.
power station detected and battery low.
a set of switches to enable the following optional stop conditions.
1 stop at power station.
2 stop on count down timer expired.
3 stop on less than quadrature set.
4 stop on more than quadrature set.
In the stopped state the following switches should be relevant.
1 enable reverse and restart bit ( autoset when ever diagnostic button
is pressed, cleared by emergency button ).
Thats pretty much what would be required for the micro to do for us,
not a huge program but it would be usefull
for both testing and for high level control interfacing is the AVR up
to handling this sort of thing.
Also need a DC-DC PSU to run it from a 12 volt SLA cell
any donations appreciated, or anyone know the cheapest source for a
DC-DC
PSU ??.
Am thinking using solid state compact flash ide drive storage to boot
it,
and wavelan card to communicate. ( needs to be shock resistant -
monorail)
AVR software
Visit the sourceforge web pages for the latest versions of the
avr monorail c code;
The monorail control loop runs from a periodic adc interrupt -it uses
maintains it uses a statemachine it has 4 main states ramp up, cruise,
stopping ,stopped.
conditional information, including a loop counter is used to
switchstates.
see file monorail.[ch]
The servo PWD signal generator is an periodic timer1 interrupt loop
statemachine.
see file servo.[ch]
The Quaderature inputs use external interrupts to progress their
position counters.
see file quad.[ch]
The IR-Remote control sensor routines allow IR remote control of the monorail
which was used during testing.
PWM Images



Parts List
rail carrage total weight for the carridge frame,motor and drive train is 2.4kg's
mainframe for carridge constructed from 25mmx10mm cross section aluminum flat bar as listed below.
2 x 170mm lengths 8mm diameter bright mild steel shaft
3 x 360mm lenghts of 10mm x 25mm aluminum bar
2 x 170mm lengths of 10mmx25mm aluminum bar
Two side cover- bearing retaining plates are 65x20mm L angle 300mm long each with holes 50mm from each end (200mm apart).
These also act as feet to stand unit on when upside down.
other fixings
various 4-5 mm machine screws
4 x 5mm machine screws
1 x 50mmx10mm drop down bar for attachment of payload
4 of 5mm wide x 8mm inner 16mm outer diameter roller bearings for 8mm wheel shaft running
2 of 3mm wide x 4mm inner 8 mm outer roller bearings (pn MR84A-ZZ-ECO) used for the belt tensioner free wheel
2 x 32mm wide 58mm diameter solid rubber wheels ( which are machined into a concave shape )
4 x timing sprockets as listed below
[1] (EA) P-T5-020-100FF-ALU-SET-06.000 Teeth (No.) :20
[2] (EA) P-T5-028-100FF-ALU-SET-08.000 Teeth (No.) :28
[1] (EA) P-T5-027-100FF-ALU-SET-08.000 Teeth (No.) :27
2 x timing belts as listed below
[1] (EA) B-T5-065-100-PS Teeth (No.) :65 @
[1] (EA) B-T5-130-100-PS Teeth (No.) :130 @
2 motor spacer blocks 30mm *30mm*30mm pine wood cubes with a 5mm hole through the center.
one motor mounting plate 3mm thick ,130mm long 40mm wide flat bar.
1 x geared 12volt motor (jaycar electronics STOCK-CODE: YG2738)
Torque 50kg/cm
Rated Voltage 12.0V
Operating -
Current - No load 270mA
Current - Full load 11.7A
Gear Ratio 100:1
Shaft Speed 140RPM
output shaft size 6mm
2 IR leds and photo diodes arranged to detect objects by reflection
2 25mmx25mm x1.6mm aluminum angle for end stop sensor mounting brackets
150mm*200mm * 3mm thick aluminum plate for motor block mounting
1 x 4 way high current pcb header socket for motor drive pin1 =gnd,pin2
=+12volts ,pin3 = motor -ve , pin 4 motor +ve.
1 x 4 way pcb header socket for micro switch connectins pin 1 and
2switch forward, pin 3 and 4 reverse switch.
2* 270mm long 20mm x 20mm X 3mm aluminum angle for ITX PC case
mountingfrom drop bar attached with 2x4mm machine screws
1 * 20mm * 200mm * 3mm aluminum bar bent as bracket to hold SLA
batteryin position.
1 * 4 AH 12 volt rechargable battery
Photo of Microcontroller circuit board

mini ITX PC

2x8 pin header connector for ITX case connector ( for pinout see
ITXmotherboard manual )
2*case mounting momentary push buttons
3* 5.5mm diameter leds
6x 12mm long brass 3mm threaded standofs
mini ITX motherboard ( in this case the VIA EPIA-M series )
mini ITX DC-DC power adaptor
1x 512MB DDR333 memory
210mm x 450mm x2mm aluminum plate bent first to a 10mm,190mm,10mm Uform
for reinforcment.
then to a 150mm,250mm,150mm U form as the ITX motherboard and
DCpowerboard mounting plate
1x 146mm x 246mm x2mm plate with a 45mm x 160mm wide window for
ITXbackplane connectors,
and 2 7mmx40mm holes for USB and DV connector bracket.
1x 146mm x 246mm x1.2mm plate for back cover.
2* 25mmx25mm *250mm aluminum angle for reinforcing bars for case top
1* 185mmx246mm top cover plate ( perspex or similar )
Track
25mm diameter steel conduit tubing.
wall mounting brackets are 230mm long 25mm*5mm steel bar with a welded
branch which provides a 115mm standoff distance. Track tube is attached
to brackets with 8 gauge self tappers thru into the bottom of track.

The 25mm tubing is joined together using 200mm length of 20x10mm square
steel bar which has 3 5mm threaded holes in it through which 5mm
bolts clamp it to the inside bottom of the steel tube. The 5mm bolts are
inserted from the outside bottom of the tube through a 200mm length of
20x6mm square steel bar with 3 holes which acts a washer and pressure
plate on the outside bottom the the joined sections. The joins can be
easily disassembled.
corner bend radius 700mm.
RS232 Serial interface 3 wire GND RX TX
and control protocol
115200 baud 8N1 format serial
Most commands are one byte commands
f = forward
s = stop
r = reverse
i = ascii human readable state and general information is returned
d = packed byte format machine readable information is returned
etc (see command.c file for details)
Other commands use non ascii command codes(codes 128 upwards) and
datapackets and produce machine only readable data formats
Monorail test photos.
On 18/1/2004 the monorail carridge was tested on the completed track
and photos of this are below.
The onboard PC is not installed fo these tests It was under control of
an IR remote control signal - the AVR pcb has an IR receiver and this
was used to stop and start the unit during testing. It successfully
completed several traversals of the track after some minor adjustments
the track is around 12 meters long and the traversal time was around 10
minutes using a stepper motor drive.

And from another angle

and last one

Plans are in hand to change to a DC motor in order to increase the
speed considerabley, and develop a current feedback H bridge drive with
regenerative breaking.
avigate.include"
Created 21/12/2003 Last update 11/11/2004 author S.Humble