UAV / Quadcopter roundup

This post is intended to be a living document containing the information that I have about RC, planes, helicopters, quadcopters, and UAV/IMU/FPV.

Discussion on LinkedIn group about UAV

Arduino PID library

IMU tutorial

HobbyKing quadcopter frame has a good set of accessories.

Actual parts list for a tricopter! Looks like the DT750 motors are really the right stuff, along with the 18A plush ESCs.

homebrew quadcopter controller (USB Joystick and Xbee)

Cheap quadcopter from Australia. Does not UAV out of the box, but has a ‘328 brain.

A whole blog about RC and Arduino. Aimed at cars, but I assume you can
pull the relevant info out.

UPenn quads are doing some crazy stuff.

Plastic framed quad

cheap quad

Arduino to RC bridge

Very Small Form Factor Arduino

cam + helicopter

Olympia Quadcopter

Good documentation on yet another DIY IMU
Below are some notes I culled from an email thread with a person who was building a quadcopter using USB joystick/XBee/Arduino and a 6DOF IMU.

I’m decent with a soldering iron, but I’m mostly a hack when it comes
to EE. I put stuff together based on a “try it and if it doesn’t
smoke, keep going” methodology, and am usually surprised when my
circuits do what I wanted (although my major problem at the moment is
battery life — I make circuits that need wall warts).

The good news about coding is this: If you can write Arduino code, you
can write C++, Python, or Java. They’re all variations on a theme.

The software architecture that the servo guy used in the article you
sent is a good one; think about having one small program to deal with
the XBee communications, one small program to deal with the joystick,
and then one to tie them together, turning inputs from the stick into
serial communication.

Is the video being transmitted over Xbee also, or is there a separate
wireless transmission for that?

You have some code written already — is that running on the onboard
IMU on the quad (written “in Arduino” or some such), or on the PC? Is
it in C++?

I’m no PID expert, but my understanding is as follows:
Proportional = “present” error
Integral = “accumulated” error
Derivative = “rate of change” of error

so. Let’s use an example. Say that you were trying to do cruise
control for a car. So you desire a particular speed. That’s the set
point. Every loop, you check the current speed. That’s the input.

To get “proportional” (or “current”), you just subtract current speed
from desired speed.
To get “integral”, you then add the “current” to the last integral reading.
To get “derivative”, you need to divide “current” by the amount of
time since the last reading

So “P” lets you know how far off you are.
“I” gives pressure to suppress overshooting.
“D” helps you to tune the amount of correction.

You then take these 3 inputs and add them together (probably scaling
each by a certain amount — that’s the “PID tuning” that people talk
about), and use the result to determine:

1) whether you’re above your target speed or below, and
2) how far you’re above or below.

You then adjust whatever needs to be adjusted to minimize the error,
and then you retake all your sensor readings (perhaps after some small
delay, to allow the change to take effect).

Keep doing this, and eventually, the P should tend towards desired, I
should tend towards 0, and D should tend towards 0. This is the
“balanced” point (about which you may oscillate, depending on tuning
and other factors), and anything that pushes you out of the balanced
state (going up or down a hill, for instance) should cause the P,I,
and D to apply negative feedback, to get back in balance.

For your purpose, you will probably use the output of a
gyro/accelerometer to determine whether you’re flat and level or not,
then apply more or less power to one or more of the motors in response
to the PID calculation.

I hope that’s enough to get you started on that part — despite it
being called “integral” and “derivative”, there’s no real calculus
involved, just addition, subtraction, and division. The “over time”
(“dt”) part is gained by keeping the variables from reading to
reading.

You were asking about pyserial in the other thread. The example you
found is written in Python (a very nice programming language for quick
prototyping). The basic idea is that Python has many libraries that
make your life easier. In this case, pyserial is a serial UART
library, which allows you to connect to a serial port and send/receive
data from it. Since the XBee acts like a serial port, this is how
you’d connect to the XBee. The author also talks about a pygame
module, that knows how to read joysticks, and he even has joystick
event code in one of the other blog posts. Between these two, it
sounds like you’ve got a nice basic joystick-to-XBee converter, and
then you just have to decide how the copter should respond (which
motors do what) based on which joystick inputs.

