Showing posts with label junkbot. Show all posts
Showing posts with label junkbot. Show all posts

Friday 20 April 2018

Summary of Robots at BCS Northampton

On the 17th April 2018 I had the honour of presenting a public talk on robots for the Northampton Branch of the Britsh Computer Society (BCS). This post aims to summarise the session.

The session was really from a personal perspective and journey, covering where I think robots in home and schools are going, and an overview of some of the projects I have been involved. First, part was the presentation - the slides are shown below.




The videos used in the presentations are shown below. The first video is an introduction and welcome from Red the Nao robot.





Next video shows a programmed Cozmo, using Anki's graphical programming language.




Second section of the session was playing with the robots. Red the Nao, an Anki Cozmo and an UBtech Alpha2 and having a play with a Crumble-based junkbots.  Crumble junkbots were used on PC and Raspberry Pi via Pi-top CEED.
Red (at the back), alpha 2 (middle) and Cozmo (front)

Crumble controller from Redfern Electronics

Crumble as part of a junkbot.

Highlights of the evening were Red going for a walk 'hand-in-hand' with one of the audience and Cozmo chatting away; as always (and rightly) the stars of the talk are the robots. 


All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Monday 14 August 2017

Crumbly Toilet Roll Junkbot

Guest Blogger Nathaniel Roberts, Nuffield Research Placement Student working at the University of Northampton. Nuffield Research Placement scheme provides students in their first year of a post16 course to work with STEM professionals http://www.nuffieldfoundation.org/nuffield-research-placements.

Toilet Roll Junkbot
Nathaniel Roberts



Cut a slit in a toilet roll.
Cut another toilet roll in half, then arrange the pieces in a T.
Feed the bottom of the T into the slit, and tape together.


Cut two lines into the edge, and do the same on the opposite side of the circle. Copy this for the other side of the tube.
These geared motors from the Camjam EduKit 3 should fit into those gaps.


Stick a battery pack to the back, and use crocodile clips to wire it all up to a crumble. The battery pack can connect to the + and - on either side at the top of the crumble, and the motors connect to the + and - of their respective sides of the crumble.








