Friday, 31 July 2015

Lego Mindstorms – Sentry Robots


Sameer Kumar Shrestha, Northampton

The report presents the dissertation on title Prototype of Sentry Robots for Advanced Security which includes the use of LEGO robots showing interaction between each other with the help of wireless communication medium in Bluetooth. The purpose of the work is to build a communication between multiple LEGO robots using the wireless technology. For this task, the NXT version of LEGO Mindstorms has been selected. It is because there is need of complex communication which is possible through wireless medium such as Bluetooth and also a suitable processing device for the proposed task which is present in the LEGO Mindstorms NXT. The report has also focused on the background information about the NXT system and its great flexibility with LeJOS NXJ as the programming platform. The outcome is the implementation of developed work with the use LEGO Mindstorms NXT and the LeJOS NXJ as programming platform. The task was approached with one LEGO NXT robot maintaining the distance between the object in the environment and searching the object by rotating in case of lost. After the completion of the first task, the next task was to study the communication behavior of multiple robots communicating with each other to fulfill the same job. For this, three NXT robots were taken and programmed in such a way that they form the shape of triangle and keep tracking the object.  All three of them send and wait for the information from each other and process this information to produce a suitable output, i.e. to respond to the action from each other. Thus, it was found that the implementation of several processes to multiple LEGO based communication had faults, due to the technical hitches with the communication technology and limitations of the NXT systems.





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.

Tuesday, 28 July 2015

Picobot - a swarm bot


