Archive for the ‘ Projects ’ Category

Tricopter: Electronics

(Disclaimer: the photos are blurry because my cell phone camera can’t focus on anything closer than 3 feet.)

The underside of my Seeeduino Mega protoshield

This is the underside of my Seeeduino Mega protoshield that will hold most of my tricopter’s electronics together.

I wired up my accelerometer (BMA180) and gyro (ITG-3200) a few days ago without too much trouble using their respective datasheets. I also put together a basic integrator for the gyro outputs to calculate angles, although I discovered that since the gyro drifts at a variable rate depending on the chip’s temperature, I can’t use a constant calibration value. I’ll have to look at that later. For now, you can see my code on github.

SMD LEDs soldered to protoboard. Blurry, but they're there!

My little victory today was having successfully soldered surface-mount LEDs (1206) to the protoboard, resistors and all (they’re the four yellow smudges!). The lights will indicate power, RSSI, and data I/O. That was the easy half-hour.

I spent three hours figuring out the schematics of my XBee Explorer board from SparkFun so I could plug the XBee directly into my protoboard. I don’t want to wire the explorer board to the protoboard because 1) that would mean two boards to mount to the tricopter chassis and 2) I get higher current capacity on the protoboard that I will need when I eventually upgrade the 1mW XBees to the 100mW version.

Fail schematics

This is my rough draft of the circuitry before I started soldering. It’s evident I got confused. I also realize now that those schematics are full of errors, but it’s not like you can read the scribbles, anyway. BAH. I’ll post more helpful CADded schematics when I have everything finalized.

The XBee datasheet was of substantial help. The schematics and CAD files on SparkFun’s product page for the explorer board also helped.

At this point, I should make it clear that wireless communication through the protoboard is not yet working. Pretty good progress for three hours, though.

Fortunately, I didn’t fry any components, not even any of the rather delicate LEDs. I scavenged a diode off a scrap motherboard, though I realize I must have wired it in backwards, perhaps causing my data transmission (the lack thereof) woes. The RSSI lights turn on if I try to transmit data (using a USB Explorer board), so I think the XBees are fine. I must have messed something up between the XBee and Seeeduino, like the diode. It’s also possible that the LEDs are drawing too much current, though I don’t see how that could even be true since the data LEDs aren’t lighting up much anyway.

I probably shouldn’t have skipped the breadboarding stage.


Tricopter: Accident Update

The shafts are a bit scratched up. I found that the prop savers had come a little loose, perhaps as a result of vibrations. I will need to apply loctite or at least check them before each flight.

The tail rotor must have cut into the tail ESC and the ESC leads as it ripped off. I will need to apply heat shrink or replace the wires.

I don’t know what I was thinking, but I had both the flight code and the joystick code assume an initial Z input of zero. Arming should be (and I knew this!) manual! This is problematic because the joystick has issues determining the initial Z axis value (reports it as 0 instead of -1). I must have nudged the joystick a bit, causing it to send an initial Z value of 0 even when it is not. In code, a Z value of -1 is minimum throttle, so 0 is actually mid-throttle. This is now fixed.

But at least it was mid-throttle. I don’t know if I could actually have even held my grip on the tricopter if it had gone to full throttle (as it had many times during testing).

Tricopter: Now in Five Broken Pieces

Curse my impatience.

I got wired control pretty much working, so I went ahead and hooked up my XBees (wireless link) for testing. I had my hand on the chassis just in case, but I guess I didn’t apply enough pressure—it went full throttle on its own (I had barely touched the joystick) and flew off the counter. In two seconds, the tail rotor ripped through my sweatpants and scraped my calf, hit the chair, broke free of its axle and ricocheted into a corner (I spent a good 10 minutes trying to find the detached rotor piece). Somehow, I got three cuts on my left hand, and the acceleration was such that it snapped the chassis into four pieces. Granted, the chassis was made of scrap PCBs, but it was double-layered! All three propellers are shattered and useless.

Anyway, my mother freaked out.

The good news is that I think my motor shafts are okay. My electronics also survived the accident.

I’m probably very lucky that I still have the skin on my fingers and got away with only a few cuts and a welt on my calf. Before I started this chassis build, I cut my thumb pretty badly when I lost my grip on a motor that suddenly accelerated to full speed and landed in my hand (it stopped when it spun itself free of the battery). The jagged edges of the broken rotors would have done much more damage. Why do I never learn from mistakes?

TODO: clean up mess, order new propellers, rebuild chassis, test, test, and TEST CODE.

Tricopter: Prototype Chassis

I am sadly and pitifully deprived when it comes to building stuff at home. I didn’t even have a drill before I started this build.

Anyway, I didn’t have scrap plywood, but I did have scrap circuit board. I sandwiched wooden arms between two scrap PCBs and bolted them with 2-52 bolts (the only kind I have a meaningful quantity of) that are way too thin and will probably bend.

Again due to my dearth of tools, I cut the wooden beams using a drill (and broke the bit). I found a fold-out saw later that was much easier to work with.

