Having trouble reading this email? View it on your browser.

MAKE Newsletter

December 9, 2010

The Make It Last Build Series Newsletter, Build #2, Dispatch #4

Greetings! Welcome to the fourth newsletter for the Robot Plant Build. Things are starting to pick up in the contest, with people posting sketches of their ideas, brainstorming how to implement different behaviors (there's at least one carnivorous version in the works!), and working on resolving technical questions. This week, we'll build a mechanical flower to set atop our plant stalk, and take a look at how capacitive sensing works.

See full details on the Make It Last Build Series, this robot plant contest, and a rundown of prizes, including a $200 gift card and copies of Make: Electronics on the contest landing page.

Cheers,
Matt and Gareth

back to top

Building a Flower

mil_flower_mounted.jpg

This week, we're completing the mechanical portion of the robot plant build, by assembling a paper flower to sit atop the tape measure spine. Next week, we will complete the build by mounting the flower, hooking up the touch sensor, and programming it all to bloom at just the right time! See the blog posting with the instructions for building the papercraft flower.

robotplant_v2.gif

[MAKE illustrator Damien Scogin's rendering of our robotic plant design]

back to top

Community Happenings

mil_schazamp_robot_plant.jpg

Things are starting to pick up in the community. First off, we're starting to see some cool project Pictured above is Schazamp's concept drawing for his robotic plant. I like the idea of using solar cells to collect energy to allow the plant to bloom!

Over on the Forum, HandyManEric is brainstorming methods to make a fly detector, as part of a carnivorous plant idea. Concerned that a capacitive sensor might not be up to the job, he is experimenting with using an optical mouse to detect them crawling across a surface. It's certainly an interesting idea, and the discussion is ongoing, so if you have ideas, be sure to share them!

Finally, there were a few technical questions related to getting the PIC environment going. Leeedyut (who is smarter than their handle suggests) was having trouble compiling the example project, and found out a tutorial to help them out. It turns out that the builds work fine if you installed all of the Microchip tools in their default places on a 32-bit system, but might not be able to find some of the compiler files otherwise. The solution is to make a new project file on your computer, and import the main.c file from the example one.

back to top

Tech Note: Touch Sensing

mil_touch_sensing.jpg

Touch sensing can be a fun way to add an input to your project. Rather than use a mechanical switch, which works by shorting an input pin to ground, we can instead make a system that works by detecting the water in humans. There are a couple of different ways to do this (capacitive, resistive, RF), however the easiest and most reliable is usually by sensing capacitance.

This might sound harder than it actually is. The basic idea is that, compared to air, water has a pretty high "relative permittivity," which (among other things) is a measure of how much electric charge can be stored in it. This means that if we make a capacitor out of a finger, it will be able to store more change, and therefore have a higher capacitance value, than if we took the finger out and replaced it with air. This might sound complicated, but it isn't really -- any time there are two metal conductors near one another, they have some capacitance, so we can make a simple capacitor just by sticking two wires next to each other. In fact, if you've got a multimeter than can measure capacitance, you can try this out. Plug the test leads into the multimeter, lay them out next to each other (close enough so that the insulation touches), then put the multimeter into capacitive measurement mode. The meter should read almost no capacitance (my Extech meter measured .001nF). Now, stick your finger over the two leads. If your meter is sensitive enough, it should detect a change. I got around .004nF with just one finger stuck over the two. If you don't see a change, try moving the wires closer together. This isn't a very efficient way to make a capacitor, and everything needs to be close together for it to work. Ok, so that's what we are trying to measure, but how can we do it with our microcontroller?

It turns out that the PIC microcontroller that we're using has a built-in charge time measurement unit (CTMU), which is a special device designed specifically for measuring small amounts of capacitance easily. It works by adding a fixed amount of current to a capacitor for a specific amount of time, then measures the resulting voltage to determine the capacitance. This works because the equation that relates voltage (V), charge (Q), and capacitance (C) is:

wikipedia_capacitor_equation.png

which means that if we always put a fixed amount of charge into a circuit, we can determine the capacitance by dividing the charge by the measured voltage. We don't even have to be really concerned about what unit everything is in, because we don't really care about the actual capacitance, we just want to know when a finger makes it go up. So, if we take a measurement of the capacitance when the system is turned on, then we can just watch to see if it changes significantly, and register that as a touch! Next week, we'll look at adding calibration to improve our touch sensor routine.

Above photo by The Comic Shop

back to top

Applied Touch Sensing: The Spoon Organ

spoon_organ_thumb.jpg

I was so excited when I figured out how the touch sensor circuit worked, that I immediately wanted to make an instrument out of it! I was on the road at the time, but had a breadboard prototype of the plant brains with me, so I grabbed some shielded wire and created the Spoon Organ. The resulting project is pretty "hacky," but worked well enough to display at a Make: Tokyo Meeting. You can view a video of a musician playing with it here, or build one yourself using the schematic and source code from my personal website.

back to top

Microchip Discount Code

Want to pick up a PIC programmer or development kit? As part of the contest, Microchip is offering a 20% discount on the following development tools:

PICkit3
PICkit3 Debug Express
ICD3 In-Circuit Debugger
XLP 16-bit Development Board
F1 Evaluation Platform
F1 Evaluation Kit

If you've been thinking about getting started with PIC programming, this could be a great opportunity to get a good deal on a programmer. To request a discount code, send an email to makeitlast@makezine.com.

back to top