Showing posts with label Crumble. Show all posts
Showing posts with label Crumble. Show all posts

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, 24 September 2016

Crumblebot - explorer bot?

In an earlier post I played with 4Tronix's CrumbleBot to make an edge follower robot (http://robotsandphysicalcomputing.blogspot.co.uk/2015/07/edge-following-crumblebot.html). I wanted to play a little more, so I looked at making it 'explore' a room a bit and recently 4Tronix's have released an add-on panning ultrasonic sensor for the CrumbleBot - how can I resist?



What is a CrumbleBot
The CrumbleBot (http://4tronix.co.uk/store/index.php?rt=product/product&product_id=493) is based around the Redfern Electronic's Crumble Controller (http://redfernelectronics.co.uk/crumble/) and Crumble software (http://redfernelectronics.co.uk/crumble-software/); providing an intuitive graphical interface (similar to Scratch) to control two motors and four inputs/outputs. The CrumbleBot comes with a number sensors including  line-detecting sensors and Light-Dependent Resistors for light detection and you use crocodile clips to connect the sensors to the inputs/outputs. In essence, this is nice little framework for simple robotics and quite forgiving; the commands are kept to a minimum and loading the program to the bot is just one action. One suggestion, is to make sure you order the Crumble Controller at the same time as CrumbleBot, it is easy to forget if you haven't already got a crumble controller already.

Building the 'Bot' is relatively simple and 4Tronix have provided some easy to follow instructions on-line (http://4tronix.co.uk/crumble/CrumbleBot.pdf) that are almost foolproof (I manage to build it!).


Panning sensor

This is an add-on piece (http://4tronix.co.uk/store/index.php?rt=product/product&keyword=crumblebot&category_id=0&product_id=556), at the time of writing this costing around £12 (with VAT), which adds a ultrasonic sensor that pans and is controlled using Crumble. The instructions for setting this up are available at http://4tronix.co.uk/blog/?p=1353 you need to read from about half way down the page, they are detailed and please don't do what I did and skim through them, missing out an important action. 


'Explorerbot' 
The Crumblebot is built, the Panning ultrasonic sensor is connected - in my case IO port A for the servo to pan the sensor and IO port D for the input from the sensor - time to program it. The instructions in the set-up http://4tronix.co.uk/blog/?p=1353 include a useful little starting routine to read the sensor and 'zero' the sensor's position.

So my exploring routine is based around 


  • panning the sensor by +/-20 degrees of the sensor facing forward.
  • if an object is 5cm or less from the sensor; reverse the Crumblebot and make a slight turn; otherwise move forward.
The code is shown below:

The video shows the 'Explorerbot' in action.




Conclusion
It is good fun; this is a relatively simple problem but still fun. The Crumble language is Scratch-like and simple to set up and use. Crumble as a system I have, so far, found quite forgiving and this is useful - less fear of making a mistake.The panning sensor gives this already cute robot an even cuter look. Please feel free to add the discussion using the comment section.





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, 19 July 2015

Edge following CrumbleBot

Recently I have been playing with the CrumbleBot (http://4tronix.co.uk/store/index.php?rt=product/product&product_id=493) based around the Crumble Controller (http://redfernelectronics.co.uk/crumble/) providing a intuitive graphical interface (similar to Scratch) to control two motors and four inputs/outputs. The CrumbleBot comes with line-detecting sensors and Light-Dependent Resistors for light detection, with a few other features that I have yet to play with. So is nice little framework for simple robotics. Make sure you order the Crumble Controller at the same time as CrumbleBot.

Building the 'Bot' is relatively simple and 4Tronix have provided some easy to follow instructions on-line (http://4tronix.co.uk/crumble/CrumbleBot.pdf) that are almost foolproof (I manage to build it!).

So I wanted to experiment with making a edge following robot - where the robot goes around a line by following the edge of the line. The idea is while make small movements,

  • Check that one of the sensors is on the line (in my case the right sensor);
  • If that sensor detects the line, then pull the robot to the left slightly and then forward a small step;
  • If the sensor does not detect the line, the pull the robot to the right slightly.

Accidentally, I end up playing with two ways to detect the line. Started with connecting, using crocodile clips, the two sensors to the Crumble and treating them as analogue signals and if there was a big difference between the one I want to stay on the line and the one off the line then the line's edge is detected. The assumption is the sensor on the black line reflects less light, so a lower value produced and that is what is detected. It work see the video below that used this approach - but the assumption was wrong.

4Tronix contacted me saying the line sensors are digital (thank you for that), so used them as a digital inputs and it did simplify the code a lot and still worked.





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.

Who wants to produce AI produced cartoon strips

Question: How easy is it produce a comic/cartoon using genetative AI? Let's start with  using ChatGPT4o to produce cartoons. The idea wa...