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

MAKE Newsletter

November 30, 2010

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

Greetings! This is the second newsletter for the Robot Plant build. This week, we'll build a set of brains for our plant, and start thinking about what our plant should look like.

The official contest rules can be found on the contest landing page, along with everything else about the contest. Check out the awesome prizes, including a $200 pre-paid gift card and copies of our best-selling Make: Electronics book! We'd love to hear from you, so don't hesitate to contact Matt or Gareth with any questions or concerns you might have. We've also set up a Forum topic for this contest, so be sure to stop by and introduce yourself!

Cheers,
Matt and Gareth

back to top

Challenge: Design a Plant!

sunwalker_bot.jpg

What do you think of when you hear the phrase 'robotic plant?" Do you think of a hulking, carnivorous metal beast, or perhaps a delicate machine that gently blooms in response to electromagnetic fluctuations? Or perhaps a Frankensteinian combination of the two? Should it slowly climb up a wall, or turn its face to you and sing when you walk by?

We'd love to see what you are thinking about, so let's have a quick challenge! The first five people to share their idea for a robot plant will win a cool goodie pack, containing the following items:

  • MCP1640 Single Cell Boost Converter for Energizer® MAX AlkalineAAAA (power your next project using a single battery!)
  • Energizer® LED Pen Light
  • 2x Energizer® Ultimate Lithium AAA Batteries
  • 2x Energizer® Ultimate Lithium AA Batteries
  • 2x Energizer® AAAA Alkaline Batteries
  • FREE Class Coupon for use at a Microchip Regional Training Center (a $99 value)
  • CD with Training Class Presentations

To enter the contest, just submit your sketch/painting/photo/videos to the MAKE Flickr Pool, and tag them with the hashtag #robotplant. The deadline is Midnight on December 5th, and we'll announce the winners next week, on December 6th. Note that you have to be eligible for the main contest in order to be eligible for a prize, however everyone is welcome to join in the fun!

The above photo is a screenshot of a sunwalker bot, from a video by Flickr user marcfonteijn. Remember, a robot plant could come in any form!

back to top

Plant Brains!

robot_plant_brains_soldered_small.jpg

The first step in building the robot plant is to wire up its brains. If you're following along with the official build, we will be using a similar circuit to the one used in the data logger. Based around the Microchip PIC 18lf25k22 microcontroller, we've added a few external components to help control our plant. Lets take a look at the circuit:

robot_plant_schematic_annotated_small.png

These are the main components of the circuit:

  • Microcontroller The PIC 18lf25k22 microcontroller. The capacitor on the right hand side is a bypass capacitor. The resistor on the left is a pull-up resistor, that keeps the reset input at a high voltage when the programmer isn't connected.
  • Battery The low-power processor runs at 3V, however our servo motor requires a bit higher voltage to deliver maximum power. To make them both happy, we'll add an extra wire to a three-battery AA battery holder, allowing us to pull both 3V and 4.5V from the same set of cells. On the schematic, the 3V line is labeled 'Vcc', and the 4.5V line is labeled 'Vbatt'.
  • Servo The servo connection is used to control a single hobby servomotor. To conserve the most power, we've added a transistor switch to disconnect the servo motor from the battery when it's not needed. This prevents the servo electronics from slowly sapping energy from the battery.
  • Clock To make sure that our plant will sleep for just the right amount of time, we'll use an external crystal oscillator that is more accurate than the one built into the microcontroller. See the next section of the newsletter for more details.
  • Sensor Touch sensor input, just a long wire!
  • Programmer Connection for the PICkit 3 programmer

The build guide is up on the blog; lets put together some brains!

back to top

Tech Note: Making an Accurate Clock

wikipedia_crystal_oscillator_tuning_fork.jpg

One of the things we'd like our plant to be able to do is wake up at a certain time, and to do that, we'll need to build in an accurate clock circuit. To do that, we'll need an extremely precise way of measuring time. In the past, this might have meant a swinging pendulum or dripping water , however it is much cheaper and easier nowadays to use a crystal oscillator to do the task. A crystal oscillator is a device that uses the mechanical resonance of a quartz crystal to output a very precise frequency.

In the data logger build, we used a low speed oscillator that was built into the PIC to keep time. On closer review, however, it isn't really that accurate, and will either gain or lose time slowly. Fortunately, there is an easy solution: using an external crystal oscillator! For this project, we'll use one that is shaped like a tiny tuning fork, and that resonates at 32.768kHz. These are one of the most common (read: cheap and easy to find) kinds of oscillator, and are used in almost everything that has or is a clock (wristwatches, computers, stoves, etc). There's nothing magical about that frequency, however it is convenient to use because it is a multiple of 2 (2 ^15 = 32768). This means that clock designers can use a simple 15 bit binary counter to convert the oscillations into seconds, which made it cheap to implement a digital clock.

Above photo by Wikipedia contributor Chribbe66

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