Tap Light Focus Timer System

I’ve been procrastineering on a “sticky note timer” which would incorporate an e-ink display, be portable, updatable via WiFi, show me what I should be working on, and flash lights at me to give me a sense of movement / time passing / and urgency.  Sometimes I use the word “procrastineering” to refer to when I start to spiral on a project and end up in analysis paralysis.  But, I think it is more appropriately used when I’m doing a deep dive on a project when I really have something much more important / urgent I should be working on.

A long time ago I added a few components to an off the shelf dollar store tap light and turned it into a game buzzer.  While the sticky note timer project was marinating  / incubating1 in the back of my brain, I realized that maybe I don’t need or even want something that high-tech.  Maybe what I need is something dead simple?  As cool as the sticky note timer project is – and it really is neat – there’s a lot of pieces to the puzzle and a fair bit of maintenance that goes along with it once its finished.  You have to connect to it, upload a list, set up timers, etc.

I finally decided on something not so easily adjustable, but still flexible in it’s simplicity.  Rather than making the setup (adding / updating / uploading lists to a timer) something I have to do in order to start the timer, what if I made it part of the timing?

First, let’s look at what the setup.  A dollar store tap light which includes a lot of handy parts – a battery holder, a push button switch, several springs, and a simple and at attractive enclosure.

This slideshow requires JavaScript.

On the far left is a basic off the shelf dollar store tap light.  Next to it are two others I had previously modified to work as game / timer buzzers2  The last picture is the wiring diagram, except that I wired the ATTiny chip to the positive wire coming from the button switch.  Whenever I hit the button, it will toggle the circuit on and off.

Using some parts from my electronics bin3, I cobbled together a prototype on a breadboard that would do the following when the button was hit:

  • Turn orange for 1 minute and beep 3 times in the last 3 seconds
  • Beep once more and turn green for 12 minutes, then fade from yellow through orange over the last 3 minutes
  • Flash red and beep three times after 15 minutes had lapsed (12 minutes of green and 3 minutes of color fading)
  • Turn off, go to a low power mode, and then wake up long enough to flash blue every 8 seconds
  • After 5 minutes, it would flash green and beep twice
  • Then keep doing this 8 second blue flash and green light plus beep every 5 minutes
Animation of LED timer button

You’re probably wondering – what’s with all these timers and lights and beeps?  Here’s how I use them:

  • Place and slap the button to get going
    • I put my phone on my desk and the timer right on top of my phone.  It’s a big 4″ diameter timer and covers the phone pretty well.  I can’t pick up my phone without seeing this timer ticking down.  This is a huge difference between a phone app and a physical thing standing between me and my phone.  There are some web browser based apps – but these don’t really work for me.  Either I have to keep that window open and on top or … I’ll forget it exists.  This timer is right there, front and center, on my desk and lit up no matter where my desktop might take me.
    • Plus, it’s actually a little therapeutic to slap the tap light.  Pushbutton switches like this are built to take a bit of abuse and the physical action of hitting the light is a lot of fun.
  • Orange for 1 minute
    • This is the replacement for the “maintain / update a list.”  Instead of having to fuss with a list, I’ve dumped myself directly into work.  I’m suddenly racing the clock for 60 seconds to write all the things I want to try and accomplish in the next 15 minutes.  Maybe it’s a few emails, make some phone calls, or write / edit a document.  After 57 seconds, the buzzer will beep three times to let me know that the 15 minute timer is about to start.
    • Or, if you already have a particular task to work on, you could use this time to follow a process like Steven Kotler’s suggestions on tactical transitions to a a flow state4.  His three step process is:
      • Anchor your body
        • Practice box breathing.5  You could box breathe 3 times in one minute and have a few second left over to psych yourself up.
      • Focus your mind
        • Write down one clear goal.
      • Trigger your ritual
        • Recite a mantra, perform a gesture, start a “work” playlist
  • Green for 15 minutes
    • It’s go time!  Whatever I wrote down, now I’m in a race to work on those things – and those things only.  I can’t let new emails, calls, etc, distract me – that buzzer is going off in 15 minutes.  As the timer closes in on 15 minutes, with just 3 minutes to go, it turns yellow and fades to orange.  If I look up / down and see this, I know I’m in the home stretch and I’ve got to start moving fast to wrap things up.
  • Red alert!
    • Once the 15 minutes is up the light flashes red and beeps to let me know I’m off the hook.  Now, if I’ve already hit peak productivity, I could keep going.  If I got sidetracked, it’s an alert for me to restart the timer and get back to it.
  • Blue flashes, 5 minute green flash and beeps
    • These blue flashes happen once every 8 seconds6 just to keep the timer present in my vision so it doesn’t just appear into the mess on my desk.
    • If I finished out the 15 minute block of work time and I don’t stop the timer, the 5 minute timer is my reminder to return to my desk, reset the timer, and get going again.
    • If I ended up working past my 15 minute block of work time, the 5 minute beeps still give me a sense of how much time has passed.7
    • Importantly – if I get distracted by a sidequest, one of the beeps every 5 minutes is bound to catch my attention and remind me I’m supposed to restart the timer and get back to work.