I tested a rotor unit (motor + propeller) by mounting the motor on a long piece of kindling and clamping the kindling to the 1/2″ thick wooden cutting board that is my workbench. At about 70% throttle, the rotor nearly lifted the cutting board. I wouldn’t bring it to full throttle even behind a polycarb shield.

The tail motor mount was a bit tricky, but I managed it. I would take pictures if I had a camera.

I will mount the tail motor and hook a stiff wire (paper clip?) between the servo arm and the rotational unit once the epoxy cures.

Tricopter: Bill of Materials

I have posted the running bill of materials for the tricopter on my github account here.

Combined with the cost of new tools and shipping (over $600!), this is the most expensive activity I have funded on my own. I feel good that I am using my internship stipend to do this, but this had better work.

Project: Tricopter

It was the AR Parrot drone that first piqued my interest in quadrotors early last year. I then started seeing autonomous quadrotors being made by universities and decided to make my own.

Soon afterward, I found videos of a multirotor variant people had dubbed the “tricopter” due to its use of only three rotors arranged in a triangular formation. Unlike a quadrotor, the net torque generated by the three rotors is not zero, so the tail rotor is mounted on a servo-actuated axle to compensate for this torque and provide yaw control.

Besides the fact that having three rotors and arms is cheaper than having four (a servo costs about $10), a tricopter just looks cooler than a quadrotor. That, and all the universities have quadrotors already. I want something different.

I found a gigantic tricopter thread on RCGroups that is a good source of other people’s tricopter builds, even though they all use simple radio equipment with no room for programming. The thread is actually useless to me past the first 100 posts or so. I just like watching their videos and wonder why they don’t fly any higher than a few hundred feet.

The material cost for the tricopter itself ends up being about $400. For this prototype, anyway. I will rebuild it with much nicer materials (aluminum? carbon fiber?) once I get past the testing/breaking stage.

My first robot!

My first electronics project, for that matter. I am currently taking an electronics class at my high school, and as part of the course, we are required to order and build an electronics kit. Since the kits provided were, in my opinion, too easy for me, I decided to order my own parts and build a remote-controllable robot based around an Arduino. I will try to throw together a haphazard build log here.

My first task, I decided, was to design and build a DC motor driver capable of driving four motors. I designed the PCB using KiCAD (see the schematic here and the PCB here) and ordered it through BatchPCB.

I wanted an omnidirectional robot. Both to save cost and for the additional wow factor, I decided to make it three-wheeled (kiwi drive). It will be good experience for next year’s FIRST competition anyway.

The following is my bill of materials, including where I ordered the products and their prices. I ordered many extra parts from Digi-Key so I could get lower bulk prices. I ordered the USB cable because I had too few and the extra transwheel in case I messed up while drilling holes in them. As you can see, I also took advantage of samples offered by some companies. I actually ordered samples of accelerometers and many other components not listed here that I thought may be useful in the future. Extras are indicated by an asterisk.

STMicroelectronics – $0

  • 3x* L298HN motor drivers (sample)

Keystone Electronics – $0

  • 4x 2-terminal blocks (sample)
  • 2x* 3-terminal blocks (sample)

BatchPCB – $20.06

  • 1x Custom-made four-motor driver PCB

SparkFun Electronics – $24.75

  • 1x RF Link Transmitter – 315MHz
  • 1x RF Link 4800bps Receiver – 315MHz
  • 1x Resistor Kit – 1/4W
  • 1x Polarized Connectors – Crimp Pins
  • 1x Heatsink Compound – ST350

Pololu Robotics & Electronics – $77.41

  • 3x 35:1 Mini Metal Gearmotor
  • 2x Pololu Micro Metal Gearmotor Bracket Extended Pair
  • 2x Pololu Universal Aluminum Mounting Hub for 3mm Shaft Pair
  • 1x 0.100″ Breakaway Male Header: 1×40-Pin, Straight
  • 1x 0.1″ Crimp Connector Housing: 1×2-Pin 25-Pack

Kornylak Corporation – $15.20

  • 4x* FXA208B (2051-1/4BX) CAT-TRAK transwheels

Digi-Key – $18.90

  • 1x* USB A-B (Q361-ND)
  • 10x* CAP 470UF 50V ALUM LYTIC RADIAL (P5185-ND)
  • 10x* CAP CER .1UF 100V X7R 0603 (490-3285-1-ND)
  • 18x* DIODE SCHOTTKY 60V 2A SMA (497-2461-1-ND)
  • 50x* RES 270 OHM 1/10W 1% 0603 SMD (311-270HRCT-ND)
  • 10x* LED GREEN CLEAR 1206 SMD (160-1404-1-ND)
  • 10x* LED SUPER RED CLEAR 1206 SMD (160-1405-1-ND)

Subtotal: $156.32
Total S/H: $18.39
Total: $174.71

All orders except those from BatchPCB and SparkFun have arrived. I will elaborate in the next post.