All posts by Stephen Darlington

Otto: Assembly

With all the pieces printed or purchased, it was time to assemble Otto.

Since I’d already tested the Arduino and enlarged the holes for the eyes and stepper motors, the process of putting it together was actually fairly uneventful.

Putting Otto together

Because of the small size, some parts were very fiddly but it wasn’t hard per se. Kudos to the people who put the instructions together!

I came across three minor problems.

First, I pushed one of the screws in too far, so that it looks as though it has a small horn. I almost did the same thing on the other side so it would, at least, look symmetrical. It’s not a big deal but I know it’s there! It’s not worth re-printing the head for so I’ll have to live with it.

Second, the battery pack hasn’t arrived yet so I had to run Otto only when connected to power via USB – a computer works but so did the power brick from our Amazon Fire tablet.

Finally, as I speculated, I think I ordered an incorrect part. Fortunately it was only the buzzer so it isn’t critical. I’ll probably try to fix this soon.

(The buzzer I have didn’t have polarity labels – which I’m not sure is important – and wouldn’t stay put on the end of the cables – which I know is a problem!)

With the robot assembled and its head snapped into place, the next thing to try was powering it up and seeing it dance and avoid obstacles.

Had I not played with the electronics separately I probably would have freaked out and assumed it wasn’t working. As I found, it takes a few seconds to download the software and reboot and, unlike before, I couldn’t see any of the lights flashing as they were all now inside Otto.

My patience paid off and he started dancing on the first try. The kids, who had lost interest during some of the more intricate fiddling around that was required earlier on, were suddenly excited again. Actually, make that kids of all ages were excited!

I was impressed that it worked on the first try. The dancing is pretty cool. At one stage I’m its routine it tries to stand on tip-toes and falls over every time. I suspect it would have to be very finely tuned for that ever to work. One of his legs could do with a little calibrating but it works well enough.

Next I uploaded the “obstacle avoidance” program. I found this a little less reliable than the dancing, but it did walk, then stop and tap its foot when you wave your hand in front of its eyes. Looking at the code, I wonder the buzzer adds something?

Overall, it was a great little project. “It works” is a pretty boring conclusion, but it’s true. I expected far more to go wrong. I’m happy that it didn’t.

Otto: Electronics

The first stage of building a dancing, obstacle avoiding robot was to build the body and legs using my 3D printer. The second was to test the electronics before assembly. This would prove to be more eventful than the printing.

I was least sure about all the electronics. They components arrived and… they sure looked okay. I didn’t think the buzzer looked quite right — it looked too big, but I figured that it even if a little lose it should make something approaching a buzzing noise.

The computer itself arrived poorly packaged, with a bunch of the pins bent. I managed to right them without breaking anything.

Arduino Nano, IO Shield, obstacle detection (eyes), motors

And talking of breaking things: I plugged in the Arduino and… nothing. Eventually I realised that I needed to install a Serial-USB device driver. The Otto download came with a CH341 (as it’s creatively called) driver so I installed it, rebooted and… well, when you see text scrolling up the screen when you boot your Mac, either you accidentally jabbed command-V or something bad is happening. In this case, the latter.

Anyway, after a fair degree of panic and dread at the idea of finding and installing another kernel driver from a random website, I found one that seemed to work.

I tried the Arduino before bundling it into the plastic body just to make sure I had the fundamentals down. I plugged in the IO Shield and one of the motors. I press “Upload” in the Arduino app and… seemingly nothing at first. Then blinking. Then the motor started whirring rhythmically.

I picked out a few other example apps and tried those. The best one, at least in the sense that it proved that I was doing the right thing, just blinked one of the boards LEDs. It looked like it worked, so I changed the delay from one to two seconds and saw that that worked too.

Nice.

Now all the bit are made and shown to be more or less Known Good, it’s time to assemble Otto.

Otto: Printing

The first stage of building a dancing, obstacle avoiding robot was to build the body and legs using my 3D printer.

