Blog - Sketching with Hardware

Team 4 – Snack2Go

Published on: | Author: Anna Kyas | Categories: 2018b, Projects

INTRODUCTION

For our very own naughty robot Sakina and I decided to build the Snack-2-Go. A little snack bowl that doesn‘t want you near it, thus drives away the moment you approach the table.

The general idea behind it is easy to execute: motion sensors pick up an object from a certain distance which then lead a signal to the motor moving the bowl, positioning it away from the active sensors. The question was how the bowl was supposed to move – for that we had two options: either make the Snack-2-Go a makeshift car with wheels, motor, sensors and bowl in one or create a table that uses a hidden mechanism and magnets to achieve our goal.

Image 1: Car idea vs. table construct.

After our tutor Bernhard gave input we decided on the table. While a compact vehicle could have been an option, prior experience proofed it to be a messier process. Heavier builds require a stronger motor which need more batteries thus needing even stronger motors, creating a vicious cycle of no results. The table on the other hand gave us a safety net. Via a technique called CoreXY a machinery is build that allows us to move an object to X- and Y-coordinates. If that was working out then we had solid ground to refine our project… more on that later.

Having the technique in mind, a pool of resources at hand and determination in our hearts we were ready to tackle this task.

THE STEPPER MOTORS

With the few tools we had at hand on the first day, we had to get our motors running. Two stepper motors were needed to move the conveyor belt that operates the entire apparatus. Powering these motors usually takes an Arduino connected to an external battery, but to spare us a mess of wires we tried using a CNC shield which already provided the energy we needed. Upon connecting steppers with the modified Arduino we discovered the shield wasn’t compatible to our Arduino Mega. An alternative served the RAMPS, a device similar to the CNC shield, though designed specifically to power stepper motors. Looking for help on the RAMPS wikipedia we found the corresponding pins to plug in our steppers and connect them to the right outputs of the Arduino. A bit of code tweaking later the steppers were running, giving us a boost in confidence to face the next big obstacle.

Image 2: Two stepper motors attached to a RAMPS.

THE FRAMEWORK

With the motor set-up working it was time to get on the build. After one day and staring at a wooden board for approximately three more hours I understood how the mechanics worked. We were following the principle of the CoreXY technique, a mechanism used in machinery like 3D printers. For it to run we had to build an H-construct: 2 aluminum sections had to be fixed on the board parallel to each other with another section (‘The Bone’ as we lovingly called it) sliding up and down on top of them. The Bone had a little 3D print running across it, a leftover of Bernhard’s successful 3D printer project, that would be the isle to move the bowl over the board. Next step was the placement of the ball bearings and pulleys as pictured below (see: the round circles):

Image 3: Example given on the CoreXY site.

Image 4: Blueprints. Notice the absence of the crossed conveyor belt – works just as well!

For the record ball bearings are circular pieces often made of steel. Their smooth surface and rolling-element bearings reduce friction and help move the belt across its path. To fix them to the board washers had to be used to put them at the right height while still having them roll easily. Important: Only small washers right next to the bearings! Otherwise they’ll block their function. Big washers can be used to keep them straight on the board whilst preventing the belt from slipping off.

Image 5: Two ball bearings with several different sized washers.

To the most important question: how the hell does this thing work? The belt snakes its way along the steppers, ball bearings, pulleys and the isle to eventually form an H. Now, the steppers will be able to make the Bone and the isle move: both of them turning the same direction supplied X-control while them turning in opposite directions gave Y-control. To note is that the belt has to be perpendicular and stretched tightly at all times to assure smooth movement – a lot of measuring, (un)screwing and readjusting had to be done!

Image 6: Placement of the sections and nylon thread for better understanding.

Image 7: Adjusted steppers with belt. Some cables for aesthetics.

Image 8: Completed board!

Image 9: Here’s a movement test.

Day 2 and 3 had us sweating and in a slight state of panic as the both of us worked separately on our tasks with no possible way of testing our efforts. We had one last day- or rather 4 more hours to combine our handiwork to one fine Snack2Go.

THE WEDDING – TABLE AND MOTORS IN ACTION

As mentioned before while I worked on the mechanism, my partner Sakina handled the code. Taking some inspiration from last year’s project “The Hanging Moss Plotter” we switched our library from <Stepper.h> to <AccelStepper.h> which helped us adjusting the acceleration of the steppers. On top of that <MultiStepper.h> was added to manage multiple steppers at once. Having the correct pins assigned already, it was only a matter of try-and-error to get our motors to roll in the right direction.

The next step was getting the sensor to work. Using a motion sensor we first got the program to throw us the distance of an approaching object. Then using an if-statement we connected the stepper motors to the function: if someone approaches the board and stands closer than 20 cm, the steppers would move the isle away. The general idea was working out, but for some reason the motors were loud. No adjustment of the acceleration nor the max speed seemed to calm these roaring machines. Turns out the RAMPS was running too hot in spite of having added coolers on top of the drivers… well, not much to be done about that at this point in time except blowing on them now and then.

Time was running out and some shortcuts had to be taken. Instead of making precise calculations of how the isle should move in comparison to the measured distance we settled on giving the isle a certain path to follow when someone steps in front of the sensor. If that someone leaves the monitored area the isle would go back to its former state. After trying out some coordinates it worked!! And we used the last 5 minutes to practice our little presentation.

For the ones curious the code can be found here.

RESULT

In the last hours we had to rush to be able to present our project in a proper way as building all the separate parts took us much longer than expected. Sadly, we didn’t have the time to tidy everything up, e.g. put the second wooden board on top of everything, properly solder the stepper wires onto the RAMPS or design our little snack bowl like an old-timey candy dispenser as we had planned to. Nonetheless, we were proud of our little working mechanism! The bowl moved like a charm and the sensors were working when pushes came to shove.

For the exhibition we’d like to finish up the table at the very least – make our dream a reality and put Snack2Go to its full potential. If the mood strikes even add the other three sensors to the sides of the table, assuring that no one would ever reach the snacks. For now, though, we’re satisfied.

All in all in spite of the hardship we had to face during these few days, we truly learned a lot and got something rolling that we had never dreamed of. This was a fun experience and gave us a great insight into the world of electric and mechanical engineering!

linked categories 2018b, Projects

|

Write a comment

Comment