Saturday 29 June 2013

Automated Gantry Version 1.0 is complete

I am now deeming this stage that I'm at Automated Gantry Version 1.0. It can now carry out a storage and retrieval function and has all components connected and functioning. In saying this, everything is still too inaccurate for an inventory system so a the moment the storage and retrieval works off an input coordinate, not an item number input. This requires will require more consistency, which cannot be achieved by lego. In addition to that, the teethed pulley hub which was 3D printed was not printed accurately enough to get maximum grip to the timing belt. Thus to get the right tension to make it work, I had to make the x axis longer  using lots of tape to hold it in place. I was in a rush because I had to get the prototype submitted the next day for school.

Flaws exist but nonetheless the robot does function decently where it is at now. A video of this is below consisting of scenarios each at a different angle of the store function being run (to coordinate 15,5), a home function being run (so the robot has to move back to the start position, otherwise it'll just go down and pick up straight away which is no fun), and then the get function (back to coordinate 15,5).

Images of the physical changes and current state are below (The little blue thing is a blue lego brick with a piece of thin steel double sided taped to it. This is meant to represent the fridge).




Aside from the physical updates the code has also changed. On top of a few small value tweaks, a store and get function have been added. These right now run off a coordinate following the function. Eg store 18 3. The other change is that now upon start up, the robot will run routines servo up and home so that it will automatically reset its position to 0,0.

The new code is below:

Whilst blogging this, I have only been producing documentation for my IPT project. The user manual for this version as well as a few diagrams are below:

USER MANUAL:
Manual Control: This is done by use of a number of in-built commands stored in an array. When these commands are entered into the serial input, they will execute a routine which is assigned to that command and perform an action. These are in the table below (“ “) means a value must be written).

Command
Routine
Function
xf
XForward()
Move X-axis forward
xs
XStop()
Stop X-axis movement
xr
XReverse()
Move X-axis backwards
yf
YForward()
Move Y-axis forward
ys
YStop()
Stop Y-axis movement
yr
YReverse()
Move Y-axis backwards
se
ShowEncoders()
Print the current coordinates (in the form “x” “y”)
re
ResetEncoders()
Reset the coordinate value to 0,0
xy “ “ “ “
PickUp()
Move to the written x (input value in first “ “) and y coordinate (input value in second “ “)
IMPORTANT: Only values between 0 and 20 for x axis. Only values between 0 and 10 for y axis.
servo “ “
DriveServo()
Move servo to position “ “. This lowers and raises the electromagnet (The Z-Axis)
IMPORTANT: Only values between 60 (highest point) and 230 (lowest point) should be inputted.
solon
SolenoidOn()
Turn electromagnet on.
soloff
SolenoidOff()
Turn electromagnet off.
home
Home()
Move x and y axis back to starting position (0,0)

Automated Control:
Storing:
To store an item, you must tell the robot through the serial monitor input that you have an item in the docking bay which must be stored. To do this we enter the command Store. This tells the robot that it is going to the docking bay, and storing an item in an available space.
However, in accordance to the old layout of storage, each row will be dedicated to a certain model of fridge or freezer. Thus, you must also tell the robot, what row and column the fridge is being stored. This can be done by adding a space and then inputting an x y coordinate after.
The final resulting input line could for example be:
Store  15 6
Once this is typed into the input, press enter on the keyboard or click send to initiate the command. From here, the robot will complete the storing process.
Retrieving:
The retrieving process is conducted almost exactly the same as the storing process. Instead of the store command being typed into the serial input, type Get. This will tell the system it must retrieve an item and bring it back to the docking bay. However, you also need to input which model you wish to retrieve. To do this after a space, type the x y coordinate of the item you wish to retrieve.
The final resulting input line could for example be:
Get 15 6

Once it is typed, press enter or click send to start the retrieval. From here the robot will do everything else. 

CONTEXT DIAGRAM:
BLOCK DIAGRAM:
MASTER CIRCUIT:

The robot still hasn't got all the functionality I wanted so this Sunday I will begin the making of version 2.0. This will most probably have the exact same hardware and circuitry (possibly a few modifications) but will most significantly have a new structure built out of aluminium with the perfect tension for the timing belts and an inventory function which works off an item's stored location not a coordinate. 

1 comment:

  1. Goddammit Daniel, give me GitHub's syntax highlighting.
    Like, what was the point of uploading it to Gist?

    ReplyDelete