Why?

Ramblings in Rapid-Prototyping, Physical Computing and random creativity, featuring Arduino, Raspberry Pi and related technologies. Most of these projects are done for fun, on short sprints and near-zero budget, and they frequently share a remarkable lack of refinement.

Monday, September 7, 2015

A Telepresence Robot for the Grandparents



My wife and I had a baby recently, and my parents are oh-so eager to meet her. Since they are halfway around the world, though, they'll have to wait until we visit. In the meantime, I made a budget telepresence robot, so they can watch the baby while she's on her swing from any angle they want ( but from a hamster's point of view!). For telepresence, a videochat application running on the phone will technically do, but for the moment, it'll broadcast one-way using IPWebcam

While not as elaborate as OSCAR, by Google's Gus Class, my project was put together in a couple of days and cost next to nothing.

I used:

  1. The Arduino and Bluetooth module previously in the quadruped
  2. The old Android phone previously in the Headshot
  3. Python + Flask and some JavaScript for the web server application
  4. One El-Cheapo robot chassis off ebay.
  5. A single L293D motor driver.
Crude and basic, but it works.




The Robot in action

A couple of days before this post, Danish astronaut Andreas Mogensen controlled a robot from Low Earth Orbit from the ISS (altitude of 400 km) . It gave me certain satisfaction to see my robot move in Australia, while being controlled by my brother in South America! 

An Elaborate Joke

A while ago I was tempted by an awesome looking deal by Humble Bundle, that included Multimedia Fusion 2. To try it, I made a horribly crude game only intended as a joke to my group of friends . To my disappointment, however, the catch was that that version of the software only exports to the deprecated "Java Applet" format, and to export to HTML5, you had to buy the $200+ Fusion 2.5.

Luckily, I found the awesome GDevelop platform, that allows game programming through an intuitive GUI that saves you having to learn specific JavaScript conventions and syntax. I made this game in a weekend including a main screen, introduction and ending, using some of the included textures and sprites.

The game itself consists of a a short, one minute platform level, with humor that would make no sense to those outside my group of friends. Besides, it is rather inappropriate and uses stuff I grabbed of the web with no regard to copyright or credit, hence I'm not making it public. Here's two screenshots, though:



Sunday, August 16, 2015

My Ideal Bunkbed

I spent a moment the other morning drafting my ideal bunk bed. Ideal in the sense that some of the places where bunks are used could benefit from the suggested transformability, namely holiday homes and hostels.

  • A hostel could benefit from being able to more easily adjust the proportion of dorms vs double rooms according to demand
  • Holiday homes can typically be colonized by widely varying populations, ranging from scores of younger children to all couples. And couples do not like getting the bunks.

I have no idea if this has been done before, and it probably has, but it took me less to make this than it would have taken me to look for similar designs. If building myself, I'd go nautical and use rope and pulleys, but I'll let you imagine the specific mechanism.


Thursday, August 13, 2015

HeadShot



"...if I build a dresser, that's very useful but it doesn't get a lot of views, but one thing I've learned is that useless crap on Youtube, gets a lot of views" - Matthias Wandel

A while ago the carpenter at work was throwing out pile of plywood sheet offcuts. "It's good ply," he said, "but I can't keep storing offcuts, I'm out of space". Hence, I rescued as much as I could, and so far I've made quite a few things with it, mostly (functional) furniture. But after the robot arm project, I wanted to learn more about Computer Vision, and had seen a few Nerf and paintball sentry-gun projects online (Google'em). While most of those projects aim at shooting others (pun intended), shooting something tasty at self seemed like an interesting (and profoundly futile) endeavor

For this project, I used a RasPi 2 with OpenCV (Python bindings) and the ServoBlaster library.
The hardware is mostly, as you can imagine, salvaged plywood! Also, the winch servo from the StoveDJ , and normal servos from the now dismantled robot arm. An old droid phone with IPwebcam was the video source, since I didn't have a USB webcam or Pi camera module at hand, nor cared to buy any. 



Wednesday, April 22, 2015

QWOP bot

While making the robot arm, an idea crossed my mind. The more I learned about robotics, the clearer it became that autonomous walking systems are still a few years away from being a consumer reality. It is an extremely complex undertaking to a robot that is able to navigate uneven terrain, make sense of the surface, avoid obstacles and maintain balance, among other things.