So… does it work?  For me, yes!  Here’s why:

  • The hardest part of getting started is getting started.  My tendency is to want to collect all the stuff I’d need, get real comfy, make a list, look up some documents, etc.  This system short circuits all that.  I just need to be able to slap the big button sitting on top of my phone.  If I can manage that, I get 60 seconds to collect myself and then it’s time to rock and roll.  That’s enough time to take some deep breaths, start a playlist, or just sit quietly before I get started.
  • It covers up my biggest distraction.  Unlike an app on the phone or my desktop computer, I can literally cover up my phone with this big damn button.  I won’t see any notifications and if I want to pick up my phone, I have to actually look at and ouch the button – which is itself a reminder to get back to work.
  • It plays into a sense of play, urgency, and my own overdeveloped sense of competitiveness.  I enjoy hitting the timer to turn it on – and I want to beat that 15 minute timer.
  • The 5 minute timer acts like a built in break timer.  If I can get through 15 minutes of work, I can goof off, write a blog post, and without doing anything else that 5 minute timer can bring me back.
  • It includes a “failsafe” to bring me back to the timer if I get distracted by a sidequest.  If I miss the 15 minute timer, there’s another 5 minute timer around the corner.  Even between timers, there’s an intermittent flash of blue light to grab my attention.

The only meaningful “downside” to this timer button for me is there’s no pause button.  However, this isn’t exactly bad.  It helps me really hone in on what’s important and what’s interesting.  If a family member asks me for something or a call comes in, I just need to weigh the benefit of addressing the intrusion against having to restart the timer.  And realistically, if I pause the timer, I’m going to need some time to drop back into “flow” anyhow.

Sticky Note Timer
  1. Ah, just what I need! A new project!
  2. Sticky Note Timer, parts arrived!
  3. Seeed Studio XIAO ESP32C3 and a small sticky note display
  4. Brainstorming More E-Ink Stuff
  5. Smol Fonts for E-Ink Displays
  6. Tap Light Focus Timer System
  1. Fermenting?  Festering? []
  2. The older ones would flash orange a few times to alert you the game was going to start, turn green, fade from yellow to red, then flash red and buzz after 15 seconds. []
  3. I used an ATTiny45 because I had one, but it’s not much more expensive to use an Adafruit Trinket, a buzzer, a RGB/neopixel LED, and some wire.  In a subsequent version, I also used a small prototyping board like the Adafruit Perma Proto Boards []
  4. It’s the second slide []
  5. TLDR:  Breathe in slowly through the nose for 4 seconds, hold for 4 seconds, breathe out slowly through the mouth for 4 seconds, hold for 4 seconds, repeat []
  6. Because that’s the longest the little microchip can do between “deep sleep” to conserve battery life []
  7. I may adjust the program so the first five minutes is 1 beep, second five minutes is two beeps, etc []

Prusa Lack Stack, LED Lighting, CircuitPython Tweaks

Much like those recipes on the internet where the author tells you their life story or inspiration, I’ve got a lot to share before I get to the punchline of this blog post (a bunch of CircuitPython tweaks).  Edit:  On second thought:

  • Keep the lines of code <250
  • Try using mpy-cross.exe to compress the *.py to a *.mpy file

This is a bit of a winding road, so buckle up.

Admission time – I bought a Prusa1 about three years ago, but never powered it on until about a month ago.  It was just classic analysis paralysis / procrastineering.  I wanted to set up the Prusa Lack enclosure – but most of the parts couldn’t be printed on my MonoPrice Mini Delta, which meant I had to set up the Prusa first and find a place to set it up.  But, I also wanted to install the Pi Zero W upgrade so I could connect to it wirelessly – but there was a Pi shortage and it was hard to find the little headers too.  Plus, that also meant printing a new plate to go over where the Pi Zero was installed, a plate that I could only print on the Prusa, but I didn’t have a place to set it up…

