Project of the week – Lego Wedo Inchworm

Share this!

Continuing the animal theme that we started with the Lego Wedo Swinging Monkey, Liam made the Lego Wedo Inchworm this week. The inchworm is also inspired by one of Yoshihito Isogawa’s creations.

Lego Wedo Inchworm

This is a fantastic project for early on in your robots and coding journey. Liam built it by himself, just from watching a video, in about an hour. And that included figuring out a few substitutions for parts he didn’t have. It’s very cute, and demonstrates some key mechanical concepts that we’ll talk more about later on.

What is Lego Wedo?

Lego Wedo 2.0 is Lego’s entry-level robotics & coding kit, designed for the education space. The core kit comes with a smarthub, motor, tilt sensor and motion sensor, plus a range of gears, wheels, axles and bricks to create a wide range of projects. As you would expect, it’s compatible with all the standard Lego and Technic components.

Alongside the kit comes the Lego Wedo 2.0 app. The app contains instructions for heaps of Wedo projects, and an image-based coding platform that communicates with the smarthub via bluetooth. For us, a big benefit of having the project instructions within the app is that they’re all in one place, and they can’t get lost or damaged. The app is a very big download, around 500MB, but once you’ve got it installed, it’s very easy to set up and get started.

The inspiration for the Lego Wedo Inchworm

The Lego Wedo Inchworm comes from Yoshihito Isogawa, who has created endless projects from Lego Wedo, Technic, Mindstorms and more. You can find all of these on his YouTube channel. In addition, he has published 10 books that provide the instructions for his projects.

The videos don’t show the building process itself, but the inchworm project isn’t complex. Liam had a look at the video a few times, pausing it from time to time to see particular elements, and then pulled out his Lego boxes and gave it a go.

The mechanics of the inchworm

The Lego Wedo motor drives an axle with a double-bevelled 8-tooth gear attached. Perpendicular to the 8-tooth is a 20-tooth bevel to drive the main axle. If you need to make substitutions for either of those gears, the most important thing is that they are both bevelled. A straight-tooth, or standard, gear won’t connect at a right angle. Once you’ve got the right-angle part completed, the main axle passes through the frame and connects to 24-tooth standard gears on either side.

Connector beams run from the front plate of the inchworm to the gears on the rear plate, but are fixed off-centre on the 24-tooth gears. The beams could be straight if you don’t have right-angles. When the gears turn, they pull the connector beams closer and further away from the front plate. Have a look at the close-ups below to see how it changes as the gears turn.

Using the Ledo Wedo 2.0 app vs Scratch for coding

The Lego Wedo 2.0 kit comes with an app for pictorial coding, which lets you get your projects up and running quickly. The platform is very simple to use, with blocks aligned side-by-side in the sequence you want your project to execute the instructions. A range of inputs can be used, including from the tilt sensor, motion sensor, noise sensor (from your devices microphone), or from the ‘go’ button. In terms of outputs, the motor can activate, a display can show on your devices screen, or the colour of the light on the smarthub can change.

However, there is limited complexity that can be achieved within the Wedo app, as it’s designed for simple instructions and getting started. If you want to start coding more complex actions, consider using Scratch instead.

Scratch is a block-based coding platform, which has the ability to integrate with a wide range of hardware options including Lego Wedo, Mindstorms and Boost, BBC microbit, and Makey Makey. Importing the custom blocks for Lego Wedo lets you combine them with standard Scratch blocks to extend what you can do.

Creating the code for the Wedo Inchworm

The Lego Wedo smarthub can be coded with either the Lego Wedo app or Scratch. We used Scratch for this project, because it allowed for greater customisation. Liam programmed the inchworm to move forward for 1.5 seconds at a given speed, then make a tweeting sound. Why tweeting for an inchworm? Why not… If you know what noise an inchworm makes, please let us know in the comments – Liam really wants to know!

The code was wrapped in a loop with a fixed number of repeats. It could also be done with a forever loop, but the inchworm has no steering so will eventually hit a wall. Liam tested out different numbers of repeats that gave the inchworm a good run but stopped before he got away.

Scratch code for Inchworm
Scratch code for Inchworm

The motor speed took some trial and error, because the inchworm goes VERY FAST at higher motor speeds. But at the other end, a slow motor speed struggled to get the inchworm moving at all. This is where the Scratch coding platform can be great. In Scratch, the Wedo motor speed can be set to a range between 0 & 100. In the Wedo app, the speed is 0-10. By using Scratch, you can tweak the speed to 27 for example, whereas in Wedo that would be 2.7. As Wedo only works in whole numbers, you would need to round it to 2 or 3.

Challenges Liam faced

The brakes didn’t work

When Liam first tested this project, he found that the inchworm didn’t travel forward like the video showed it doing. As the gear movement caused the hinge action of the two sides, the inchworm sort of bobbed up and down without going anywhere. Liam found it unbelievably funny, although it clearly needed a bit of help. Have a look at the YouTube video at the top of the post, from the 3:20 minute mark onwards.

The reason the inchworm didn’t move was that the wheels were able to turn freely in either direction. There was nothing to keep the back set in place while the front wheels moved forward, and vice versa.

In the building process, free-moving pads had been added to the same side of the inchworm as the gears on the wheel axles. It was very hard to work out what they were for, until testing revealed the travel issue. The idea of the pads is that they allow the wheel to turn forward freely, then catch on the wheel gear as the wheel tries to reverse. This acts like a brake, and ensures that the inchworm moves forward.

The brake pads needed some modification to make them work. Here’s how they were fixed:

Some components had to be substituted

Some of the decorative components that can be seen in Yoshihito Isogawa’s inchworm had to be substituted for parts Liam had available. We reckon he’s a pretty happy-looking inchworm.

Lego Wedo Inchworm

Did you try this project?

Have you had a go at the Lego Wedo Inchworm? Did you face the same challenges as Liam, or something different?

Let us know how you got on in the comments section below, and make sure to check out Liam’s Lego Wedo Swinging Monkey before you go!

Share this!

Similar Posts

6 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *