Electro-magic fields


Tamapotchi note #5

I must have been eight years old. My big brother turned 10 and my father gave him an electro hobby kit for his birthday. It had a dozen projects in it, from a simple circuit with just a battery and a lightbulb, to building your very own electric motor. Surely it had been wise to start with the simple circuit, learning the very basics of electricity step-by-step, how to read schematics and how not to short-circuit your dear projects. But of course the kit boasted the cool electric motor on its box, complemented by proud boy and matching father. Yes, in retrospect I fully understand why my dad picked this box for his son. Back then, I knew it was a mistake.

My brother turned out well eventually, but as a child he was quite notoriously short-tempered. Speaking from my newly acquired métier of electronics: his personal circuit lacked a resistor. Of course I knew he’d try to build the electric motor from the get-go, bypassing the easier, boring projects in pursuit of that ultimate goal. But as I have experienced in the past few days, lack of resistance causes sensitive things to fry when tensions get high. In my case it cost me a pair of 2-Euro temperature sensors. My brother lost his patience, his faith, then his temper. Lastly, it cost him his electro hobby kit. Luckily I was there to pick up the pieces. The pieces of the electric motor, that is.

One of the perks of having an older brother is that you can observe his bold ventures and failures, and learn from it from a safe distance. After my brother had locked himself in his room and I had collected all pieces of the electric motor from the several corners it got thrown into, I had also gathered it would be wise to approach the electric motor issue from a different angle. I would start from the very beginning and gradually learn from there, taking this electronic hurdle one step at the time. After completing the simple circuit with battery and bulb in 10 minutes, I felt I had mustered enough skill, knowledge and experience to take on the electric motor project. How much harder could that be?

The past week the electric motor project crossed my mind a few times, as I was venturing into the long-forgotten realms of electronics again. This time, I was not building a electric motor from a hobby kit, I was building a smart, connected flower pot to populate the Internet of Things. As you might have read in my previous Tamapotchi posts, I had done some serious research and bought a smart Arduino-based development board with on-board BLE. A mere two weeks ago, I wouldn’t have had any clue what this last sentence meant. Now, I know it means that it takes resistors not to fry my sensors and patience not to lose my sanity.

Because I had to wait 5 long days before my development board would be posted, shipped and delivered, I had time to properly prepare. I installed the Arduino IDE on my laptop and the BLE controller app on my phone. I read all I could understand about Bluetooth Low Energy, posted questions on forums, watched countless videos of Arduino projects and found some tutorials that would get me going once I had the hardware. Then I got the package. It was a lot smaller than I had expected for the money.

The Blend Micro board is tiny. And that is a good thing, because we are aiming at a prototype that is both functional and beautiful. Form is as important as function and we don’t want to make compromises on the form-part to fit in a clunky board. All sensors were there too, along with some wires and a bread board to tie it all together. And resistors. Color-coded resistors. That color-code might have been a good idea a century ago, I think we have better ways now to communicate a resistor value. Like typography (but maybe that’s just the graphic designer in me).

I didn’t get the getting-started-tutorial going as quickly as I had hoped, because I found out I couldn’t use the software libraries I needed for my board in the latest version of the Arduino IDE, which I obviously had installed because it had a much cooler logo than the older ones. So I grudgingly installed an old version and manually put the library files into the appropriate folders. I was beginning to feel like a real software engineer now. Then it turned out the older version of the Arduino IDE also required my system to run an old Java Runtime Environment. I knew that would probably get me into trouble running other software, so I was relieved to find a link to Codebender in the tutorial as an alternative to the Arduino IDE. Codebender is a web application that lets you write code in a way similar to CodePen or jsFiddle, and also provides a score of propriatary libraries for all kinds of development boards and components. And it lets you push your code to your board. Works like a charm; after I signed up for an account I had the tutorial file up and running on my board in minutes. It blinked the on-board LED and I got to bed a happy man.

Next I took the project one step further every day. First I tried to extend the tutorial project by letting an external LED blink. When I got that to work I added another LED and let them blink successively. Then I found out I could write values to a serial monitor for debugging. So I connected a light sensor and monitored it’s value on my laptop. My girlfriend got slightly annoyed by me turning the lights up and down the entire evening, but I again was a happy man. Now it was just a small step adding a temperature sensor and letting a green LED light up while light and temperature were within a certain range, and a red LED when either one of them exceeded the threshold values. It worked. For a minute. Then I apparently fried the temperature sensor. Wrong resistor, damn those color codes. But it had worked!

Now I’m in the process of mixing the Bluetooth into the prototype. It will take me some more time to get beyond the very basics of letting a LED light up when I send a message from my phone. I need to learn more about the protocol and the hardwares low-energy characteristics. Or I might just skip that part if I think I can proceed building the prototype based on my current skill, knowledge and experience.

As with the electric motor project years ago, I took on the challenge of building a working electronics prototype without any knowledge or understanding of Volts, Amperes and Ohms. Because it is fun and exciting doing things you don’t fully grasp. And because in the end, I got the motor running. There’s true magic in getting a LED blinking at your command after numerous tries. Understanding exactly why it is blinking would kill the magic. And it would stop me being the magician.

Like what you read? Give Ivo Domburg a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.