ANYHOW, we’ve since moved, I set up the Prusa (without the Pi Zero installed yet), printed a Prusa Lack stack connector to house/organize my printers.  Unlike the official version, I didn’t have to drill any pilot holes or screw anything into the legs of the Lack tables.

Once the Lack tables were put together, I set about putting in some addressable LEDs off Amazon. I found a strip that had the voltage (5V for USB power), density (60 LED’s per meter), and the length (5 meters) I wanted at a pretty good price <$14, shipped.  I did find one LED with a badly soldered SMD component which caused a problem, but I cut the strip to either side of the it, then soldered it back together.  Faster and less wasteful than a return at the cost of a single pixel and bit of solder.

The Lack stack is three tables tall, keeps extra filament under the bottom of the first table, my trusty Brother laser printer on top of the first table, my trusty Monoprice Mini Delta (Roberto) on top of the second table, and the Prusa (as yet unnamed Futurama robot reference… Crushinator?) on top.  Since I don’t need to illuminate the laser printer, I didn’t run any LED’s above it.  I did run a bunch of LED’s around the bottom of the third printer…  this is difficult to explain, so I should just show a picture.

When Adafruit launched their QtPy board about four years ago, I picked up several of them.  I found CircuitPython was a million times easier for me to code than Adafruit, not least of which because it meant I didn’t have to compile, upload, then run – I could just hit “save” in Mu and see whether the code worked.  I also started buying their 2MB flash chips solder onto the backs of the QtPy’s to a ton of extra space.  Whenever I put a QtPy into a project, I would just buy another one (or two) to replace them.  There’s one in my Cloud-E robot and my wife’s octopus robot.  Now, there’s one powering the LED’s in my Lack Stack too.

I soldered headers and the 2MB chip into one of the QtPy’s, which now basically lives in a breadboard so I can experiment with it before I commit those changes to a final project.  After I got some decent code to animate the 300 or so pixels, I soldered an LED connector directly into a brand new QtPy and uploaded the code – and it worked!

Or, so I thought.  The code ran – which is good.  But, it ran slowly, really slowly – which was bad.  The extra flash memory shouldn’t have impacted the little MCU’s processor or the onboard RAM – just given it more space to store files.  The only other difference I could think of was that the QtPy + SOIC chip required a different bootloader from the stock QtPy bootloader to recognize the chip.  I tried flashing the alternate “Haxpress” bootloader to the new QtPy, but that didn’t help either.  Having exhausted my limited abilities, I turned to the Adafruit discord.

I’ll save you from my blind thrashing about and cut to the chase:

  • Two very kind people, Neradoc and anecdata, figured out the reason the unmodified QtPy was running slower was because the QtPy + 2MB chip running Haxpress “puts the CIRCUITPY drive onto the flash chip, freeing a lot of space in the internal flash to put more things.”
    • This bit of code shows how to test how quickly the QtPy was able to update the LED strip.
      • from supervisor import ticks_ms
      • t0 = ticks_ms()
      • pixels.fill(0xFF0000)
      • t1 = ticks_ms()
      • print(t1 – t0, “ms”)
    • It turns out the stock QtPy needed 192ms to update 300 LED’s.  This doesn’t seem like a lot, until you realize that’s 1/5th of a second, or 5 frames a second.  For animation to appear fluid, you need at least 24 frames per second.  If you watched a cartoon at 5 frames per second, it would look incredibly choppy.
    • The Haxpress QtPy with the 2MB chip could update 300 LED’s at just 2ms or 500 frames per second.  This was more than enough for an incredibly fluid looking animation.
    • Solution 1:  Just solder in my last 2MB chip.  Adafruit has been out of these chips for several months now.  My guess is they’re going to come out with a new version of the QtPy which has a lot more space on board.
      • Even so, I’ve got several QtPy’s and they could all use the speed/space boost.  I’m not great at reading/interpreting a component’s data sheet, but using the one on Adafruit, it looks like these on Digikey would be a good match.
  • The second item was a kept running into a “memory allocation” error while writing animations for these LED’s.  This seemed pretty strange since just adding a single very innocuous line of code could send the QtPy into “memory allocation” errors.
    • Then I remembered that there’s a limit of about 250 lines of code.  Just removing vestigial code and removing some comments helped tremendously.
    • The next thing that I could do would be to compress some of the animations from python (*.py) code into *.mpy files which use less memory.  I found a copy of the necessary compression/compiler program on my computer (mpy-cross.exe), but it appeared to be out of date.  I didn’t save the location where I found the file, so I had to search for it all over again.  Only after giving up and moving on to search for “how many lines of code for circuitpython on a microcontroller” did I find the location again by accident..  Adafruit, of course.  :)
    • I’m pretty confident I will need to find the link to the latest mpy-cross.exe again in the future.  On that day, when I google for a solution I’ve already solved, I hope this post is the first result.  :)