So it crossed my mind: If humans have been able to use "analog" machinery to get around for a while, but only now we are able to make very timid autonomous cars or aircraft, why haven't we tried to make manually controlled walking robots, able to navigate terrain that wheeled vehicles cannot? In particular, I thought about a wheelchair case, in which a set of robotic legs could be handy. In theory, a skilled used could climb stairs or go over obstructions with the legs, to then resume the more efficient wheeled motion. In part I was inspired by playing QWOP, although good judgement suggested to avoid even trying to manually balance on two legs.

So I went on to make a four legged (a.k.a.quadruped) robot with some spare balsa wood from the robot arm project, and the cheapest servos I could get on Ebay.



Robot in Seating Position and Video

A powerful lesson awaited me: counterfeit of brands is widespread among some cheap items available on Ebay. Initially I ordered two TowerPro SG90 9 gram microservos, to implement a single leg model.  I developed a simple Python program and was able to control the two individual joints with a single finger each. That encouraged me to order more servos to complete four legs, but vendors offered servos as single units or in packs of 5 or 10. Because I needed 6 more, I ordered 5 from one vendor and a single more from another vendor. Supposedly the 8 servos are Towerpro SG90, but all three orders were noticeably different (all with a brand sticker though) in performance, quality, attachments, etc.

Note the stickers are different. Which one is counterfeit? Probably both.

Anyway, the servos moved, some nicely, others not so much, but moved, so I carried on making the robot. After sorting some electrical issues, I was able to make the thing walk, albeit very slowly, just by using 16 letters on the keyboard, two for each finger. Specifically, a Python script was used to interface with the Arduino over a Serial link. Learning to move the robot felt, as I had anticipated, like learning how to play a musical instrument. With eight simultaneous joints being controlled, the learning curve is quite slow, like learning how to play piano. But I would not be surprised that, with enough training, some people could make these things not walk but run.

Robot standing up.

Eventually I made the robot wireless, controlled via Bluetooth, which made playing with it much more fun.



The "Arduino" and the Bluetooth module at the back.

poV.R.ty

I ordered a pair of 45mm lenses from ebay for $2 and made a holder for them from an old box.

I already had used the Cardboard App on my phone just crossing my eyes (I got quite good at it in the 90's, when autostereograms were popular), but wanted to see if the lenses made the experience more immersive by stretching the field of vision. It turned out it does, although these lenses are not bi-convex as recommended, so the results are less than optimal. Also, the pixels in the screen become very noticeable (the screen in my phone has only average resolution and is badly cracked), so I didn't bother building the rest of the headset. 

Still, had fun playing with this.

poVRty: Probably the crudest Cardboard setup yet.

Wednesday, April 15, 2015

Robotics - A formal approach

Eventually, on 2014, I had the opportunity to take a Master's level elective Robotics class. Being such a fan of DIY, it is hard to admit that the drier, maths-heavy parts of robotics (e.g. the kinematics, the dynamics) are hardly the sort of thing that you would teach yourself over an internet tutorial (possible, but unlikely). The class's lectures covered the theoretical aspects that hobbyists would rather avoid, but it also involved the ambitious team project of building a six degree-of-freedom robot arm that would autonomously perform an architecture-related task. While us engineers would see the construction of the robot, architecture students would come up with the specific task for the robot to perform. 

I have to say that this was my favorite subject of my whole Master's degree, due to the abundant (and much wanted) tinkering it involved.

The robot we built performed quite well in comparison to the rest of the class. It was built using inexpensive Adafruit analog feedback servos , a servo shield (that we burned and eventually did without) and an Arduino Due. Our team 3D printed the body, while other teams opted for laser-cut acrylic or wood. For the interface, I originally developed a Python GUI using tkinter, just to make one all over again in Processing, because it was the programming language that the architecture kids were familiar with.

The amount of debugging necessary to get something like this running for the first time was, needless to say, colossal. And that is exactly why it was such a powerful learning experience.

The project originally involved using a Microsoft Kinect to provide visual feedback so a central computer could coordinate two arms (from different teams, with completely different architectures) to build a biologically inspired structure. 

Our 6 DOF robot arm on its calibration grid.