Thursday 24 January 2013

Robotics: Receiving External Input

     The SSC-32 controller card has 4 pairs of pins that can be used to receive input signals from external devices. These are marked “A”, “B”, “C” and “D” and are beside the Baud rate setting for the serial port. 


     These inputs can be connected to switches and sensors to provide feedback on the positioning of the servos. For example, we can put a simple switch across the “D” pins at the end, and send a “D” or a “DL” message to the SSC-32, to get a message back that tells us whether the switch is open (ASCII “0” or 48) or closed (ASCII “1” or 49).


     To test this we just created another a simple program with a timer called "checkSensor". It works much like our other program, and simply sends the "D" command to check what state the D pins are in(open or closed). This program just logs the state of the input (either 48 or 49) every fifth of a second. Normally the output logs 49, but when we shorted the two pins together for a couple of cycles, the output changed to 48. It change back to 49 when we stopped shorting out the pins.




     We also tried changing the input from "D" to "DL". The difference between the “D” and the “DL” command is that the DL command is a latch. This means that once that switch opens, it will continue to return the symbol for 'open' until it is reset. The D command simply returns the open symbol only when the switch is open.
     When we ran this version of the program, we had to change the timer to fire every 3 seconds so we could see how it worked. When we shorted the input pins, the value being returned switched from 49 to 48, and it didn't switch back, meaning that the latch was successful.

     A latch could be used in a moving robot to detect if hits a wall. For instance, if a robot is moving at a certain speed, then hits a wall, it might bounce off. This could happen in between sensor checks the computer makes, which means the robot won't register it, and hit the wall again. A latch, however, will only allow the computer to hit a wall once, thereby avoiding possible damage to the robot.

Tuesday 15 January 2013

ODSS Electric Car Team

     For the previous years at my school, I have taken part in the electric car team. The purpose of the team is to design and build efficient electrical race cars. Generally, each year we revamp or scrap one of the older cars we have, and build a new car, with improved and refined technology. 


      Near the end of the school year, there are several competitions that allow us to compete with other high schools. There are 2 events that take place: the 12 volt race, and the 24 volt race. In the 12 volt, each car must draw power from a single 12 volt car battery, and complete as many laps as possible within one hour. The car that completes the most laps wins. In the 24 volt, each car is powered by 2 car batteries, and as such, the cars have plenty more power and lifetime, making a skilled driver much more important. Speeds in the 24 volt can reach up to 70km/h. In 2010, 11 schools from eight different school boards visited ODSS for this year’s annual electric car competition, which will test the distance traveled by each vehicle in 12-volt and 24-volt competitions. In 2009, Mr.Weishar, our teacher and team leader said the 24-volt winning car covered 38 kilometers in an hour while the 12-volt winning car traveled about 31 clicks.



       In this picture here, from 2010, you can see 3 of the cars built by our team. In the front, number 64, is one of the older models we have. It has a Styrofoam and fiberglass body and focused on maximum aerodynamics. That car is currently being revamped to more advanced standards this year. The next car, in the middle of the shot, number 21, was a successful experiment, in that we made the car as small and as agile as possible. The steering control was the same as an ATV, as in a handlebar that gave the driver more leverage than a steering wheel. That car has done quite well in competitions, all though it has the tendency to roll over at high speeds. Finally(and in the picture below), in the very back is the car we affectionately named 'The Tank'. The idea behind it was to have a heavier body, with a much stronger motor. We found it to be quite troublesome to build, quite hard to control, and overall severely sluggish. as such, it was scrapped for parts at the end of that year. The car that was built in 2011 is of course not shown here, but I'll mention it anyways. It uses a very smart boost power system, where a smaller motor powers the car around turns and other situations that call for agility, but on straightaways, the driver activates a much larger motor for a very powerful speed boost. So far, it has placed fairly high in the competitions it raced in. 
The Team was featured in the local paper during
 the 2010 competition that took place in Orangeville

       Overall, I have highly enjoyed being part of the team, and have learned quite a lot about design and innovation from it. It has given me a large understanding about the design process, and taught me skills that I will be able to carry with me throughout my life.

Wednesday 2 January 2013

Raspberry Pi and Robot Plans

          Allow me to show you the Raspberry Pi. It's a very capable computer for its size, just a bit larger than a credit card. The point of it is to introduce programming to kids, to help them build fundamental skills for a career in software engineering. The problem that the makers of this found was that kids were entering post-secondary education with less and less understanding of computers and software. Previously, kids would learn about computers by playing around with simple platforms like the Commodore 64. So the Raspberry Pi was created, a small computer built specifically for hobbyist programming. At its heart is a ARM11 chip, which gives it roughly the same computing power as a first generation Xbox or Playstation. It has 2 usb ports, one for a keyboard and one for a mouse, a lan socket, a mini usb plug to power it with a 5V power source, an RCA and HDMI port for video, and a SD-card slot that it uses for memory.


     My plan for the Raspberry Pi is to combine it with my robot arm to give it some autonomous abilities. The Pi appears to have the necessary features to communicate with the arm, and if it could be put on a chassis along with the arm, then we it would be able to roam around without the need to be connected to the stationary mac. We could write simple programs that would allow the arm to move around and interact with it's environment, such as picking up an object, or moving through a cluttered space by moving debris out of the way. We have also purchased an infra-red sensor, that can be used as a type of electronic eye that the robot can use to judge distances, as demonstrated by this video:
         For the actual frame of the robot, I was planning to make the simple chassis out of wood or lego, big enough to hold the robot arm, Raspberry Pi, a breadboard to connect the two, and the power systems, which will consist of a battery and circuitry to power the SSC-32 card the Raspberry Pi and the servos at the voltages they require. Initially we can just provide power via a cable to the AC power supply. We will also have to figure out how to make a serial data connection between the Raspberry Pi GPIO pins to the TTL Serial Port on the SSC-32 because they are different voltages. I want the robot to look a bit cleaner than just a chassis covered in wires and circuit boards, so I would like to use thin sheet metal to build an outer shell for it, to give it a more professional look.