The animations for the Lack table are coming along.  I’ve got a nice “pulse” going, a rainbow pattern, color chases, color wipes, and a “matrix rain” / sparkle effect that mostly works.

Animated GIF

I started this blog post roughly 7 months ago2 by the time I finally hit publish.  After all that fuss, ended up switching from CircuitPython (which I find easy to read, write, maintain, update) to Arduino because it was able to hold more code and run more animations.  Besides the pulse animations, rainbow patterns, color chases, color wipes, and a matrix rain, it’s also got this halo animation, some Nyan cat inspired chases, and plays the animations at a lower brightness for 12 hours a day (which is intended to be less harsh at night).  I could probably add a light sensor, but I don’t really want to take everything apart to add one component.

  1. The i3 MK3S+! []
  2. January 7, 2025 []

SOLVED! I can’t upload Arduino sketch to Wemos D1 Mini ESP8266

ESP8266 Wemos D1 Mini pinout
ESP8266 Wemos D1 Mini pinout

My Wemos D1 Mini WiFi boards had arrived from China1 on Friday and I’ve been fiending to build… something with them.

Unfortunately, I couldn’t get the very basic “blink” sketch to upload.  Here were my symptoms:

  • When uploading, I got the “error: failed to open” message
  • My Windows computer flashed a message when I connected the board, saying it was an unrecognized device
  • The Device Manager showed a little “alert triangle” suggesting the proper drivers were not installed
  • All of the ports in the Arduino IDE were disabled and greyed out

I tried several different upload speeds and several different USB micro cables to no success.  It was not until I found this post explaining that I needed to update the Wemos drivers along with a handy link to said drivers.

Now that I got this board blinking, I can’t wait to get it to do MOAR…

Default Series Title

Update:  My buddy Chris pointed out that I’ve been mixing up ESP32 and ESP8266.  I’ve corrected the title now.

  1. $13 for four boards plus headers?! []

What are the minimum parts necessary for an Arduino?

Outside a MintDuino, a book is a man's best friend
Outside a MintDuino, a book is a man’s best friend

It was hard for a beginner like me to imagine that an Arduino actually requires a whole lot less than all the stuff you would see on an Arduino Uno.  Assembling a MintDuino – and slowly pulling parts out to see what was really necessary – helped me understand what was truly critical to its operation.

Inside a MintDuino, it's too dark to read...
Inside a MintDuino, it’s too dark to read…

I found it useful to know what the (near) minimum necessary components of an Arduino were so that I could build a small project directly around just the chip and whatever critical parts were absolutely required to run the circuit.1 I wanted to build the circuit as small as possible – not to save on parts or cost, but to make sure everything could fit into an Altoids tin.23

As a side note, there is a very definite monetary benefit to figuring out how to build a minimal Arduino compatible device.  A brand new Arduino will run you about $30 – whereas soldering a chip into perfboard with the least amount of parts required would probably only cost you about $9 or less if you source the pieces carefully.  While an actual Arduino form factor makes a lot of sense when you’re using off-the-shelf shields, it’s not nearly as important when you’re building a very simple or completely custom project that you don’t intend to take apart.  And, when you’re talking about leaving a chunk of electronics in a project, it’s a lot easier to leave $9 in parts inside rather than a $30 Arduino board.

Here’s what I found to be the (near) least number of parts and (basically) the smallest configuration for the programming MintDuino:

The (almost) minimum you need to upload an Arduino sketch
The (almost) minimum you need to upload an Arduino sketch

This is the “almost” minimum since the configuration above includes (1) a red power indicator LED and a 220 Ohm resistor and (2) a red wire, another red LED, and another 220 Ohm resistor for running the “Blink” sketch.  Once you remove those parts, you could still upload a sketch to the Arduino – but it wouldn’t be able to do anything.  You’ll notice that this configuration doesn’t even include the usual reset button for the Arduino.4 It’s not pictured, but you’d also need a way to communicate with the Arduino, such as a USB cable plus FTDI Friend or FTDI cable.