If you spend a little time with the guy’s code samples, you can
probably find one that you can just hack into place to get your XBee /
stick working together, and then you just need to figure out what to
send to the onboard IMU (which I assume is driven by an Arduino?)
based on that. Keep your protocol lightweight; something as simple as
4 bytes, each one representing a 256-step percentage of motor power
for that motor, is probably enough. If you find that you’re dropping
packets, you might want some kind of CRC or challenge-response
protocol, but to start, I think you can just send the command and deal
with lost packets “in post”.

Posted in Electronics, Knowledge, Making, Technology | Tagged , , | Leave a comment

Home Automation roundup

This post is intended to be a living document gathering the information that I have about Home Automation.

WebMote

panStamp

garden sensors
battery charging monitor
hybrid mains power
webserver+arduino+mains control
wireless power outlet control
proximity mains switch
uC switched power strip and another
RC wall plugs and Raspberry Pi
Control appliances from the internet
Arduino relay driver
RFID door lock
Arduino-controlled greenhouse
Homemade thermostat

The $119 EtherMega can be powered by USB, wall wart, or Ethernet. Has onboard SD slot.

One assumes that you’d need some power relays at some point, to switch on and off a wall socket. Assuming you want to do so with an XBee, you’d need to be able to switch the relay with a 3.3v circuit. There are 3 of these at Digikey, around $9ea, only takes 10A across the contacts. In the 5v realm, the choices are a lot easier to come by; for under $2, you can get a 15A rated job. And for $9 (in 5v), you can get a Latching version (so the XBee doesn’t have to hold it open). XBee (or Arduino) is still the major expense in the build; either would be around $20 per socket, minimum. Beating the PowerSwitchTail’s retail price of $25 for a wired solution seems pretty straightforward. Beating that price for a wireless solution seems like a pretty tall order. For a simple capacitive touch switch, though, this seems pretty simple.

He’s making strides on getting a minimal 5v power supply. He’s trying an Apple charger.

Ardupower. based on 220V circuit, but very simply and nicely done with relays and a ULN2003

Posted in Electronics, Knowledge, Making, Technology | Tagged | Leave a comment

Working on my communication

I’m beginning to realize that most of the big electronics projects that I have right now are going to require a more serious level of inter-device communication than most of my previous stuff.

Any kind of UAV/quad is going to need to handle both user input and telemetry at the very least, and will probably end up using some kind of video transmission as well.

All of the home automation stuff is going to be some combination of Xbee/WiFi/Ethernet.

So, I picked up a copy of _Making_Things_Talk_, by Tom Igoe. I’m still in the early chapters, so most of the stuff is pretty basic, but there’s some good basic protocol theory in there, too. So far, it’s a wealth of information, and the projects are good examples to follow. Hey, I’m even learning a little Processing. That should help.

Handshaking will definitely help with the UAV project. The simple act of making each side wait for a response from the other before sending any data… genius. I mean, it’s in chapter 2, so it’s probably covered in the first few weeks of that CS lecture on data exchange protocol theory. However, I never took a class like that, so it’s nifty for me to think about.

Anyway, I’m really enjoying the book, and I can really see how the little gems I’m getting out of it will help me with projects.

Posted in Computers, Electronics, Knowledge, Making, Science | Tagged , | Leave a comment

Networked Arduino

I picked up two separate Ethernet solutions for Arduino while I was at Maker Faire; an Arduino Ethernet Shield, and a Nanode 5.

Once I got them home (and got the Nanode soldered together), it turns out that they use different Ethernet chips, so there are two separate libraries to use to work with them. This will give me a nice feel for comparing the performance and ease-of-use of the two.

