Get in contact

posts/page

Testing the Tumblebug (EV3 and VEX IQ) – Damien Kee

Dec 22, 2015

So the title sounds awfully dry, but this is a project I’ve been meaning to do for a very long time.  A few years back one of my boys received a ‘Tumble Bug’ toy for Christmas.  It’s a pretty simple thing, you put the balls into the mouth and they tumble down and come out either the left foot or the right foot.

Being an engineer the second thing I thought of (right after “how do I turn that annoying sound off!?”) was “I wonder how statistically fair it is?”  ie.  Does the ball come out the left foot / right foot with a 50% probability?

This would make a great experiment to run in class, not just with the Tumble Bug but all different types of kids toys.  Skip forward a few years of me telling my wife not to throw it out even though our boys have out grown it, and having a little spare time this week now that school has finished.

I’ve used both the LEGO EV3 and VEX IQ systems to demonstrate the approach I used.

For the EV3, I put together a program in both EV3-G and RobotC that uses two Ultrasonic Sensors placed either side of the Tumble Bugs feet.  As a ball rolls past, the EV3 recognises a ball has rolled past and increments a variable.

For the VEX IQ, I had trouble getting the Ultrasonic sensor to detect the balls as they rolled past.  A combination of the curved surface and fast rolling ball was too much for it to recognise.  Instead I used the Colour Sensor in Proximity Mode which worked perfectly.

A little bit of maths figures out the percentages and then displays them on screen.  Full breakdown of how it is done as well as code download is after the video.

Hardware Setup

Not much to this one, just the EV3 Brain with 2 Ultrasonic Sensors and the VEX IQ Brain with 2 Colour Sensors.

EV3-G Code

Each foot waits until the ball rolls past (reading less than 10 cm) and then increments the variable associated with that foot as well as the total count.  It then updates the screen (setup as a My Block in this example) and waits for the ball to roll away.  Repeat as much as you want.

click for larger version

Update-display My Block

click for larger version

RobotC Code  (EV3)

This is essentially the same as the EV3-G version but with one small difference.  I used sequential IF statements in RobotC and Task Splits in EV3-G.  No idea why, both approaches would work for both software environments.

RobotC Code (VEX IQ)

Do it yourself

Here are the files I used

EV3-G –

Tumblrbug.ev3

EV3 RobotC –

EV3_tumblrbug.c

VEX IQ RobotC –

tumblrbug_VEX.c

Results

So I ran the test over 50 cycles with each setup to see what I got.

VEX IQ – Left 26%, Right 74%

LEGO EV3 – Left  33.3%, Right 66.6%

So there was a definite bias towards the right side of the toy.

What I love about doing these sort of extended investigations in class, is that rather than being a final conclusion, this now opens up a huge range of other questions and scenarios that you can test.

Why was there a difference?

Was the table level?

Do the different balls have an impact?

Does the placement speed in the mouth affect the results?

Please have a go your self and see what results you can come up with.

Get in Contact

  • Brenda Gahan - Head of Learning image

    Brenda Gahan - Head of Learning

    Sunshine Coast Grammar School
    star star star star star

    His wealth of knowledge and expertise allows him to tailor each workshop to the specific skill level and interests of the students (and teachers) and ensures that everyone is engaged and challenged.

  • Digital Technologies Teacher image

    Digital Technologies Teacher

    Victoria Point State High School
    star star star star star

    Students engaged in hands-on learning experiences that developed their problem-solving skills. It was a valuable and highly relevant real world learning opportunity.

  • Tammy Grady image

    Tammy Grady

    Senior Project Officer, QMEA
    star star star star star

    Through the Queensland Minerals and Energy Academy (QMEA), Damien has worked with hundreds of students and Teachers from across the State, all with varying levels of robotic and programming experience. Feedback from Damien’s workshops are always full of praise and appreciation, not only for his professional knowledge, but his adaptable teaching style and ease of delivery.

  • STEM Teacher - Years 7-10 image

    STEM Teacher - Years 7-10

    Tannum Sands State High School
    star star star star star

    Damien's professionalism and communications skills are superb. The very best educational expert visitor we have had come to the college.

  • Primary School Teacher - Year 5 image

    Primary School Teacher - Year 5

    Central Queensland Primary School
    star star star star star

    Damien's delivery style captivated students across every year level, from junior to senior. His depth of knowledge and genuine ability to tailor content to our students' abilities made a real difference, keeping everyone engaged and getting the most out of the experience regardless of their starting point.

  • Head of Curriculum image

    Head of Curriculum

    South East QLD Primary School
    star star star star star

    What stood out most was how thoroughly Damien customised the workshop to our school's specific needs. Rather than a one-size-fits-all session, he took the time to understand what we were after and delivered exactly that.