Here’s what I found to be the (near) least number of parts and (basically) the smallest configuration for running a sketch on the MintDuino:

The (almost) minimum you need to run an Arduino sketch
The (almost) minimum you need to run an Arduino sketch

Again, I’m qualifying the statement with an “almost.”  This nearly minimum configuration above again includes a red wire, another red LED, and another 220 Ohm resistor for running the “Blink” sketch.  You could remove all of these parts and connect whatever else you wish the Arduino to do for you.  While the power LED indicator is useful to know that your project has power, I could see some situations where you wouldn’t want it – such as for a project that needs to work in the dark without drawing undue attention to itself.

Besides fiddling around yanking parts out of my MintDuino to see what would happen, I also found some interesting tidbits about building a minimum possible Arduino.  If your project is tight on space or you are tight on parts or budget, you might find some of the following useful:

I’m still very new to this whole Arduino thing, so if you notice something wrong here, please let me know so I can fix it.

My very next Arduino project is going to be something that fiddles with my television’s IR (infrared) control codes.  You can expect some definite wackiness soon…

Default Series Title
  1. Since I wanted to include a picture of the MintDuino inside and out, I couldn’t help putting a spin on this classic Groucho Marx quote. []
  2. I ended up using the Mintduino tin – and actually recycling some of its packaging into the project as well []
  3. What project am I referring to? Stay tuned… []
  4. I discuss this more below, but I don’t think you need the crystal and two capacitors for the “external clock” functions of the Arduino if all you’re doing is uploading a sketch. []

Arduino Adventures: What I learned building a MintDuino

A MintDuino
A MintDuino

My first real foray into tinkering with an Arduino began a few weeks ago with a MintDuino.  About two years ago I contemplated trying one out, but I never pulled the trigger.  This was due to a combination of decision paralysis, a very short attention span1 , and a plethora of other projects that were always vying for my2 attention.

Overall, I think this was a good place for me to start learning about Arduinos.3 The nifty thing about the assembly tutorial for the MintDuino is that it takes you slowly through the creation of an Arduino.  I learned a surprising amount from assembling this little breadboard Arduino – more so than I ever did by just making an LED blink on a regular Arduino Uno.

  • The first thing the tutorial does is show you how it converts the power from a 9 volt battery into the 5 volts that an Arduino would use.  I found this incredibly useful.  Even if I had stopped reading the tutorial at Step 7, I would have learned that with some capacitors and a “voltage regulator,” I could create a system for converting power from a 9 volt battery into something I could use in a different project.  Sure, I didn’t learn how these parts made that happen, but this was something I could put to use immediately, if I so chose.
  • The second thing the tutorial takes you through, at step 9, is adding a “crystal.”45  This wasn’t particularly useful to me – except that now I know how the Arduino is able to keep time.  While doing some ‘net research on what constitutes a bare-bones minimal Arduino, I discovered that it is possible to omit the crystal and two capacitors in favor of the chip’s internal clock.
  • The third thing I learned from this tutorial, at Step 12, is what appeared to be the bare minimum MintDuino setup required to run a program that was loaded onto the Arduino’s chip.6 Now, it’s possible to remove several more pieces and still have a working Arduino.  If you just had to have an Arduino with an absolute minimum of parts (I’ll get to why later) you could pull the red LED, the 220 Ohm resistor, the black wire going to the red LED.  The result would be a pretty minimal Arduino that didn’t have a status/power LED, but could blink a single green LED.  Remove the green LED, the red wire going to it, and the 220 Ohm resistor going to the green LED, and you have a really stripped down Arduino – that can’t do anything.  But, if you were to design your own Arduino project, you could build this minimalistic Arduino, add connections to whatever additional parts you needed, and solder it all together.
  • By the time I got to Step 17, I learned the connections to the ATmega328 necessary to program the chip with an Arduino program.7  This was interesting to me because it meant that any circuit that I wanted to design, but still have the capability of reprogramming at a later date, would have to have these connections.  However, it would probably easier to add a 28-pin socket or 28-pin ZIF socket to your project so you can remove the chip, reprogram it, and replace it without much fuss.  ((I mean, why add a bunch of wires you only need for reprogramming to a project when you can add a little socket?))