Using a Micro USB to USB cable, the crumble can be plugged into a computer and can run code from the crumble software ( http://redfernelectronics.co.uk/crumble-software/ ).
This example code would make the junkbot move forward for a second, turn either left or right, then move forward for another second before stopping.


The back of the bot was extremely heavy (with all the batteries). The front wasn’t heavy enough to grip most surfaces very well so the wheels would often spin without the bot moving. Also, the toilet rolls were only just strong enough for the job. After a few uses, especially around the motors, they started bending. Eventually, the motors ended up 'wonky' despite attempts at fixing it.




All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Thursday 16 March 2017

Turning junk into 'robots' at Wicksteed Park

I recently ran a talk and workshop on Junkbots at Wicksteed Park's Science Cafe as part of British Science Week. 






The slides below contain the talk.




The Science Café was established at Wicksteed Park, as the Park's creator Charles Wicksteed was an inventor and a successful engineer, giving visitors the opportunity to engage in science activities over coffee and cake in an informal and fun environment.

News articles about this workshop:





All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Sunday 12 March 2017

Build yourself a Crumble Junkbot


Over the last eight years I have been working (off and on) on a project, junkbots (http://junkbots.blogspot.co.uk/2010/01/introduction.html), in which 'junk' is used to embed environmental, engineering and computing concepts. One part that has grown from this project is using drinks cans, motor, batteries and something to unbalance the motor to produce a vibrating 'bot' that move along a smooth surface. 

To add a little more control both Raspberry Pis (http://robotsandphysicalcomputing.blogspot.co.uk/2015/07/raspberry-pi-controlled-robot-from-junk.html) and Micro:bits (http://robotsandphysicalcomputing.blogspot.co.uk/2016/09/do-it-yourself-remote-controlled.html) have been investigated.


In this post a Crumble controller from Redfern Electronics is used. The crumble controller is an excellent board for this project, it is relatively cheap, it is programmable with it's own graphical language, and it has motor drivers built in. In the figure to the left the parts (apart from adhesive tape) used can be seen.

1. Building the body.
Tape three pens (with their lids on) on to the drinks can - making a tripod arrangement. Add (tape it on usually) a motor with something on the axle to unbalanced the motor; I use broken toy propellors but mis-shapen blu-tak; clothes pegs could be used.

2. Wiring up
Using croc-clips ideally, but loops of wire if not, connect the battery to the controller and also the motors to the controller. Plug in the USB cable into the controller and the computer.

3. Running and Controlling
Make sure the Crumble software (http://redfernelectronics.co.uk/crumble/) is installed on the computer. 

An example is shown below that drives the motor forward and then backward repeatly. You might need to change the percentage values based on experiment, for the motor used. In the video below the junkbot is shown in action.






All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Saturday 17 September 2016

Python Junkbot - PyCon UK 2016

Poster presented at PyCon UK 2016, 17th September 2016.



Pyconuk16 junkbots from Scott Turner

DOI: 10.13140/RG.2.2.28682.67520

For more details on the three builds:






All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with. Twitter @scottturneruon

Sunday 11 September 2016

Do it yourself: Remote Controlled Micro:Bit Junkbot

In an earlier post, I showed how you could build a Micro:Bit controlled Junkbot. In this post I want to show a modification to it, to use one Micro:Bit to control the junkbot controlled by another Micro:Bit. A nice feature of the Micro:Bit using micropython, is it can send and receive simple messages via radio - so here is my take on it.

The first problem is the Python editor available on https://www.microbit.co.uk/ does not seem to work with the radio API. One solution to this is to change to the mu editor.


Two pieces of code are needed.

Sending Code for the 'remote' control:
Essentially it is set up to send two messages, via the built-in radio module, spinl or spinr depending on which button is pressed.

import radio
from microbit import button_a, button_b

radio.on()

while True:
   if button_a.is_pressed():
       radio.send('spinl')
   if button_b.is_pressed():

       radio.send('spinr')

Junkbot Code
This takes an adapted form of the previous Junkbot code to work by; on receiving spinl or spinr via the radio link; spin the motor clockwise or anticlockwise.
import radio
from microbit import pin8, pin12, sleep

def leftTurn(duration):
   pin8.write_digital(0)
   pin12.write_digital(1)
   sleep(duration)
   
def rightTurn(duration):
   pin8.write_digital(1)
   pin12.write_digital(0)
   sleep(duration)
   
def stopIt():
   pin8.write_digital(0)
   pin12.write_digital(0)

radio.on()
while True:
   incoming = radio.receive()
   if incoming == 'spinl':
        leftTurn(500)
        stopIt()
   if incoming == 'spinr':
        rightTurn(500)
        stopIt()








All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

How to do it yourself: Microbit Junkbot


What is a Junkbot?
For this project, it is a moving ‘bot’ made from waste materials, combined with an electric motor and a programmable device (in this case a Micro:Bit) to control (or try) it. An example is shown below. More details on junkbots can be found at http://junkbots.blogspot.co.uk/


Stage 1 - The start of a Junkbot
This stage is relatively simple. Tape some pens or straws to a drinks can.




Stage 2 - Physical arrangement of Microbit and motor control board

The control part is this via a Micro:bit (http://www.bbc.co.uk/programmes/articles/4hVG2Br1W1LKCmw8nSm9WnQ/the-bbc-micro-bit). Kitronik produce a motor driver board, and provide quite a bit of support for it, for the Micro:Bit (the latest version of the board can be found at https://www.kitronik.co.uk/5620-motor-driver-board-for-the-bbc-microbit-v2.html ). A 6v battery pack is connected (see on the left of the image) and wires going to a motor are attached to the first block on the front left (marked as motor A).



The overall arrangement is show below, including a broken propellor as an unbalanced load to make the motor vibrate - the propellor was to hand but if you can secure something a clothes peg this could be used.


Stage 3 - Built Junkbot
Now we just need to put them together by taping (or fixing somehow) the motor to the junkbot built in stage 1. A further possibility is to attach the Micro:Bit, motor driver board and battery pack to the junkbots; but this adds weight.








Stage 4 Code
 Using Micropython via the online editor https://www.microbit.co.uk to program the board and therefore the junkbot. 
An example piece of code is shown below:

from microbit import *

def startIt():
   pin8.write_digital(1)
   pin12.write_digital(0)
   pin0.write_digital(1)
   pin16.write_digital(0)    

def leftTurn(duration):
   pin8.write_digital(0)
   pin12.write_digital(1)
   sleep(duration)
   
def stopIt():
   pin8.write_digital(1)
   pin12.write_digital(1)
   sleep(2000)

while True:
   startIt()
   
   if button_a.is_pressed():
       leftTurn(100)
   
   if button_b.is_pressed():
       stopIt()

Unplug the Micro:bit from the motor driver board and download the code to the microbit. Unplug the download cable and plug the Micro:Bit back into the motorboard, with the battery pack attached there is enough power for the Micro:Bit and the motor - don't plug in any other power including the programming cable when it is in the motor driver board.


Stage 5 In action



Suggested Resource List
  • Small Electric Motor
  • Kitronik Motor Board
  • Battery Pack
  • BBC Micro:bit
  • Pens
  • Junk (Can or Bottle)
  • Wires
  • Tape
  • Scissors
  • Broken Propeller or un-balanced load
  • Screw Driver


Related Links






All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Friday 19 August 2016

Micro:bit Junkbot for use in schools


A new direction has been developed for the junkbot project (http://junkbots.blogspot.co.uk/); previously Raspberry Pis have been used to control the junkbot’s movement (http://robotsandphysicalcomputing.blogspot.co.uk/2016/01/python-junkbot.html) – but what about the recently released Micro:Bits; can it be used to control a junkbot?

Matthew Hole, a student from Wrenn Academy, Northamptonshire ; has been investigating this idea whilst on a Nuffield Research Placement (http://www.nuffieldfoundation.org/nuffield-research-placements) working with Dr Scott Turner, University of Northampton. The project was to look into developing junkbots controlled using a Micro:bit and also to produce some materials for schools to use with or without outside assistance.






What is a Junkbot?
For this project, it is a moving ‘bot’ made from waste materials, combined with an electric motor and a programmable device (in this case a Micro:Bit) to control (or try) it. An example is shown above. More details on junkbots can be found at http://junkbots.blogspot.co.uk/


Approach used in the project.
A Micro:Bit was selected for two reasons. First, there was been a BBC supported project to give year 7 (or equivalent) students a Micro:bit (http://www.bbc.co.uk/programmes/articles/4hVG2Br1W1LKCmw8nSm9WnQ/the-bbc-micro-bit), so they are available in the schools. Secondly, Kitronik produce a motor driver board, and provide quite a bit of support for it, for the Micro:Bit (the latest version of the board can be found at https://www.kitronik.co.uk/5620-motor-driver-board-for-the-bbc-microbit-v2.html ). Using Micropython via the online editor https://www.microbit.co.uk to program the board and therefore the junkbot connected. The board with the Micro:Bit attached can be seen in the figure above carried on the junkbot.

An example piece of code is shown below:

from microbit import *

def startIt():
   pin8.write_digital(1)
   pin12.write_digital(0)
   pin0.write_digital(1)
   pin16.write_digital(0)    

def leftTurn(duration):
   pin8.write_digital(0)
   pin12.write_digital(1)
   sleep(duration)
   
def stopIt():
   pin8.write_digital(1)
   pin12.write_digital(1)
   sleep(2000)

while True:
   startIt()
   
   if button_a.is_pressed():
       leftTurn(100)
   
   if button_b.is_pressed():
       stopIt()



Suggested Resource List
  • Small Electric Motor
  • Kitronik Motor Board
  • Battery Pack
  • BBC Micro:bit
  • Pens
  • Junk (Can or Bottle)
  • Wires
  • Tape
  • Scissors
  • Broken Propeller or un-balanced load
  • Screw Driver


Related Links







All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Sunday 7 February 2016

Northamptonshire Raspberry Jam - 16th April 2016

 PiJam event on Saturday 16th April 2016, in Newton Building, University of Northampton, NN2 6JB.

This is a free event, open to those who either want to found out more about the Raspberry Pi; want to share with others what they have done with the Pi; or just want to talk with others about them. Most of all (I hope) to have some fun.

The event has been supported by the University of Northampton providing the rooms.

Tickets (Free) are available at: https://www.eventbrite.com/e/northamptonshire-raspberry-jam-tickets-20886649531

Examples of possible 'show and tell ' items include:

-Minecraft running on a Raspberry Pi with movement controlled with gesture control of an Star Wars styled X-Wing



- Raspberry Pi controlling a 'junk robot'



More updates to follow. 

Tickets (Free) are available at: https://www.eventbrite.com/e/northamptonshire-raspberry-jam-tickets-20886649531


All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Sunday 17 January 2016

Raspberry Pi - Python Junkbot



Junkbots (http://junkbots.blogspot.co.uk/) are based around using  materials such as drink's cans, broken propellors and motors to produce something that moves by vibration. Previous designs be found at:



The latest tweak to the Raspberry Pi based Junkbot design is to use the combination of Python and Pimoroni's Explorer HAT PRO to control it. Explorer HAT Pro is a good choice, it can control two motors with a library provided to simplify the programming. For this the Junkbot was the one shown above: a drinks can, pen, LEGO bits, motor and broken propellor.

Before the Explorer HAT can be used the library needs to be installed via the Terminal and the instructions below

curl get.pimoroni.com/explorerhat | bash

Python code to control the junkbot is shown below.


import explorerhat
from time import sleep

def spin1(duration):
    explorerhat.motor.one.forward(100)
    sleep(duration)
    explorerhat.motor.one.stop()

def spin2(duration):
    explorerhat.motor.one.backward(100)
    sleep(duration)
    explorerhat.motor.one.stop()

spin1(1)
spin2(1)

Essentially the code spins the junkbot one way and then the other.





All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Sunday 22 November 2015

It is a good time to play with robots

In the previous blog posts for this 'series' "It is a good time...." 

  • Post 1 looked at the hardware unpinning some of this positive rise in robots;
  • Post 2 looked at social robots;
  • Post 3 looked at a collection of small robots;

This post continues with small robot idea a bit more, looking at some of the other robots I have been fortunate to be able to play with. The opinions are from a personal point of view of playing with them, but comments are very welcome.

Kbots

The kilobots (http://www.k-team.com/mobile-robotics-products/kilobot)were designed to be relatively low-cost devices specifically designed for work on swarm/collective intelligence experiments. Developed at Harvard University as a scalable system to program groups of robots (now into the thousands) (http://www.eecs.harvard.edu/ssr/projects/progSA/kilobot.html).



Individually these are quite simple units, they move by vibration. The real advantage, in my opinion, of the system though is you can program lots of them in one go - scalability is therefore not that difficult.

The video below is from a colleague's work who used these during his MSc work on collective intelligence. To read more on this go to: http://robotsandphysicalcomputing.blogspot.co.uk/2015/07/narinders-swarm-robots.html





Scratch Robot Arm


It is not physical but CBiS Education have release a free robot arm simulator for Scratch. 

Downloadable from their site here - it includes a Scratch project, guidance on Scratch along with an exercises in using the robot arm simulation and an exercise with teacher's guidance. 

CBiS produce a physical version of this, details are available at  http://www.cbinfosystems.com/cardboard2code_module3.aspx




What I like about this is, apart from being free, is it is Scratch-based and it does simulate physical problems such as the need to co ordinate multiple parts of the arm often to achieve a task.


LEGO
Where do I start with these? LEGO have done a great deal to get a lot of people interested in, and provided a route into robotics. Whether though the 1980 - 1990s with the Technics range or when they released their Mindstorms (I can see another post coming on here).

My interest has been focused for the last ten years or so on their use in teaching problem-solving and Java Programming to undergraduates (read more here). The combination of either the earlier RCX or NXT ranges with the incredible LeJOS (http://www.lejos.org/) provides an accessible and easy (I think easy some times) way to link robots and undergraduate programming in Java.

I will expand on these a little more in a post of dedicated to LEGO .


Junkbots

Another shameless plug, Junkbots, was a project that started close eight years ago concerned with linking computing, engineering and environmental science in activities for use in schools. The core was to use and look at waste and how could we combined waste materials and robotics to either build a 'bot' out of junk or used in combination with robotics (initially based around LEGO) to clear small junk piles (a few light materials - nuts, bolts). To read more on this project go to http://junkbots.blogspot.com/ .

The area that quickly became the focus was the building 'bots' out of junk (session plan: http://junkbots.blogspot.co.uk/2015/08/junkbot-session-overview.html). This evolved into the building one of these but controlled via a raspberry Pi. This is the idea discussed below.

The card chosen to control the motors was the 4Tronix PiRoCon card. It 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/). 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 I needed to make because I wasn't powering the motors through the DC input I had to change the jumper settings next to Vin Connector (see http://4tronix.co.uk/blog/?p=41 for layout) to reflect this.

Now for the fun bit getting 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 ( LEGO was used 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 Link

 




In the next post in the series I want to look at the software a bit more.




All opinions in this blog are the Author's and should not in any way be seen as reflecting the views of any organisation the Author has any association with.

Top posts on this blog in March 2024

The Top 10 viewed post on this blog in March 2024. Covering areas such as small robots, augmented reality, Scratch programming, robots. Micr...