Blog - Sketching with Hardware

Team 3 – Project ‘The Hanging Moss Plotter’

Published on: | Author: Long Yan | Categories: 2018a, Best Projects

 


“Gardening – the typical hobby of a computer science student. /s”


was probably the first impression most of us had. How could we possibly build something cool with the topic “garden” in mind? Especially we – two young-ish men – who think about nothing but action/sports and haven’t seen a garden in ages..

At first, everything which came into our minds were things like intelligent scarecrows, water dispensers or seed slingers – simple iterations of different auxiliary tools for the default gardener. Effective and usable ideas, but nothing mindblowing. This continued until the combined brainstorming session.

Oh but still, all the power to you active gardeners – you stop the cities from becoming a grey pessimistic mess of concrete!

 The Choice

At the time for the brainstorming session we had 2 possible ideas which stuck. A remote control of a water dispenser mechanism and an implementation of a game called “Wikinger Chess”. None which we were thrilled with, the water dispenser was “too boring” and the “Wikinger Chess” was kind of really far fetched. Luckily during the combined brainstorming session we got an awesome idea, which pleased both of us. The combination of a hanging plotter and the art of living walls with moss.

A unique-ish implementation and application of vertical gardens.

 The Hypothetical Concept

Given our typical underestimation of required time and our overestimated assessment of our skills, our first decision came onto the following features :

  • The hanging plotter functionality itself 🗹
  • A mobile canvas 🗹 (we did use it)
  • An inputinterface for reading arbitrary pictures the plotter should draw ☐
  • A manual input for controlling the plotter 🗹
  • Figuring out the exact mathematics ☐

Sounds deceivingly simple, right? So with that decision in mind, our scavenging of the remains of old projects began, essential missing parts were purchased either through Amazon Now (damn they’re fast) or local shops. Full inventory list will be shown later on.

 So now, let’s do this!

The Inventory list is at the end of this entry. For more in-depth informations you could take a look at my partners blog entry. He’s covered some of the basic toys in a typical Arduino project.

The Preparation

After the short introduction into Arduino programming, we were fully prepared for the first step (maybe no /s here). Since this years #SketchingWithHardware started on a Thursday, we had the chance to plan our order and wait for delivery over the weekend. Unluckily, both of us still had exams and we would’ve missed about 1.5 days, so we used this sick Service called Amazon Now. With the delivery arriving the same evening – told you they are fast, really fast – we did get a good head start with a little preparation.

The basic framework

The usage of a servo was the first thing we tackled. Simplified a servo is a motor which can only move a certain angle. For testing purposes we started attaching one end of a string to the handle of the spraybottle and the other end to the servo. The torque created by the servo should’ve been able to pull the handle downwards and activate the spraying mechanism. This however was kind of unreliable during higher pressures in the bottle.

Solution? More Power! Luckily, we had stronger servos at hand which easily produced the necessary torque. Simple enough it worked like a charm. Motivation +1.

The stepper motors were a little more challenging. In contrast to servos, the steppers we used have an unlimited range of motion with a predefined stepsize (200 full-step in our case), need additional inputs and cannot be powered by the Arduino itself, therefore need external power supplies. However with the use of the A4988 stepper motor drivers it did simplify controlling them a lot. Instead of manually controlling the right cycles to move the stepper, the driver completely abstracts that layer of complexity. Hint: using the condensator randomly produces small mushrooms and defect condensators

src: https://howtomechatronics.com/tutorials/arduino/how-to-control-stepper-motor-with-a4988-driver-and-arduino/
A4988 Stepper Driver Wiring Diagram
src: https://howtomechatronics.com/tutorials/arduino/how-to-control-stepper-motor-with-a4988-driver-and-arduino/

In theory, all we needed to do is to connect the jumpwires correctly and give the driver the amount of steps it should rotate, IF there were no further physics involved. We tested the strength of the steppers by attaching the string directly to the stepperaxis with about 1.5 kg weight and initially it worked fine.


stepper motor pulling approx. 1.5 kg (Spray bottle + water)

Without thinking about the physical effect of a reel the initial plan was to create our own reels for winding up the string. We used the lasercutter to cut out two 20mm and four 22mm radius tori with the middle hole shaped like a nut and glued them together. This reel fit onto the referenced nut, which was attached to the axis of the stepper. With this construction we could attach the reels onto the axis, otherwise the axis kept slipping through. This however increased the strain on the motor such that the available torque produced wasn’t enough anymore (kind of like using a crowbar, but this time you’re at the other end and applied on angular momentum). Stupidity +0.5 //well, happens