Overall, tinkering with a MintDuino taught me quite a lot about Arduinos.  Staring at an Arduino for the first time out of a box, it’s a little daunting.  There are a ton of little surface mount parts and pins and I had no idea where to start.  I had made an LED blink – but that didn’t seem to do much for me.

Having assembled a MintDuino, I already knew what a bunch of the parts already did – so I could focus on building on my knowledge from there. Having the breadboard handy meant it was easy to connect more wires and try out other sketches and configurations.  Lastly, I went back over my work from the first time I built the MintDuino and rewired it so that the little red, black and green wires didn’t have any slack.  This let me see better which wires when where – which meant I could concentrate on working with the other pins.

I mentioned earlier why I was interested in finding out the absolute minimum amount of parts necessary to operate an Arduino.  Well, more on this in the very next post…

Default Series Title
  1. Oh!  A squirrel! []
  2. Oooh!  A shiny! []
  3. I say “start” because my prior experience with Arduinos consisted of just putting shields on Arduinos and uploading sketches. []
  4. I don’t know why they call it a crystal – it just looks like a little bit of metal with two wires sticking out []
  5. I’m just kidding.  I’m guessing they’re using a quartz crystal – similar to quartz watches – as a timer/clock.  For those of you who aren’t familiar with quartz watches – they keep time by applying a little bit of electricity to a piece of quartz and counting the vibrations of the crystal. []
  6. The Arduino’s chip is called an ATmega328 []
  7. Or, in Arduino parlance, “sketch” []

Arduino Adventure Series – The Adventure Begins!

Arduinos, Arduinos, Arduinos... where to start?!
Arduinos, Arduinos, Arduinos… where to start?!

A few weeks ago I started fiddling with an Arduino in earnest.1 I’ve built things using Arduinos before, but each time all I did was slavishly follow a tutorial as it took me step by step through a process.

Just as a child memorizes the Pledge of Allegiance, committing to memory the right sounds in the right order, I had a grasp of the assembly – but not the underlying meaning.  Sure, I built a MakerBot Cupcake CNC (“Bender”), a MakerBot Thing-O-Matic (“Flexo”), an Egg-Bot, a Polargraph/PlotterBot, and an IoT Printer.  ((FYI, my MakerBot Replicator 1 is named “HedonismBot“))  However, I have only the dimmest understanding of how the things I did actually created the things I ended up building.

However, I want more – there are several ideas I would like to create using electronics.  One is a sonic screwdriver flashlight.  Another is device for … shall we say…2  interfering with television infrared codes.3

My goal for this series of posts4 is to document my triumphs and failures playing with an Arduino.  I think it’s time to get started on that next post now…

Default Series Title
  1. Photo courtesy of Arkadiusz Sikorski []
  2. Mu-ah-ha-ha!!! []
  3. Nope, not a TV-B-Gone []
  4. I know it’s ambitious to call a post the “first” post – but dammit, a man’s got to dream []

DrawBot – The Assembly, Part VII

Yesterday I accomplished a little more with my DrawBot.  Here’s what I did:

  1. Drilled holes in my project box1 for running mounting wires through the box.
  2. Drilled holes in my project box for the power cord and USB cable.
  3. I added several yards of monofilament line to each spool.  The way I have the motors mounted into the box I had to add some filament line to it on the spool.  Obviously, I had no way of knowing how much line I would need, so I just added a few feet.  Today I cut off several additional yards, tied the new section to the shorter section already attached to the spool2 , cut off the little loose ends, and rolled the spool with a finger.
  4. Found studs in the wall, put two huge screws into two studs3 for holding the box on the wall.
  5. Ran some sturdy steel wire through the box for mounting on the wall.
  6. Cut a huge sheet of cardboard out of a box we had in the garage.  I wrapped three edges of it in packing tape, so that it would remain flat and not shed little bits of cardboard paper.  The fourth edge I covered with duct tape for a sturdier hold.  This was then mounted on the wall underneath the pine box using more huge screws going through the side with the duct tape.  The purpose of this is to give the DrawBot a flat surface to draw on, rather than the textured wall.
  7. I then plugged the power cable and USB cables in and tried to fire up the Polargraph software.  Since this is all being done in a different room, I’m connecting all of this to a totally different laptop using different software.  I have an older laptop running Windows Vista that is connected to my Thing-O-Matic and Cupcake.  Now it is attached to my DrawBot as well.
  8. At this point the only physical components of the DrawBot missing are the gondola which I haven’t installed and blank paper.
  9. Unfortunately, that laptop I connected the DrawBot to is having some kind of problem communicating with the Arduino.  But, that’s another problem for another day.