Surprisingly, for someone who has been playing around with computers since I was eleven but only had a 3D printer for a month, I was much more worried about the electronics than the actual making stuff.

So confident, in fact, that initially I placed all six pieces into one print job.

Then I chickened out. I switched to four prints: the body, the head, the feet and the legs, in that order.

3D printed head, body and legs.

In one sense, I need not have worried. All the pieces came out just fine, though it took longer than I anticipated. The body, I naively guessed, would take two, maybe three, hours. Nope. Nearly eight!

Suitably chastened, I allowed ample time for the others.

The head and the body connected together with a satisfying snap. Things looked a little worse when I tried to place the electronics inside. The IO Shield fit in so snugly that I was worried that I wouldn’t be able to get it back out. The “eyes” and the motors didn’t quite fit in at all. The apertures were just slightly too small.

I worried how much surgery would be required, but in the end a little scraping around the edges with a sharp knife did the trick.

Overall: fairly straight forward. Next: the electronics.

New project: Otto

My wife got me a 3D printer for my birthday/Christmas. I’ve printed a few little things since then, but I’ve been itching for a bit of a project. I didn’t want anything too ambitious but, clearly, there’s no point in doing something that can’t fail.

After much searching, I decided upon Otto, a walking, dancing, obstacle avoiding robot.

In this post I’ll talk about how I prepared for the project and my thoughts on its likely success (or otherwise).

The 3D print is bigger than anything I’ve done before but not necessarily any more complex.

3D Printing Otto

The part of the project that I have the least experience with is the electronics. I’ve never really been a “hardware” person, though I built a 68000-based computer while at university. Fortunately Otto uses an off-the-shelf embedded computer called an Arduino so my terrible soldering skills won’t be tested.

What is complex for someone that doesn’t live and breath it, is the Arduino ecosystem. There are a number of different boards (varying both in size and features) and it’s open source so there are quite a few compatible variants available too. I picked a cheap compatible version. I do wonder if this will cause problems further down the line.

The “nano” has few built-in ports, so you need an I/O “shield” that plugs into the Arduino’s pins. That was nearly as expensive as the actual computer!

Finding small volumes of the other components proved a little tricky. Once you factor in delivery, it became almost as cheap to order ten servo motors rather than the four that I really needed. I’m sure I’ll find something to do with the others!

Anyway, I ordered all the bits and pieces that I think I need. It’s entirely possible that some of them are wrong. We’ll see.

Stay tuned for what happens when the components arrive.

Reading 2016

Coming into the beginning of last year I decided I would try to read more books. I do most of my reading on my commute and the previous couple of years I had not had to regularly go to an office, so I managed few books and no novels at all.

While my total of twelve books may not set the world on fire, I managed to read some interesting ones so I thought it might be worth writing a few words on each one.

How to Fail at Almost Everything and Still Win Big: Kind of the Story of My Life,” Scott Adams

It’s a good thing that I have the ability to compartmentalise things. Some of his recent writing about Trump has not been to my taste but this book is interesting. I’m not big on “self help” books but this one espouses a philosophy I can vaguely get behind. And Adams’ writing is always engaging.

The Simpsons and Their Mathematical Secrets,” Simon Singh

Not one of Singh’s best but still interesting. As a bunch of short mathematical stories tied together by episodes of the Simpsons (and a few from Futurama), it may be better as a hook to get people interested in science and maths than as a structure. I don’t regret reading it but I will concede that it took me a while to get through (with a few pauses while I read other books).

I, Partridge: We Need to Talk About Alan,” Alan Partridge

Most books that are TV or movie tie-ins are terrible. I only got this one because it was on sale for £1 and, even then, it took me over a year to get around to reading. I’m happy to report that I was wrong. It’s surprisingly well written, you absolutely get the “voice” of The Alan, and there are some real laugh out loud moments. The sound-track is also spot-on.

The Kingdom by the Sea,” Paul Theroux

