Monday 30 October 2017

junkbots at mozfest 2017

Capturing some of the tweets about Junkbots at Mozilla Festival 2017 #Mozfest https://mozillafestival.org/ 





Details of the activity can be found at http://bit.ly/2yZ3dZT

If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Crumble egg junkbot

This is a two-part series on a new Junkbots project. In last part building the junkbot itself was discussed. In the this part controlling the junkbot via Crumble is discussed.

So build the junkbot as discussed in the previous blog post.
Kit
·      Kinder Egg (without the Chocolate and toy)
·      Battery pack and 3xAA
·      Vibrating motor
·      Tape (lots of)
. Sticky-tack of some form.
·      Pens
·      Paper
·      Scissors
·      Glue and Gluegun (optional)



Disconnect the battery connection (the connections on the motor can stay as they are). Connect the USB cable to the Crumble. To the right of the USB connect there are two connections marked + and -. Connect a Red wire to the + connection and the other end to the red wire of the battery pack. Connect a black wire to the – connection and the other end to the black wire of the battery pack.
IMG_0583.JPG IMG_0584.JPG
Stage 2: Connect the Egg!
On the Crumble, on the right-side there are two motor connections connect the Motor to these connections. Don’t worry about which of the motors wires is need you swap them ar3age 6: Programming it – Making the bot moves.
The software can be found at https://redfernelectronics.co.uk/crumble-software/ it includes how to set it up on your own machine.
Start the Crumble software. Drag from the left the Program start, motor, and wait blocks. Now join the up start block at the top and the motor block next and the wait block last.
Screen Shot 2017-10-23 at 16.23.51.png
Your code should look like this.
Screen Shot 2017-10-23 at 16.23.43.png

Click on the stop within the motor block. It should change to forward. Now you are ready to make it move. Press the green arrow and with the battery pack on, it soud (hopefully )keeop moving.
Screen Shot 2017-10-23 at 16.24.12.png

If you put a second motor block after the wait blck with the stop inthe boSck. It su.If you put a second motor block after the wait block with the stop in the block. It such more.

-    Drag a do-until block in (found in the control menu).

-    Go to variable menu and add a new variable, I have used t, select the block marked let=, and drag a t into the blank space.

-    Drag an increase block onto the screen and drag a t into the blank space.
Screen Shot 2017-10-23 at 16.27.45.png
Go to the operator menu and drag onto the screen an = block, go back to variables menu and drag a t into the first space on the = block and click on the second space on the block and type in 5.
Screen Shot 2017-10-23 at 16.29.02.png
Now for the challenge put all these together to copy what is shown below. Now, put the egg-bot on the paper, with the pen lids off, it should draw.





Junk Eggbot


This is a two-part series on a new Junkbots project. In this part building the junkbot itself is discussed. In the second part controlling the junkbot via Crumble is discussed. The work was first shown at Mozilla Festival 29th October 2017.
Three inspirations for this project
·   Femi Owolade supported by Nic Hughes ran a session at Mozilla Festival 2016 using the Crumble’s to make a wheeled robot.
·   The junkbot project https://junkbots.blogspot.co.uk/
Kit
·      Kinder Egg (without the Chocolate and toy)
·      Battery pack and 3xAA
·      Vibrating motor
·      Tape (lots of)
·      Pens
·      Paper
·      Scissors
·      Glue and Gluegun (optional)


Stage 1: Fix the vibrating motor into the Egg.
Put the vibrating motor into the Egg with the motor electrical connections sticking out the bottom larger half of the egg. Make sure the unbalanced load is free to move – this is bit that causes the vibrations needed to move the egg. The motor can be held in place by sticky-tack or strong tape, or glue (when using glue this is done under adult supervision only).
IMG_0578.JPG


Stage 2: Sticking the pens on.
This is the trickiest bit. The easiest way to do is cut a strip of tape. Place two pens onto the tape ensuring the pens are the same length from the tape to the nib and the distance between the pens on the tape are far enough apart to place the egg between them.
IMG_0579.JPG
If you are using three pens, the third pen should be placed so that all three form a triangle with equal sides, that means the egg can stand-up on a piece of paper on the pen nibs, without anything supporting it.
If you are using four pens, the other two pens should be placed so that all four form a square with equal sides, that means the egg can stand-up on a piece of paper on the pen nibs, without anything supporting it.
Stage 3: Add the battery pack and go.
Using two wires connecting the battery, to the motors. Remove the nibs and set the bot off. It is hopefully vibrating and shaking and scribbling lines on the paper.
IMG_0580.JPG IMG_0582.JPG


To see one in action go to: https://www.youtube.com/watch?v=NRlntdmdQRo





If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Friday 20 October 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


If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Sunday 27 August 2017

Crumbly Junk robot

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

If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Tuesday 21 March 2017

Controlling 'junk' robot - three options



Three approaches to control it will be considered here:
- via Raspberry Pi;
- via Micro:Bit
-via Crumble controller

1. Raspberry Pi based

In this Raspberry Pi based Junkbot design a combination of Python and Pimoroni's Explorer HAT PRO are used 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()


2. Micro:bit
what about the recently released Micro:Bits; can it be used to control a junkbot?










2.2 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()

2.3 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

3. Crumble



Lastly 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.


3.1. 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.2. 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.











Related Links



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


If you would like to know more about the Junkbots project contact scott.turner@northampton.ac.uk

Tuesday 17 January 2017

The Page Turning Librarian: 10 Steps to Make a Doodlebot

The Page Turning Librarian: 10 Steps to Make a Doodlebot: Creating a doodlebot is one of my student's favorite makerspace activities.  A doodlebot is a robot that is made from every day mater...



To read more go to The Page Turning Librarian: 10 Steps to Make a Doodlebot



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