One of the most interesting small robots on the market is the PicoBot from 4Tronix (http://4tronix.co.uk/blog/?p=708). 

These are small, relatively low-cost robots with a good range of basic sensors based around Arduino. A nice feature is they are quick to put together (5-10 minutes each for the two above).  The size, time to build and the radio modules make them an interesting option for playing with swarm robotics - if only I had the money.

Don't let the swarm robot idea put you off, as small robots to playing with programming they are good in their own right. Being small with the ultrasonic sensors gives them an non-threatening look; add in they have some build it programs to play with (select by buttons on the bot) to get you going without any programming.

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

Narinder's Swarm Robots

This time not my experimentation but by a colleague and student I was supervising.

Some interesting work has been developed by Narinder Singh (MSc Computing student and Technician) in the Department of Computing and Immersive Technology, University of Northampton. The work revolves around investigating the use of relatively simple robots, kilobots, to investigate swarm robotics.

The kilobots (http://www.k-team.com/mobile-robotics-products/kilobot) are relatively low-cost devices specifically designed for work of swarm/collective intelligence experiments.


Example:Dancing Kilobots 

For more examples go to: Kilobot videoss

Supervisor Scott Turner


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.

Thursday, 23 July 2015

Scratch Robot Arm

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









Downloadable from their site http://www.cbinfosystems.com/cardboard2code_module2.aspx - 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.

Left my son with it, asked him if he could make it do something if a new sprite is added and the gripper touched it (similar to the exercise in the notes). He went on to produce a sprite that when it is touched by the gripper, went on to change colour a few times. I could see this being potentially used in Coding Clubs within schools.





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




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.

Wednesday, 22 July 2015

mbots - graphical programming and Arduino

Makeblock (http://mblock.cc/mbot/) funded through Kickstarter the development of a new robot - mBot (https://www.kickstarter.com/projects/1818505613/mbot-49-educational-robot-for-each-kid) with the subtitle "$49 educational robot for each kid". What they came up with is a interesting system that uses their mBlock software, which resembles Scratch but produces code for Arduino, to program a robot with LEDs, light sensors and buzzer integrated on the main board; but also comes with sensors for line-following, ultrasonic sensor and with the version in the kickstarter reward a 16x8 LED matrix.

My impression so far it is really quite intuitive to work with, in the example above the robot:

  • moves forward;
  • displays 'f' on the LED matrix; 
  • turns right;
  • displays 'r' on the LED matrix;
  • repeats until the on-board is pressed to stop the motors. 


What I like most though is seeing the graphical code turned into Arduino code - the potential to see the same thing done into two ways adds extra educational value. 



Related




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.

Monday, 20 July 2015

Lego Robot and Neural Networks

An overview of using Lego RCX  robots for teaching neural networks present at workshop in 2011.



The video below shows the robot trying out sets of weights for two neurones, until a set of weights are found that enable the robot to go around the circle.





As a part of a set of tools I have found the following useful for teaching the principles of simple neurones.

 Example code:

import josx.platform.rcx.*;

public class annlf{
 public static void main(String[] args)
 {
  int w[][] ={//put weights here};
  int o[]={1,1};
  int s1,s2,res1,res2;
  int sensor1=0,sensor2=0;
  robot_1 tom=new robot_1();
  Sensor.S1.activate();
  Sensor.S3.activate();
  for(;;){
   sensor1=Sensor.S1.readValue();
   sensor2=Sensor.S3.readValue();
   LCD.showNumber(sensor1);
   if (sensor1<42)
    s1=1;
   else
    s1=0;
   if (sensor2<42)
    s2=1;
   else
    s2=0;
   res1=w[0][1]*s1+w[0][2]*s2+w[0][0];
   if (res1>=0)
    o[0]=1;
   else
    o[0]=0;
   res2=w[1][1]*s1+w[1][2]*s2+w[1][0];
   if (res2>=0)
    o[1]=1;
   else
    o[1]=0;
   if ((o[0]==1)&&(o[1]==1))
    tom.forward1(10);
   if ((o[0]==0)&&(o[1]==0))
    tom.backward1(20);
   if ((o[0]==1)&&(o[1]==0))
    tom.tlturn(20);
   if ((o[0]==0)&&(o[1]==1))
    tom.trturn(20);
   LCD.refresh();
  }
 }
}

The example code uses two neurones to produce a line follower. The nice thing about this though is it easy to adapted this for a single neuron or multiple neuron tasks. For more on this some examples can be found here.
The above approaches used the Mindstorms RCX robots but it can equally be done with the newer NXT 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.

Sunday, 19 July 2015

Raspberry Pi Controlled robot from junk


In previous posts I start looked at using ScratchGPIO to control a junkbot - more about junkbots can be found at:http://junkbots.blogspot.com

Previous Posts:
 (http://junkbots.blogspot.com/2014/08/junkbot-pi-1-scratchgpio.html) and showed a Pi controlled junkbot briefly in action (http://junkbots.blogspot.co.uk/2014/08/junkbot-raspberry-pi-2-raspberry-pi.html).

In this post I aim to discuss
- Choice of motor controller card
- Provide an example of a drawing junkbot controlled through Scratch and Raspberrry Pi


Choice of interface/Controller card
The card chosen was the 4Tronix PiRoCon card  (http://4tronix.co.uk/store/index.php?rt=product/product&amp;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 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.



Example
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 Link

 




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.



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.

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.

Thursday, 16 July 2015

cutest computational thinking in the world?

Wonder Workshop (https://www.makewonder.com/) produce the  robots Dash and Dot robots (see picture above). It is hard not to be charmed by these robots, they are cute, easy to use, download the Apps and you are ready to go almost out of the box - and add to this an easy to use but fairly powerful tool for developing programming.


At the time of writing the software is only available for IOS but there are plans for Android. 

Blockly, available as one of apps, can be used to program the robots. It is a simple looking graphical language (simpler looking but similar to Scratch). A simple example (shown opposite) where Dash (the bigger of the two) does things such as  moves forward,  going left, lights change to orange, , left ear changes colour, head moves forward and it roars like a dinosaur. It relatively easy to then add loops and test (such as checking if it's 'friend' Dot is in view). Below is a very short video of Dash moving around until it 'sees' Dot.





It is difficult not to anthropomorphise these, especially when they are left alone they try and attract your attention with noises. They are just fun as well.

Recently, other developers have been producing alternative programming approaches. The Tickle App (https://tickleapp.com/en-us/) has added these robots to their supported devices.





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.

Wednesday, 15 July 2015

Robots and Problem-solving or is it Computational Thinking

Confession time, this has been a research interest for me, along with a number of colleagues, since around 2005. It started with undergraduate students - investigating teaching and developing problem solving skills as a first step developing programming skills through the use of LEGO-based robots and graphics based programming for undergraduate students. The main vehicle for developing the problem-solving skills has been LEGO Mindstorms robotics kits and series of gradually more challenging robot-based tasks.




Lawhead et al (2003) stated that robots “…provide entry level programming students with a physical model to visually demonstrate concepts” and “the most important benefit of using robots in teaching introductory courses is the focus provided on learning language independent, persistent truths about programming and programming techniques. Robots readily illustrate the idea of computation as interaction”. Synergies can be made with our work and those one on pre-object programming and simulation of robots for teaching programming as a visual approach to the teaching of the widely used programming language  Java.

The main benefits that the students stated of this approach was they  believe robots provide a method to visually and physically see the outcome of a problem. The approach taken the module has been visually-orientated. The appropriateness of this seems to be borne out by the student comments. Student satisfaction  for a module based around this approach is over 92%. One of the comments made was that the linking of the problem-solving robot task and the programming assignment was liked. This feedback is similar to that reported by other authors when teaching programming using robots (Williams et al, 2003).  There is enough scope in this approach to have different levels of complexity/functionality within an assignment task offering a basic ‘pass’ level for a particular task, but also the scope for those students that desire more of a challenge.





Reference
Lawhead PB, Bland CG, Barnes DJ, Duncan ME, Goldweber M, Hollingsworth RG,
Schep M (2003), A Road Map for Teaching Introductory Programming Using
LEGO Mindstorms Robots SIGCSE Bulletin, 35(2): 191-201.
Williams AB (2003) The Qualitative Impact of Using LEGO MINDSTORMS Robot
to Teach Computer Engineering IEEE Trans. EducVol. 46 pp 206.


Publications
  • Hill, G. and Turner, S. J. (2014) Problems First, Second and Third. International Journal of Quality Assurance in Engineering and Technology Education (IJQAETE). 3(3), pp. 88-109. ISSN: 2155-496  DOI: 10.4018/ijqaete.2014070104
  • Turner S (2014) "Greenfoot in Problem solving and Artificial Intelligence" CEISEE 2014 University of Electronic Science and Technology of China, Chengdu China 24-25 April 2014. 2013
  • Turner S (2011) Neural Nets Robotics Workshop. Bot Shop! University of Derby, 28th October 2011.
  • Hill G, Turner S (2011) Chapter 7 Problems First Software Industry-Oriented Education Practices and Curriculum Development: Experiences and Lessons edited by Drs. Matthew Hussey, Xiaofei Xu and Bing Wu. ISBN: 978-1609607975 IGI Global June 2011  DOI: 10.4018/978-1-60960-797-5.ch007
  • Turner S and Hill G (2010) "Innovative use of Robots and Graphical Programming in Software Education" Computer Education Ser. 117 No. 9 pp 54-57 ISSN: 1672-5913
  • Turner S, Hill G, Adams J (2009) "Robots in problem solving in programming" 9th 1-day Teaching of Programming Workshop, University of Bath, 6th April 2009.  
  • Turner S and Hill G(2008) "Robots within the Teaching of Problem-Solving" ITALICS vol. 7 No. 1 June 2008 pp 108-119 ISSN 1473-7507 
  • Turner S and Adams J (2008) "Robots and Problem Solving" 9th Higher Education Academy-ICS Annual Conference, Liverpool Hope University, 26th August - 28th August 2008. pp. 14 ISBN 978-0-9559676-0-3. 
  • Adams, J. and Turner, S., (2008) Problem Solving and Creativity for Undergraduate Computing and Engineering students: the use of robots as a development tool Creating Contemporary Student Learning Environments 2008, Northampton, UK. 
  • Adams, J. and Turner, S., (2008) Problem Solving and Creativity for Undergraduate Engineers: process or product? International Conference on Innovation, Good Practice and Research in Engineering Education 2008, Loughborough, UK. 
  • Adams, J., Turner, S., Kaczmarczyk, S., Picton, P. and Demian, P.,(2008). Problem Solving and Creativity for Undergraduate Engineers: findings of an action research project involving robots International Conference on Engineering Education ICEE 2008, Budapest, Hungary. 
  • Turner S and Hill G(2007) Robots in Problem-Solving and Programming 8th Annual Conference of the Subject Centre for Information and Computer Sciences, University of Southampton, 28th - 30th August 2007, pp 82-85 ISBN 0-978-0-9552005-7-1 
  • Turner S (2007) Developing problem-solving teaching material based upon Microsoft Robotics Studio. 8th Annual Conference of the Subject Centre for Information and Computer Sciences, University of Southampton, 28th - 30th August 2007 pp 151 ISBN 0-978-0-9552005-7-1 
  • Turner S (2007) Developing problem-solving teaching materials based upon Microsoft Robotics Studio. Innovative Teaching Development Fund Dissemination Day 1st March 2007 Microsoft:London 
  • Turner S and Hill G (2006) The Inclusion Of Robots Within The Teaching Of Problemsolving: Preliminary Results Proceedings of 7th Annual Conference of the ICS HE Academy Trinity College, Dublin, 29th - 31st August 2006 Proceedings pg 241-242 ISBN 0-9552005-3-9 

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.

Robots from junk and Computational Thinking



A recent presentation as part of the Department of Computing and Immersive Technologies, University of Northampton Research Seminar series, looking a on going project within the Department.

Junkbots has been a ongoing and ever evolving project since 2009 around the use of 'junk' as part of activities to developing skills in STEM subjects. In particular in the presentation (below) shows the links between these activities and Computational Thinking were discussed.








All views are those of the author and should not be seen as the views of any organisation the author is associated with.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.

Remote Data Logging with V1 Microbit

In an earlier post  https://robotsandphysicalcomputing.blogspot.com/2024/08/microbit-v1-datalogging.html  a single microbit was used to log ...