Since we couldn’t get stronger steppers in time, the solution to this dilemma was the removal of the reel all together. Additionally, we changed the library to communicate with the driver. We switched from using <Stepper.h> to <AccelStepper.h>. This new library allows an easy setup of the acceleration of the steppers, which allowed a greater range for our plotter and really improved the effectiveness of the steppers (with constant slow acceleration you could even reach the speed of light, or maybe close to it..).

With the steppers and the servo covered, our basic functionality only needed proper input to (kind of) function. Motivation +1.

The mobile canvas

For our mobile canvas we had no doubt that it would be simple..

  • Get a woodsheet 🗹
  • Get some wooden sticks functioning as arms for holding the steppers 🗹
  • Assemble them with screws and angle brackets 🗹

Ok let’s start, this is going to be easy.. Gather materials, tinker a little bit, violà, it’s done. Ez Pz Lemon Squeezy. Wait..

Notice something? If not, don’t worry, me neither, until my mate lost it. How are we going to use this as a canvas, when the height of our bottle is already spanning over 2/3s of our drawing plane.

In short, we didn’t. We repurposed it to a safe zone boundary/guard and attached the steppers to the crossbars at the ceiling. Additionally, we used an LED-strip to implement an indicator for the two phases (initializing and ready) of the plotter.  Still Stupidity +100 // this shouldn’t have happened

 
Stepper attachment on ceiling + Repurposed canvas + LED indicator

The controls

For the controls we “recycled” an old Xbox 360 controllerjoystick for navigation and a Big Fat Blue Button for the trigger of the spray.

The joystick returns an analog signal to the arduino for each of the two axis (xAxis & yAxis), the button simply closes a circuit to a pin which we’re listening on. Since both elements separately don’t create a great user experience  (especially the joystick on the pcb), we decided to make a casing for our controller and a housing for our arduino. To create such a box we used a handy website which creates bluebrints for the lasercutter. The site we used was http://www.makercase.com/

.

  

This concludes the rough steps of the project and is only partly representative of all the mistakes we did, hehe.

Everything assembled!

The last step of the project, was to assembled all parts together and tidy up everything for the upcoming presentation. Here is how the final result looked like.

First the ugly part. We were kind of limited by the short wires and had to solder a lot of smaller wires together to achieve the range we needed. But even with longer wires we might’ve been lazy and it could’ve resulted in the same. But behold, the pretty part hopefully is going to dazzle you.

Here comes the good part. As none of us were Fine Arts & Multimedia students I’m quite proud that the visuals turned out to be not too crappy. It’s not good, but already pretty decent for two computer science students. #NotBadFace

Further impressions and some live footage of the project can be perceived in the video below.

“The Hanging Moss Plotter” – the Movie/Trailer

The Inventory List

For our project we did need unconventional things which were not commonly found in your usual workshop, so we had to order/purchase some of those on our own.

  • 1x Arduino Mega
  • 2x Stepper Motors (42BYGH4803)
  • 2x Stepper Drivers (A4988)
  • 1x Servo (Tower Pro MG995)
  • 1x LED Strip (maybe Adafruit NeoPixel Digital RGB)
  • 3x Capacitors (0.47 mF)
  • 1x 5V/1A Power supply (Arduino Mega)
  • 1x 12V/1A Power supply (Right Stepper Motor)
  • 1x 12V/1.5A Power supply (Left Stepper Motor)
  • 1x 7.5V/1A Power supply (LED Strip)
  • 1x Xbox 360 Controller (only Right Joystick in use)
  • 1x Big Fat Blue Button (Spray Mechanism with Servo)
  • 2x Pressurized Gardening Spray Bottles (1 Backup)
  • 2x Towels (Acting as Canvas)
  • X meters of string
  • Y meters of (jump-)wires
  • Z kg of wood
  • α Duct Tape
  • Ω Hot Glue

For more in-depth informations you could take a look at my partners blog entry. He’s covered some of the basic toys in a typical Arduino project.

The Wiring

 

Code

https://pastebin.com/EujGjJgH

 

Summary/Final Remarks

This was one of the best and fun experience I’ve ever had in a practical course. Given the time constraints it indeed was exhausting, but like the supervisor in the beginning announced, it was a joyful kind of exhausting experience. I got into the course with a lot of doubt, since I haven’t had electrial engineering / embedded-ish programming in years or at all, however that really didn’t pose a problem with the supervisors/staff. With that remark, I’d like to thank our supervisor Bernhard Slawik and his TA Beat Rossmy for their great help, open ears and cool attitude. At no point did I feel lost while challenging a problem and always received great advice from those two, thank you very much.
For interested readers I wholeheartedly can recommend taking this course. It might seem dreadful(ok not that extreme) but be assured, it is worth it. Go for it! (or try and hope you get lucky :P)

linked categories 2018a, Best Projects

|

Write a comment

Comment