Skip to main content

Raspberry Pi Robot from junk


Figure 1
In previous posts the idea of adding some programming into the a 'bot' made of junk, a junkbot, was briefly discussed (http://computingnorthampton.blogspot.co.uk/2014/07/physical-computing-junkbots-with-brain.html) and the use of LEGO to do this was discussed in a recent post (http://computingnorthampton.blogspot.co.uk/2014/08/controlling-lego-junkbot.html)

In this post the aim is to discuss using a Raspberry Pi and Scratch to do this. Including:
- Choice of motor controller card for the 'bot'
- Provide an example of a drawing junkbot controlled through Scratch and Raspberrry Pi


Choice of interface/Controller card
The card choosen was the 4Tronix PiRoCon card  (http://4tronix.co.uk/store/index.php?rt=product/product&product_id=182). Selected for four reasons
- Price is reasonable (in my opinion).
- Fits straight onto the Pi through the GPIO - no extra cables needed.
- ScratchGPIO has it as an addon so it makes programming it even easier (see http://cymplecy.wordpress.com/2013/10/31/pirocon-from-4tronix/).
- Others are using it for robot projects.

Use it is quite easy plug the board directly on to the GPIO connector of the Raspberry Pi (4tronix provide some advice in section 15 of http://4tronix.co.uk/blog/?p=22 on mounting the board). The only other changes that were needed were because the motors were not powered through the DC input jack, changesto the jumper settings next to Vin Connector (see http://4tronix.co.uk/blog/?p=41 for layout)  were neededto reflect this.



Example: Drawing Raspberry Pi Junkbot
Now for the fun bit get the whole thing to draw (see Figure 1 and the video at the end)!

The junkbot itself is made up of a drinks can, three supports (we used LEGO here but it equally could be straws, sticks), a pen/pencil, and a  motor and broken propeller combination to create an unbalanced motor.

With the Raspberry Pi off, the the motor's wires are connected to the controller card at the connections for MotorA and the battery is also connected. Turn the Pi on and run ScratchGPIO5plus.


Figure 2
Figure 3





Figure 4















The first task is to make the variables AddOn (which will be used to tell the program we are using the PiRoCon card) and MotorA for the motor (see Figure 3).

In Figure 4 the program can be seen, essentially the left and right key spin the junkbot clockwise or anticlockwise by setting the Motor to either +ve or -ve values from 0 to 100. The space bar is used to stop the motor.

As it moves because one of the supports is a pen it draws. See the video below to watch it draw a squiggly line - control is still a challenge.
 The bot was developed by Hayden Tetley and Scott Turner. Hayden's time was paid  for through the Nuffield Research Placements  Scheme (http://www.nuffieldfoundation.org/nuffield-research-placements).

Related Links

 




If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk. The views and opinions is the authors and should not be taken as representing the views of any organisation the author is associated with.

Popular posts from this blog

Experiments in teaching Neural Networks

Excel Based







Scratch-based
More details available at https://computingnorthampton.blogspot.co.uk/2016/11/miniproject-using-scratch-to-build-and.html including links to the code.


All views and opinions are the author's and do not necessarily reflected those of any organisation they are associated with. Twitter: @scottturneruon

Social Analysis of Publications

The Computing staff's network of co-authors, at the University of Northampton, based on the University's  research repository NECTAR - http://nectar.northampton.ac.uk/view/divisions/SSTCT.html on 12th November 2016. The data goes back to 2010.




The data was analysed using the software VOSviewer - http://www.vosviewer.com/ free software for visualising networks. Differences in colours represents, the clusters of publications with those authors picked out by the software. The relative size of the circles is the relative number of publications listed; so for the two biggest circles/hubs it relates to 55 and 34 publications in this time period. Some relatively new authors, to the University but not to research, explains some of the 'islands' and the number of publications within it - it only reflects publications whilst at the University of Northampton.

To dig a little deeper, going to  look at the two biggest 'hubs' through their NECTAR records, so potentially going …

Computer lecturer’s research helps improve the next generation of technology

Taken from: http://www.northampton.ac.uk/news/computer-lecturers-research-helps-improve-the-next-generation-of-technology/ A computing lecturer at the University of Northampton, who is researching into how the efficiency of our everyday devices, such as mobile phones, can be improved, has been awarded the best paper at two recent conferences. Dr Michael Opoku Agyeman has written several journal papers focusing on how the next generation of technology can meet the ever increasing demands from consumers. He was invited to present his work at the 19th Euromicro Conference on Digital System Design in Cyprus and the Institute of Electrical and Electronics Engineers’ 14th International Conference in Paris. Part of his research concentrates on whether several processing elements can be incorporated on a single chip, known as System-On-Chip, to improve the efficiency and speed of the computing systems that we use every day, from mobile phones to video-game consoles and even medical equipment…