Robot logic

robot-logic

Started thinking about the logic for the robot. The first one that I used in my prototype from LuckyLarry’s website seems to be too basic, so I did a quick brainstorm and came up with the flowchart above.¬† The logic adds the complexity of using a range finder sensor on top of the servo. Robot should drive forward, unless it encounters an obstacle closer than 20cm. Then it should stop, look around and determine the next free path it should go. The most challenging bits are the ones that I colored in red: this requires some sort of sensory “knowledge” of the direction of the robot. If I had a spare accelerometer, everything should seem more simple: just get the data from the accelerometer and calculate the direction of the robot when it turns. All I have now is just SRF05 range finder so another thought came to my mind. At the point after robot scans the surrounding area, it should know the distance to the surrounding area with 10 degree resolution. For example:

  1. -90 deg | 70 cm
  2. -80 deg | 60 cm
  3. -70 deg | 50 cm
  4. -60 deg | 50 cm
  5. -50 deg | 40 cm
  6. -40 deg | 40 cm
  7. -30 deg | 30 cm
  8. -20 deg | 20 cm
  9. -10 deg | 20 cm
  10. 0 deg | 20 cm
  11. 10 deg | 20 cm
  12. 20 deg | 20 cm
  13. 30 deg | 20 cm

According to the logic, robot should choose path (1) by turning -90 degrees. Considering that before the turning head is facing 0 degrees, it should continue turning, until it determines that the distance is more than 70cm to the closes object, so the range finder should read all the way from 20cm to 70cm with a threshold of +-5cm.

Huh, seems that hardware setup was the easiest bit. Building smart software to run the robot is a bigger challenge and that’s what makes this project so interesting. :)

Hacking a toy car @ fizzPOP Howduino

IMG1716

This Saturday I had a chance to attend a fantastic Howduino event in Birmingham – a one day hackers workshop. This was my first experience in this type of event, so I came without any expectations. :) Once the the welcoming announcements were made everybody started hacking either by going to beginners workshops or working on their own projects. Steward from Kre8 joined me at my desk and we had a lot of fun working together.

The task

My task for the day was to transform this R/C toy car from ELC into an obstacle avoiding robot.

IMG1710

I chose this cute little toy, because each side of the wheels is controlled by a separate motor. This allows the car to turn around 360 degrees in one spot. There was one big challenge involved in hacking this toy car: I had to be able to assemble it back again, because my son had already announced the ownership. :) Continue reading “Hacking a toy car @ fizzPOP Howduino”