Default Series Title
  1. A long pine box []
  2. Square knot []
  3. True story:  My wife heard the new electronic stud finder going all wacky from the family room.  She called back, “If it’s making that beeping noise, you’re doing something wrong.”  I replied, “Yeah, I’m just running it over my belly just to see what it will do.”  My daughter ran over in disbelief and then called back to my wife, “Mom!  Daddy’s rubbing the finder on his tummy!”  Say what you will, that damn thing is accurate. []

DrawBot – Halp!!! No – seriously, a little help?

Okay, I’m stuck.  I don’ t know what I’m doing wrong or what I need to do next.  So, I’m calling upon John Abella, Sandy Noble, and Kongorilla for your help.  :)

Here’s where I am:

  • The burning!
    • At last attempt, I hooked up some small steppers to the Adafruit motor shield, put the shield on my Arduino Uno, hooked up the USB cable and the 9v power adapter.
    • I heard a small pop and smelled warm electronics.1
  • After the burning
    • I can upload and run the Arduino basic blink sketch.  I can alter this to change the blinking pattern.
    • I can upload and run the Arduino sketches to operate a microservo.  I can alter this to change the microservo’s behavior.
    • I can upload the Adafruit sketches for steppers – but I can’t make the steppers move.
    • I can upload the Polargraph sketch – but I can’t make the steppers do anything.

Now, I’ve got tons of questions for you:

  1. Did I ruin my Arduino?  I can still run the blink and microservo sketches.
  2. Did I ruin my motor shield?  How can I tell if it is operational?  When I connect the power to the Arduino and have the little jumper in place, the green LED is lit up.
  3. What am I doing wrong?
  4. What should I try next?
  5. How should I diagnose a problem?
Default Series Title
  1. Now I’ve got a cold and couldn’t smell anything if I wanted []

DrawBot – The Assembly, Part II

Now that all the parts have arrived, I’ve finished soldering the Adafruit Motor Shield, it’s time to figure out what the hell I’m doing.

  1. The Parts
    1. 9 VDC 1000mA regulated switching power adapter – UL listed 
    2. Stepper motor – 200 steps/rev, 12V 350mA
    3. Micro servo
    4. Arduino Uno R3 (Atmega328 – assembled)
    5. Adafruit Motor/Stepper/Servo Shield for Arduino Kit v1.0
  2. Assembly
    1. Adafruit soldering and assembly instructions for the Adafruit Motor Shield
      1. Hint:  Don’t try to put the L293D into the 16-pin sockets before you solder the socket into place.
      2. Hint:  While preparing to solder the header pins into the motor shield, I found that the motor shield would not sit flat on the Arduino Uno because the leads from the motor shield’s reset button were in the way.  I crimped the leads slightly and then motor shield sat flat.
    2. Download and read the Polargraph Instructions
      1. Polargraph build instructions on Instructables
      2. Latest Polargraph Build Instructions circa 11/28/2011
      3. Polargraph Instructions circa 10/20/2010
      4. Polargraph Instructions circa 10/9/2010
    3. Install the Processing environment
      1. Processing environment download page
      2. It’s necessary to run the Polargraph controller software
    4. Update the Arduino Uno’s firmware
      1. Go to Arduino.cc and download the latest software (Version 1.0 is 85.9MB for Windows)
        1. The latest version of Sandy Noble’s Polargraph software requires the Arduino 1.0 firmware
      2. Install the Arduino drivers123
        1. Plug in your board and wait for Windows to begin it’s driver installation process.  After a few moments, the process will fail, despite its best efforts
        2. Click on the Start Menu, and open up the Control Panel.
        3. While in the Control Panel, navigate to System and Security. Next, click on System. Once the System window is up, open the Device Manager.
        4. Look under Ports (COM & LPT). Â You should see an open port named “Arduino UNO (COMxx)”
        5. Right click on the “Arduino UNO (COmxx)” port and choose the “Update Driver Software” option.
        6. Next, choose the “Browse my computer for Driver software” option.
        7. Finally, navigate to and select the Uno’s driver file, named “ArduinoUNO.inf”, located in the “Drivers” folder of the Arduino Software download (not the “FTDI USB Drivers” sub-directory).
        8. Windows will finish up the driver installation from there.
      3. OMG!  I just made an LED blink!
        1. I followed up this incredible success by adjusting the amount of time the LED spent off and on.  It was pretty cool. 4
    5. Download Sandy Noble’s Polargraph Controller v2.0
      1. Download the Windows binaries or
      2. Download the source code and compile them for yourself
    6. Download the AccelStepper Arduino Library
      1. Direct download
    7. Download the Adafruit Motor Shield Arduino Library
      1. Direct download
      2. When I tried to drop this library into the “arduino-1.0/libraries/” subfolder, the Arduino IDE freaked out.  I had to rename the library sub-folder from “adafruit-Adafruit-Motor-Shield-library-dd30da7” to “AdafruitMotorShieldLibrary” since the IDE would not recognize a library with spaces, dashes, etc.
    8. Um… now what?
      1. As I’ve mentioned, I really have no clue what I’m doing here.  I’m mostly just banged away at the motor shield with a hot soldering iron, jammed it onto an Arduino…  and don’t know what to do next!  Halp?
