Earthquake machine with Lego and Microbit

The idea for today's project came from making a competition in my class to see who could design a building that can survive an earthquake. I saw this same idea in Lego Masters and it looked fun. Unfortunately, we didn't get to do it because we ran out of time before the school year finished, but I learnt a lot in the process.

This project is about an earthquake machine that I built with Lego and Micro:bit. It features 4 different speeds to make increasingly harder to survive and also resembles a bit what would happen in a real earthquake as the P, S and surface waves arrive.

Here is what the full thing looks like so let's delve into more detail.




As you can see here, when you pay close attention we have reused the Minecraft salvation console because it also used a 9 volt pump so all I had to do was switch it out for my 9 volt Lego motor and it was good to go.

In this image below you can see the motor shield that I used to drive the 9 volt motor for this project. It is the "Drive:bit" from 4tronics.




However, to make the motor actually do something we needed the linkage which enables the rotation movement to be transformed into back-forth movement so it can move the Lego plate causing the earthquake. 




But after a bit of thorough testing, I realized that that linkage wasn't going to hold the strain so I reinforced it by adding bushings and a couple other things as you can see in the image. That made the trick.




But then I realized how do I know that the plate won't go sideways? That is when I came up with the wonderful idea of making rails to keep the plate in line.



This image below shows how we cabled everything. Quite a tangle isn't it. 



To connect the realms of Lego and Micro:bit we had to make custom cables as you can see in the image below. We added Dupont male connectors to the Lego cable. To drive a motor we only need the two cables in the middle. 



Here is the code. It is basically reused from the Minecraft salvation console, but it drives a motor instead of a pump. In the "forever" loop you can see how the motor increases speed every 15 seconds.


Finally, this is a video with the quake machine in action. Can you bet what Lego minifig survives?





Comments