FrankenRobot

FrankenRobot (or Frankenbot) was an entry for Pi Wars 2017  (a Raspberry Pi robotics competition in Cambridge, UK). As such, it was built to complete the following challenges (to varying degrees of success...):

  • Line Following
  • Straight Line Speed Test
  • Minimal Maze
  • Obstacle Course
  • Skittles
  • Golf
  • Pi Noon (essentially a non-destructive fighting challenge where a needle and a balloon are mounted on each robot, and the objective is to pop the opponent's balloon with the needle.)

The Obstacle Course, Skittles, Golf and Pi Noon challenges were all manually controlled, so for this, I used a PS3 joystick and a Python script to send instructions to the Raspberry Pi.

The Speed Test, Maze and Line Following, however, were all autonomous challenges, so I used Python scripts and sensors to complete these challenges.

 

The robot is pretty simple, with just a Raspberry Pi handling the robot's operations (with a Python script set to run at boot).

 

Components

Raspberry Pi

I used a Raspberry Pi Zero W for all the processing (as the competition requires the use of the Raspberry Pi). However, in hindsight, I would have used something like an Arduino alongside the Pi, to handle the sensors and other things that require precise timing (while still using the Pi to handle the bulk of the processing), as the Raspberry Pi runs an operating system, which means that timing may not be completely accurate.

Chassis

The chassis is three layers of custom designed laser-cut acrylic 

Power

The motors are powered by a 9V battery and everything else is powered by a 5V power pack

Sensors

The line-following is done with a QTR-8RC (an 8 sensor digital reflectance sensor array) and there are three HC-SR04s mounted on the robot for distance sensing.

Other

I used 150:1 micro metal gearmotors on the robot with Pololu wheels and a ball bearing (however, in hindsight, these wheels weren't grippy enough or the motors didn't have enough torque, so it struggled on the hills). A L298N was used for a motor controller. The only other components of the robot are three LEDs used for an output.

Images

(Apologies for the terrible images, my phone has a rubbish camera and the robot has been on a shelf in my room for a good few months)

Front View

Front View

 

Side View

Side View

 

Back View

Back View

 

Top View

The code is in an attachment called motorcode.py (however, it's a little dodgy and the algorithms are far from good for the autonomous challenges)

(This is my first robot. Feel free to comment, if you want any more information!)


This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/frankenrobot

Looks like a fine sturdy

Looks like a fine sturdy chassis! I’m curious on whether you have a laser cutter yourself, or how did you get access to one, and what were there costs for the chassis (approximately).

And about software, how did you solve the maze? Turning left and right and counting the turns? Memorizing the correct sequence?  Random obstance avoidance?

Keep it simple

A raspberry pi is not necessarily “simple” so well done! As unelsson indicated, despite being simple, the robot is well done. Can you link to the parts you used? Perhaps provide some code? Raspberry Pi is still not widely used so any additional information gleaned from a successful project would help others.

Hi unelssonAbout the laser

Hi unelsson

About the laser cutter, I don’t have one myself, but instead used one at a FabLab (basically a place you can pay to use tools like 3D printers etc). I bought the material myself, and then paid to borrow the laser cutter for a bit, but unfortunately, I can’t remember how much it cost (since I made this robot a while ago). Think it was quite a bit though - probably about £30 to £60.

As the plan (but not measurements) for the maze was released prior to the competition, I was able to pre-program it a bit, but most of the navigation was used with the three ultrasonic sensors detecting where the walls were. Didn’t go that well, however, since I came last out of 5 in the challenge. Perhaps it would’ve worked better with rotary encoders on the wheels, since I had a problem with overshooting the turns.

Thanks!Will try and upload

Thanks!

Will try and upload links now (did this robot a while ago though, so might not remember everything), plus the code.

It’s interesting though, since I’m from the UK and the Raspberry Pi is really very popular here - the Pi Wars competition had 50+ teams (I think) last year, who all were using the Pi; and there’s quite a few Raspberry Jams too (Raspberry Pi meetups). The Jam I go to is quite busy (there’s maybe 20-30 people who come each month). There doesn’t seem to be the same type of community for other types of electronics or dev boards though here.

Raspberry Jams

Have not been to one myself, and curious if most people are preferring software or hardware or both? Are you in the minority with a robot?

Raspberry Jams

At the one I go to, I find most people prefer software (perhaps because of the amount of beginners we have, or because it can be impractical to do hardware stuff at a place away from home.) Although, HATs are very popular too - basically (mostly) pre-soldered circuit boards with electronics on that fit on top of the Pi.

Robots are quite popular at the Jam too, especially with more advanced people - I found that a few other people from my Jam were going to Pi Wars too, despite it being a few hours drive away from where I live. Among the beginners, the CamJam EduKit 3 is extremely popular too - a barebones robot kit (it doesn’t have a chassis or a Pi in it, just motors, wheels, some sensors and other basics) sold for £18.