Default Series Title
  1. This was written for Windows XP, Vista, and 7, there’s also guides for Mac OS X and Linux []
  2. I’ve just copied and pasted this info here for completeness. []
  3. MacOSX []
  4. Arduinos can be used for MORE than this, you say?!  Tell me more! []

DrawBot – The Software, Part I (and an existential conversation)

This morning the USPS website told me that the remaining parts from Adafruit left Oakland yesterday.  As of this moment, they should be sitting at my local Post Office… but not go out for delivery until tomorrow as today is a postal holiday.1  In any case, I just realized that a DrawBot based on Sandy Noble’s Polargraph will require some basic knowledge of Processing.  I guess I better get learning!

Default Series Title
    • My current self [CS] would like to point out to my past self [PS] that if you had only placed the order one day earlier, you’d probably have had all the parts this weekend to work on.  Heck you could even have been done by now.
    • PS would counter, first, that I couldn’t have ordered all of the parts necessary without having first sought some input from people who have done this before me.  And, second…
    • CS would interrupt saying, “Hey PS, what happened to you, man?  You used to be so cool!  What you were afraid of?  Burning a chip or some damn thing?  That’s how you learn!  Buy a helmet!  In any case, people have built these things out of complete junk before!  Where is your sense of adventure?!”
    • PS would remind CS it is not polite to interrupt, “And, secondly, as I was saying, there’s no point in not making use of the various resources available to one.  It would be brash and foolhardy to simply jump in not knowing what the heck you/we were doing.  And, thirdly, in the fullness of time, I think you’ll come to understand that a few day’s delay in assembling a robot is but a blink of the eye in comparison to the time you’ll spend assembling, tuning, and operating said robot.”
    • CS, “Really?  ‘Fullness of time’?  Seriously, man, who talks like that?  I suppose the delay is not such a big deal, but the momentum one has when tackling a project is not an inconsequential concern.  I don’t know about you, but I have the attention span of a gnat.  <Oh!  Shiny!>  It is entirely possible that by the time the final parts arrive, in less than 24 hours, I may have moved on to some new project.”
    • PS, “Momentum, schmomentum.  You might move on to a new project?  Do you realize that you’ve got 16 posts on your site yammering on about this project – when all you have so far is one half-assembled circuit board?  No, you’re going to have to do better than that.  Besides, if you had simply moved to Brooklyn already like I told you, none of this would have been an issue.  You could have just walked over to Adafruit and picked up all the parts you required.”
    • CS, “Move to Brooklyn?  That’s your answer?  I live in the Bay Area, as in ‘California.’  Chances are work is going to have me driving down to Silicon Valley at some point this week anyhow.  And you want me to move to Brooklyn over $100 in parts?”
    • PS, “Well, it looks like you just admitted that this project wasn’t important enough for you to conjure up an excuse to drive to San Jose or Palo Alto.  You didn’t even try to visit a Radio Shack or a Fry’s.  Hell, the time you’ve spent griping about the delays you’ve caused yourself would have been enough for you to drive down to an electronics store and pick up the parts.”
    • CS, “Yeah, at a 50% markup?  Right.  Good plan!”
    • PS, “Okay, which is it?  Did you want the cheapest result or the fastest?  Having chosen an economical middle ground, it seems somewhat silly to blame me that the parts didn’t arrive as fast as fast can be.”
    • CS, “Shut up.”
    • PS, “No, you shut up.”

    []