Friday, 11 March 2016

Sam's LEGO Mech Lab with SAM Labs



SAM Labs make small wireless electronics components that are programmed by wiring them together in a graphical editor. They're a great tool for maker families.

My 9 year old has been wanting to make a LEGO Mech with motorised weapons for a long time. (A Mech is a robot vehicle that can have a LEGO figure inside.) When I showed him SAM Labs he thought they might be just the thing for his project. He was further inspired by the name SAM Labs and decided that he wanted to build the lab where the mech was being designed. The inventor is of course called Sam.

Disclaimer: SAM Labs have loaned Tech Age Kids some of their kits for us to test out. Opinions are our own.


Sam Labs LEGO Mech Overview

If you're not familiar with SAM Labs then you might want to take a look at our SAM Labs review which covers the basics.

The Mech and light up lab part of thus project can be built using the SAM Labs Make kit. You'll need: 1 x servo, 1 x motor, 2 x RGB LED and 2 x button input.

If you want to add the alarm then you'll also need a Proximity sensor and a Buzzer component. (Alternatively you could use the Tilt sensor in the Make kit to design an enemy detector to play a sound from a computer or just to trigger the weapons on the Mech.)


SAM's Mech Lab

My son created a backstory for this project with a robot inventor called Sam. This is SAM standing at the Mech console:


LEGO Mech Automated Servo Sword


A servo is the perfect way to automate a slashing sword motion. The SAM labs servo is mounted underneath the seat of the LEGO Mech using loom bands. Loom bands are great for securely attaching things in a non-permanent way. The power unit for the servo is separate and attached by a cable. This is just placed behind the Mech. 

In the SAM Labs software you configure the maximum angle of the servo. The servo will move when it gets input and then return. A hold block can be used to make sure that the servo always reaches its maximum angle even if the input is only momentary. 

The sword action is triggered by a SAM button on Sam the inventor's console. 

My son added a SAM Labs RGB light which also lights up at the same time and is triggered by the same button. He also experimented with using a toggle to turn the light on for longer periods.




LEGO Mech Motorized Saw


The mech's other arm is a LEGO saw. I thought it was going to be tricky to attach the saw to the motor, but my son quickly found a component from the old LEGO Knights range which fitted pretty well. It's not a tight fit but was good enough for this project. (LEGO Technic connectors are a bit too large so the motor spindle would just spin inside them or fall off. We'll be looking for more ways to attach LEGO and other things to the SAM Labs motor.)

The LEGO Knights connector allows the saw to be angled, but the motion is pretty crazy if you angle it too much and the mech would fall over. My son experimented with the effect and learnt some useful physics and engineering in a very practical way!

The motor unit is fairly large, but loom bands were up to the job of securing it to the Mech. My son was happy with the way the motor became the arm. Mech's are supposed to have lots of tech. 

Another button on Sam's console triggers the saw and another RGB LED under the lab floor.



Proximity Alarm


Then there's a SAM Labs proximity alarm which detects intruders. This is connected to a SAM Labs buzzer. The buzzer can play different tones and there's a Sequencer software component that allows music to be composed. 

A Sequencer component is used to join notes together to create a horrible alarm sound. A filter block is used to have the proximity alarm trigger when it detects an enemy within a certain range. 

We played around with adding a Filter to adjust the threshold when the proximity detector would trigger. This took a bit of trial and error. 




SAM Labs LEGO Mech in Action

Here's the Mech in action. My 9 year old is controlling the weapons and lights from Sam's console while his younger brother willingly played the part of the enemy and trigged the alarm. 


SAM Labs vs LEGO Power Functions / Mindstorms

My kids do have a small LEGO Power functions set which has a motor and white LED lights. This has the advantage of actually being LEGO compatible so that the components can be built into LEGO models, but it's bulky so models need to be quite big. Power Functions isn't programmable, you don't have coloured lights and the motor is quite bulky which limits what it can be used for. The range of LEGO power functions components is quite limited too. 

LEGO Mindstorms requires the large main unit to be included in the model and everything has to be physically connected. Mindstorms is great for big single models. But doesn't work so well for integrating into a LEGO project like the lab plus mech. 

For this style of project SAM Labs worked really well. The only wires are the ones from the servo to its power/control unit. This means that the components can be placed anywhere without worrying about how to physically connect them. 

The model of multiple components communicating IoT style is quite different to the central brain coordinating everything model. It was more realistic for the project my son had designed.

Extensibility?

There's scope to extend the project using custom coding without needing to add any more hardware. Future additions could include:
  • coloured light sequences rather than just simply turning on a specific colour
  • turning the motor in the other direction
  • the buzzer could play extra sounds effects when weapons are activated or when keys are pressed on the keyboard
  • different speeds and angles for the sword for different attack styles

Success?

Well my 9 year old was very happy to build his long-planned idea. He really got into the back story he created about Sam the mech inventor and his lab. The small size of the SAM Labs components meant that they fitted well into a LEGO project.

My son liked the wiring-based software but got frustrated that he had to delete wires rather than being able to just move one end. 

SAM Labs components are expensive but they can be reused over and over again for new projects. I'd far rather my kids were designing and building their own tech toys in this way than just playing with pre-built tech toys. 

The project was a good mixture of engineering and simple coding. It's a great demonstration of the difference between a servo and a regular motor. My son had to be careful to make sure there was room for the servo arm to move freely. I helped him attach the components with loom bands to make sure they were secure.

Projects like this are a great way for my kids to make the most of their extensive LEGO collection. 





More from Tech Age Kids:

Comments:

Unknown said...

Such a great project!

Post a Comment