Getting the two boards online was quite a struggle.

First, the Nanode was not shipped with the Arduino bootloader installed on the ‘328. This took me quite a bit of head scratching to figure out. I swapped the chip out of one of my Unos (Note to self: There’s now an Uno with a bad bootloader — get around to re-flashing it at some point), and then I could load sketches. An aside here; this is the second time that I’ve bought a kit at Maker Faire (in the Maker Shed, no less), and it’s had quality control problems. I have a feeling that in the zeal to get kits built in time for the Faire, sometimes quality slips a little. Might be worth just browsing at the Faire, and then buying online afterwards…

Second, I apparently have a non-working CAT5 cable lying around. That took me 2 days to figure out; I couldn’t understand why I couldn’t get the Arduinos talking to the DHCP server. So I finally took a cable that I knew to be working, and 5 minutes later, I’d seen each of the two boards online. grr.

The Nanode clearly supports DHCP, and I got it to request an IP from the router successfully. The Ethernet Shield doesn’t have a DHCP example, but the documentation says it should be possible; I’ll work on that. Apparently, using DHCP makes the sketch a lot bigger. Probably you’d want to have a static IP for an embedded piece of hardware anyway. I’ll think on that.

Next up is to put up RESTduino, and add a RESTful interface to my newly-web-aware gadgets.

It’s amazing to me to think that I can pull up a webpage and hit a 28-pin IC. Very cool.

Posted in Computers, Electronics, Knowledge, Making, Technology | Tagged , , | Leave a comment

Spring projects

Maker Faire comes at the perfect time each year. I’ve worked my way through all of the winter projects, and starting to think up new ideas.

The projects that are on my mind at the moment:
– home automation (start with: how to turn off a lamp in software, or how to ethernet-enable the thermostat)
– UAV/quadcopter (stability, motor sizing, waypoints)
– 3D printing/CNC (get the machines running, get limit siwtches and PID working)
– farm work (chicken coop door, bee hive weight, sensor arrays for same)

Mostly, I’ve been thinking about network-connected circuits. I’ve been scratching my head over ethernet modules (and Wifi/Xbee/Bluetooth) for a couple of years now, so I picked up a few things to scratch that itch while I was at the show:
– an Ethernet Shield for Arduino
– a Nanode (very cool Arduino with Ethernet built in)

I also picked up an Arduino Mega, with the thought that it might become a UAV brain (or perhaps a 3D printer brain). I’ve been avoiding buying one of these, too, as all those extra pins just freak me out. But, if I’m just going to slap a shield on it, I’ll be fine.

I avoided the Useless Machine at last year’s Faire, but then I regretted it. I bought one, soldered it up, and now it sits on my desk at work, bringing amusement with every switch flip.

I also picked up a LCD with RGB backlight. I figure it will be good for home automation.

So now I have a pile of parts, and some things to do with them… I’m ready for Spring!

Posted in Electronics, Making | Tagged , , , | Leave a comment

UAV design

After much reading and re-reading, I think that I’m finally starting to understand what’s necessary in order to build a UAV.

First, let’s talk about a regular RC airplane.
You have a transmitter in your hands that has some number of channels (for a regular ol’ airplane, this number is usually 4; throttle, elevator, ailerons, rudder; or power, pitch, roll, and yaw).

The plane has a receiver, which consists of a black box with an antenna coming out one end, and a bunch of 3-wire connectors coming out the other; these correspond to each of the channels coming from the transmitter (and you can sometimes buy them together, so they have matching numbers of channels).

Of the 4 main channels, 3 of them are “control surfaces”, meaning that they’re low-power, to-and-fro movements, and are controlled by servos. The other one (throttle) is a high-power, fast-motor-spinning sort of thing, and connects instead to an ESC (electronic speed control).