Theroux toured the UK in 1982 when it was the “sick man of Europe,” Margaret Thatcher was just starting out and the Falklands conflict was on-going. It made an interesting contrast with 2016. As ever, it was surprising how much had changed and how much stays the same.

I Think You’ll Find it’s a Bit More Complicated Than That,” Ben Goldacre

Like Singh’s, this is not Goldacre’s best book but, as a collection of essays, there’s still a lot of good stuff.

The Language Instinct: The New Science of Language and Mind,” Steven Pinker

Where language comes from, whether it’s biology or nurture or both, is clearly far from a solved problem but this is a fascinating discussion. Accessible for a layman (like me) but quite detailed.

It’s especially interesting right now as my two year old gets increasingly expressive.

And Another Thing…,” Eoin Colfer

I wrote a full blog about this. In short: it’s really hard to follow Douglas Adams. It’s not that Colfer did a bad job, more that Adams was an impossible act to follow.

Ready Player One,” Ernest Cline

I heard lots of good things about this and then I learned they were making a movie. I knew a had to read it before I saw the film.

I didn’t get into gaming culture as much as some, so I may have missed some of the references, but what’s there brings back some nostalgia and it’s mixed with a decent story and mostly believable characters.

How to win friends and influence people,” Dale Carnegie

I spent a lot of time ridiculing this book, mostly for the title if I’m honest – it sounds smarmy.

Then I read it. And, maybe I was wrong.

Like the Pinker book, it’s also fascinating to watch my kids and see the bits they understand purely instinctively. My son, at five, is already better at this stuff than I’ve ever been.

The Girl with the Dragon Tattoo,” Stieg Larsson

I finished another book, got stranded on the Tube and, lacking anything else to read, started this. I’d seen the movie (both versions) and still couldn’t remember the end.

The writing is not great but it’s still a bit of a page-turner.

The Bug,” Ellen Ullman

Not as good as I wanted it to be. I think, perhaps, I’d have enjoyed it more if I weren’t a programmer. (I can’t really say much more without giving away some of the plot. And I’m not saying you shouldn’t read it.)

Having said that, it did encourage me to write my first Apple TV app so it wasn’t for nothing.

Inside the Machine,” Jon Stokes

I remember enjoying the articles about CPU design on Ars Technica that this book is based on. I added it to my Amazon wish list ages ago… and then it went out of print. Last year I found it on Safari Books Online.

The processors it talks about are pretty dated now – the newest are Intel’s Core and IBMs PPC 970 – but what’s important in many ways is the progression from early chips, so it stands up well. At times it feels that Stokes is trying a little too hard to write an academic text book, but I’ve not seen any books that are quite so accessible and detailed.

Brexit: What the Hell Happens Now?” Ian Dunt

What a depressing year 2016 has been, and Brexit has been a big part of that. If it’s going to be a fixture in our lives for the next few years I figured it was probably a good thing to understand it.

What he writes is pretty convincing, well structured and approachable. Kind of like the exact opposite of the current governments approach to it.

Write to your MP about Brexit!

I’m sick of last years referendum on our membership of the EU being used to justify… pretty much anything. And any criticism is met with “you have to respect the will of the people.”

Well, I’m a person and I don’t think my will is being respected by many politicians and much of the media. The result of the referendum doesn’t say that people are happy with a so-called Hard Brexit, dismantling the NHS or using EU citizens as negotiation pawns.

I don’t write to my MP very often but, especially because of our current lack of an effective opposition, this is the ideal time. My MP said “Now we need to influence best Brexit we can.” I agree, but uncritically voting for Article 50 and the governments haphazard approach isn’t it.

My wife has put together the above graphic. Please feel free to share on Facebook, Twitter, MySpace, Friendster, whatever social media you use. And if you’re willing to mail an actual postcard, please let me know — we have some that we’re willing to share.

February 12: contact form removed due to spam. Feel free to contact me on Twitter