The ESC is another black box, and you’ll have one per motor. Its connections are a 3-wire connector (which are all power/gnd/signal, including the servo ones), 2 high-voltage wires that go to the battery, and 3 high-voltage wires that go to the motor (which is apparently because it runs on AC, which the ESC manufactures).

There’s a motor which spins real fast, and a propeller, which is either a “push” type (for props on the rear of the plane), or a “standard” type (for props on the front of the plane. If you were building a quadcopter, you would want a pair of each type, and one pair would run CW while the other ran CCW. You would also have 4 motors and 4 ESCs but probably no servos.

If you have a gas plane, then you end up with a servo for the throttle, too, and probably a lot of other complication that I’m not going into because frankly I could care less. Ditto helicopters with either fixed blade pitch or collective pitch, which requires 5 channels, but I haven’t deciphered what they are, and probably won’t, for now.

OK, so you have 4 channels that need to be controlled if you are going to drive the thing, whether you’re driving it via transmitter or computer.

So, the “computer”, or IMU (inertial management unit), has to, at the very least, perform the control functions for these 4 channels. You will not be surprised to learn that, on the ArduPilot, for instance, there are 2 sets of 3×8 pin headers, one for “input” (which you hook to the transmitter), and one for “output” (which you hook to the motor or servos). This allows you to either “pass through” signals from the ground, or to modify (or override) them based on “the stuff in between”. Oh, and of course, you want to be able to switch from IMU to ground control, so you need a 5th channel, which is hooked to a toggle switch on the transmitter (big, red, and marked “Human Override”).

What’s “in between”? Well, at the very least, some sort of CPU that can take inputs and push outputs (eg an Arduino), and in order for it to intelligently make decisions about what to do with the outputs in order to achieve its goal (level flight, waypoint navigation, whatever), it needs some kind of telemetry, which it gets in the form of a sensor array. Among useful sensors:

– accelerometer – which measures attitude angle in X, Y, and Z
– gyro – which measures rate of change of attitude in X, Y, and Z
– magnetometer (optional) – which measures compass heading (in multiple dimensions? why?)
– GPS (optional) – which measures position over ground, and can also measure altitude sometimes, and also provides a stable time base, should one need it
– pressure sensor (optional) – airspeed; only useful in airplanes
– sonar (optional) – height above ground; mostly useful in quadcopters

Everything except the accelerometer and gyro are “nice to have”, although I believe that an accelerometer can get confused when banking and pulling G’s, which makes a magnetometer a good early upgrade.

So, you grab input from all the sensors, parse it into position/attitude/velocity, then adjust the control surfaces and motors to suit the mission. I can imagine at least 3 modes:

– all human: pass through all flight control signals from the ground, unmolested
– power assist: maintain level flight if possible, but allow input from the ground
– all computer: ignore flight control signals from the ground (other than the Human Override channel)

One imagines being able to make the thing take off and land by itself, or return to sender if something goes wrong, or… that’s all just different missions.

If you want a peek into the IMU’s thought process, then in addition to simply reading the sensor data and making flight control decisions with it, the IMU also needs to transmit this telemetry data to the ground station (which, at this point, needs to consist of more than just a transmitter.. right? I assume there are xmitters that have so many channels and such cool screens that they can show the data onboard, but let’s assume a laptop for now). There are ways to do this, but let’s assume that XBee will be used. So, an XBee onboard the IMU, and one connected to the laptop, with a constant stream of serial telemetry data coming from the plane. This can either be used to monitor what the IMU is doing, or it can be used for the human to drive the plane “FPV” (first-person-view), using the telemetry as a HUD.

The plane can also have onboard some kind of payload, like a camera. If the camera is fixed to the heading of the plane, it can be used for FPV. Then it just needs to wirelessly transmit its output. That’s probably on a different channel than XBee, which would quickly saturate a 115200 baud connection with video. Alternately, the camera can be attached to a PTZ (pan-tilt-zoom) mount, consisting of at least 2 servos (and one zoom control, however that’s done), which would require 2 or 3 more RC channels. One could imagine a transmitter whose sticks do flight control if in human mode, or camera control if in UAV mode. Hmm.

Once a laptop is added to the equation, one assumes that you could ditch the transmitter, and provide flight control input via a gamepad/joystick. Then you’d be all-XBee on the ground transmission side, and you could even ditch the receiver and all the “input” side stuff on the plane; you’d just have an Arduino with an XBee that was controlling a bunch of servos. Wonder if the datastream is fast enough to just fly an RC plane around like that. Probably how the “drive with your iPhone” planes do it. Hmm. That’s a pretty easy project to breadboard; just hook up some servos to the Arduino, and hook up an XBee, and create a protocol for uplink (flight control) and downlink (telemetry)…

You would still need:
– ESC
– motor
– prop
– servos
– battery

but you would eliminate:
– transmitter
– receiver

and you would additionally need:
– laptop
– XBees
– Arduino
– gamepad

hmm…

Vendors:
Sparkfun – sells 6DOF (just gyros and accelerometers) and 9DOF (+magnetometer) boards
DIY Drones – sells APM (ArduPilotMega) v1 (which requires 2 boards, a APM and a Oilpan IMU) and v2 (all on one board)
uDrones – sells APM v1’s and has some nice “standard sets” for both planes and quads.

Posted in Knowledge, Technology | Tagged , , , , | Leave a comment

CNC – cable runs

I spent some time in the shop today, getting the cables run on the CNC machine. It’s been another one of those long hiatuses, and I needed to get out there and make the thing cut.

I needed to crimp up some motor cables, and I spent some time making sure that they wouldn’t bind up as the various gantries move back and forth. I ended up using some screw-in cable ties to keep them running in the correct directions. I had an intermittent problem with the Y axis motor, and couldn’t figure out what it was until I opened the connector, and found that one of the 4 poles had a broken solder joint. oops. I soldered that back together, and the Y motor seemed much happier.

I also ran the vacuum hose and router power cable. It turns out that with a small extension, I can make both of these work pretty easily. The vacuum hose needed a special fitting that I haven’t been able to find in the store, so I just cut up a piece of vacuum fitting that I had on-hand to work. I’m pretty impressed at how well it fits together now, and I just need one more piece to go from the Dust Deputy to the Shop Vac and I’ll be golden. The router power cable is running along the vacuum hose, which keeps it away from the DC cables. It also needs a simple extension cord to get working properly. A trip to Home Depot is in the near future.

I Sugru’d the home switches in place, but ran out of Sugru before I could get all the magnets installed. I don’t know if the installation will work as-set, but I have hope. I still need to get the switches cabled. But for now, I can run like it is.

I spent some time after hours looking online for cabling, and decided on using RC servo wire to drive the home switches. It should be perfect. HobbyKing had 60m of cable plus 100 pairs of ends for under $50. I also found articulating cable carrier track on eBay and ordered 10′ of it. That should make the machine look really professional, and will have the additional benefit of keeping the cables from catching everywhere.

So, the machine works at this point, all 3 axes move. I could use some work in the area of vacuum and router power, but essentially, I’m ready to cut.

With a trip to Home Depot, I’ll be at the same level of hardware that the old CNC had, and with the stuff that’s coming in the mail, I’ll be able to add some seriously professional looking (and performing) features.

Let’s get this thing running soon. I’m getting sick of this being a “work in progress”.

Posted in Electronics, Making | Tagged , , , | Leave a comment

CNC – thinking about wires

I spent Saturday running the soldering iron. Among other things, I was able to construct a trio of Hall Effect switches that I’m going to install on the CNC machine as home switches.

I breadboarded, then soldered the circuits together (I wish I’d taken a photo, because they looked pretty cool, all deadbugged up), then encased them in Sugru for installation on the machine. The Sugru makes them a little impossible to repair (although my other mounting idea was to use epoxy, so…), but makes the units look nice and neat, and it was oh, so easy.

I still need to figure out how to mount the pieces to the actual machine; I am torn about whether I will embed the magnets into the machine or what. The tolerance on the Z axis in particular is a bit tight. I’ll get it worked out.

With the limit switches built, I needed to finally figure out how much wire I’m going to need to build out the cables for the machine. I made myself some pencil sketches and have sort of a plan. I have a feeling that I’ll be heading back to Home Depot for more CAT5 at some point.

I also don’t have a good feel for how I’m going to get the 3-wire sensor cables hooked up. I will check to see if I have telephone cable of sufficient length (and with 4 conductors…). I may end up just running full CAT5 to each point, and only using 3 wires. Or I may end up stripping out 3 conductors from a piece of CAT5… I don’t know. Like I said, I’m a little torn.

Once I get cables cut, I need to run them properly. I haven’t quite got a handle on how to keep the cable runs from fouling. I will probably start with the split tubing that I ran on the telescope mount, but I have a feeling that I’m going to end up with some of that nifty articulating cable run stuff.

When the cables are all installed, I can start working on getting some real stuff cut out. I need to run a series of easy cuts first, maybe a few enclosures that I’ve been putting off, then I can start thinking about cutting something for Lucy’s birthday.

Posted in Electronics, Making | Tagged , | Leave a comment

Insane URL-fu

I had an interesting use case.
I needed to get some data out of a database, and then return the result in a graph. So far, the thing is not so interesting. However, there were a few twists.

First twist, I needed to provide a web form for the user to type in parameters for the DB search.

Second twist, I needed the result graph to show up on the same page as the original form, so that the user could refine the query by tweaking the inputs and seeing the results right away.

I’m using Django, which provides a very interesting service; that is, it can turn URLs into function calls. If I enter a URL that it knows about, it calls the configured function, passing along any HTTP request parameters with the call.

There is a template mechanism, too, so that I can set up the input form as a normal HTML < input > tag set.

So I get the input, no sweat. Pass it along to the DB, yawn. Parse the data into a graph — took a little effort, but still, no problem. Convert the graph to an in-memory PNG file to display in a browser, done.

And displaying that PNG in the browser on its own page was a cinch, you just pass a PNG to the browser, and it displays it.

But how do you put that PNG into the HTML template? Ah, there’s the rub.
The way to put an image into an HTML file is using < img src="file.png" >, but I don’t *have* a “file.png”, my PNG is in memory (and I’m not keen on writing it to disk every time).

And here’s where the URL-fu comes in.

Recall that Django can turn any URL into a function call. This includes .png files called out in the URL!

So to the template, I added:

< img src=”results.png” >

And to the URL-to-function config, I added:

(r’^result.png$’, ‘function_to_create_chart’),

And then I created a function:

def function_to_create_chart(request):
return create_the_chart(request)

(create_the chart being a function that eventually returns that in-memory PNG, which I dutifully pass along)

… and this, although it looks awesome, completely failed to work.

… because the *request* was empty! All those parameters that I sent from the form were not getting passed along.

OK, how to get the request information in there?

And this is where the beauty that is Django impressed itself upon me.

I changed the template to include HTTP GET parameters:

< img src="results.png" > became
< img src="results.png?key1=value1&key2=value2&key3=value3" >

(no, I’d never seen HTTP GET parameters passed to a PNG, either)

and then I made sure that when the user submits the form, I pass along the proper parameters.

And it worked. Ask for the initial URL, get a blank form. User fills in the form, presses submit, and here comes the chart.

I have to say that even though I made this, the technology in question is very nearly indistinguishable from magic.

Thus endeth the lesson.

Posted in Computers, Knowledge, Technology | Tagged , | Leave a comment

Wireless Arduino programming

That was really cool.

There are times when you end up doing something hardcore and not realizing it until it happens. There are other times when you set out to do something hardcore, and you are just amazed when it all works.

This one was of the second variety.

A part of the bathroom scale hack, I wanted to get the circuit as small as possible, and also enable it to send data wirelessly. After much deliberation, I decided on XBee as the wireless protocol to use. I had heard a lot of good things about XBee, and wanted to give it a try.

The first cool part was that when I finally got around to ordering, the goods were on my doorstep the very next day. But I am skipping ahead a little.

When I go looking for new Arduino parts, my first stop is Adafruit. They have great descriptions and tutorials, and their gear is top notch. Unfortunately, they were sold out of XBee gear when I stopped by. So I was forced to look around. It turns out that one of their distributors, Solarbotics, had Adafruit XBee boards in stock. That is happiness. I did a little more digging, and found that Adafruit’s board is compatible with the FTDI USB cable that I am so fond of, but in the course of figuring this out, I realized that the Sparkfun XBee Explorer board has its RX and TX lines swapped, so while it’s incompatible with the FTDI cable, it’s directly attachable to anything that is, in particular, it can be piggybacked directly onto an Arduino Pro Mini! I ordered a couple of Adafruit boards, a couple of Sparkfun boards, a couple of XBees, and a couple of Minis.

When they turned up, it surprised me how tiny the stuff is. The Explorer is about an inch square. It’s bigger than the Arduino Mini. I did some breadboard tests, and the pins did in fact line up properly.

I was just about to solder the whole thing together when I realized that I might have trouble programming the Arduino with the XBee board soldered on. So I decided to look into using the XBee to wirelessly program the Arduino. Back to Adafruit, and I read her tutorial. Looked pretty simple, but it was going to require a couple of extra parts; a transistor, a cap, and a resistor. I didn’t want to build a daughter board for that, so I decided to see if I could construct the little circuit deadbug style. I bread boarded it out first, and got the Arduino IDE to send the code via XBee. That was pretty satisfying.

Then, I went to work on one of the Explorer boards. Dead bugging a circuit into an existing one is one of those “you only get one shot at this” moments, so I went as slowly as I needed to in order to make sure that I wasn’t missing anything. The most interesting part of the build was when I needed to use one of the standoff holes in the board to jump across to the Arduino. I got it all soldered together without any problems. The hardest part was getting the two boards parallel. I plugged back into a power source, and fired it up, and it worked on the first try! I was able to download code across the XBee into the Arduino. To say that this was a cool feeling is a gross understatement.

Of course, five minutes later I realized that I really had wanted one more pin exposed on the XBee. And of course that was one of the only two pins that was completely blocked by the deadbug circuit. But in a fit of soldering machismo, I was able to solve even that problem, so I now also have access to the XBee sleep pin, so I can throw everyone in powersave mode if I need to.

The XBee and Arduino are soldered together using straight header. It’s a very sturdy and compact setup, but it is also very permanent. Those two boards are going to live together forever now. I am really glad they still work properly, and I am really glad I have spares. 🙂

I need to figure out sleep mode for the Arduino and XBee. That is going to require some pin shuffling in the code again, since the Arduino can only do wake up interrupts on particular pins, and I’m using them both right now. I’ll need to allocate a pin to wake up the XBee also, unless I can figure out a way to trigger both circuits off the same pin. We shall see.

Once I figure that part out (I can do testing on a board that’s not all soldered together), I am ready to solder the output wires from the scale into place, and then mount the new little unit somewhere inside the case. I need to get the computer-side server software written, too. I don’t know how to make a Mac listen to an XBee. I’ll get there.

In case it wasn’t entirely clear, let me just say it: XBee is very, very cool stuff. I should not have waited this long to try it out. My mind is awhirl with projects that involve permanently mounted mini Arduinos all over the place, and a central command center that can push software updates or receive sensor data or… W00t!

Posted in Electronics, Making | Tagged , , | Leave a comment