Archive for the 'Paused' Category

 

All Good (And Poorly-Maintained) Things Must Come To An End: The Great Project Purge of 2012

Jun 26, 2012 in Chuckranoplan, Cold Arbor, Nuclear Kitten 5, Project Build Reports, RazEr rEVolution, Test Bot 4.5 SP1

i swear to god i will fix this later

At some point, I need to stop telling myself that. It’s well known that my stuff isn’t exactly world-class in terms of reliability and Six Sigma class in quality, but even I can get sick enough of it to declare it a loss and start over. Over the past few months (and years) of neglect, quite a few of the robots and silly vehicles have become damaged and non-operational. I kept Swearing That I’ll Fix It Soon, Guys, but my shelf of stuff is long past overflowing with parts and project detritus and some of them contain good parts that I don’t want to keep buying. With my general shift of operations towards the newly opened IDC space just up the Z-axis from MITERS, tearing down some of the old derelicts and returning their parts to the Earth (/my storage bins) became more appealing – especially as I started collecting more stuff, most of it landing on my fresh new corner desk.

So it is with great sadness (and hidden catharsis) that I must announce the decomissioning of…

Cold Arbor

Cold Arbor never really worked – the frame was too flexible to accommodate the huge teeth of the saw. After Motorama 2010 and Dragon*Con’s Robot Battles ’10, CA pretty much only ventured off my shelf for the occasional demo – it illustrated, visually, what a “combat robot” was very well. Pretty much everyone’s first reaction at the word “Battlebot” is “You should put a saw on it to cut through the other robot!”, and CA is…. well, pretty much a saw. It never really stopped driving, but then the saw actuator broke so it couldn’t do the extending thing any more. Arbor, being the biggest lead weight I had on my shelf, was therefore the first to go.

But before I tore it totally down, I decided to use it still-functional and very smooth drive base as a test dummy.

Last year in the Austrailian robot fighting circle (did you know that Australia has a very active robot combat scene too?), one of the builders began to modify Hobbyking brushless controllers to act as H-bridges for DC drive motors, utilizing 2 of the 3 half-bridges available on the average BLDC controller. I’ve been advocating something like this for a while – use the cheap hardware base that is Chinese brushless motor controllers instead of custom-developing an expensive niche robot controller solution. The choices in robot controllers these days are either said niche and expensive but generally reliable controllers, or these one-tiny-FET-per-leg overfeatured doodads that I’ve literally had zero success rate with. Or you straight build your own and have them work, but I’ve also not successfully managed that yet. There’s nothing on the market right now which is just a bucket of large FETs like the old Victor 883s (which you can still buy, but they’re now a design so old it can almost drive).

That aside, I have also never bothered to schematic-trace the brushless ESC boards or learn & put up with enough raw Atmel C to reflash the microcontrollers (though I suppose I could have flashed Arduino onto them…). So, a ton of hot air rage on my end, but lots of action in the 40+page thread over on the Robowars forum, which has seen all of the cheap common ESCs reverse engineered and firmware implemented for – up to and including its own confusing beepy configuration menu.

They’ve now started selling them (when I say ‘they’, I really mean like one dude), and I took the chance to get some modified “85A” units based off this Hobbyking ESC.

First, I had to remove most of Arbor’s existing electronics. Okay, so my success rate with the Sabertooth controllers isn’t zero – Arbor runs two of the closely related SyRen controllers, but $75 for 25 amps is stupid these days, and I’m also royally undersizing their loads – one is running a little Speed 400 class motor and the other is running a drill type 550 motor which sees about a 10% duty cycle on raising and lowering the saw.

Way cleaner wiring and layout with the ESCheap85 in – I could easily see a robot with a whole rack of these next to eachother. The massive spam of SMT FETs technique used to great success by cheap Chinese controllers is an acceptable compromise, in  my opinion, between one-tiny-SMT-FET per leg used by the Sabertooth and Roboclaw and other most-likely-designed-by-newly-graduated-college-students controllers, and the one-huge-nice-FET approach I usually take. It keeps the board size down, too.

After hooking this up, Arbor was taken on several somewhat strenuous (and absurd) test drives.

None of it was very scientific, nor was there really enough space to seriously stress the bot out. I’m going to have to use these in battle myself before I’m fully sold on the idea, but based on the reports of the substantial number of Australian users, they’re pretty bulletproof, and a few American users have already run 18v DeWalt drills in drivetrains using them (the same motors that Clocker uses). The 85A type has been praised as a “Victor replacement”, but its more limited voltage range (30V fets and 35v capacitors) doesn’t quite convince me it can be swapped directly into a native 24v (up to 28v fully charged and more during dynamic braking) system. I fully agree with the concept, though, and for about $1 per amp I don’t have any complaints past my own reservations.

That doesn’t mean I’m no longer going to attempt my own controllers – I have yet to successfully execute a small current-controlled vehicle H-bridge, of which robot controller is a simpler subset. But that’s for another post.

At the end of it all, here’s Arbor mid-scrapping:

Scrapping is such a negative word. It took me a while to crack open that weapon drive gearbox, since I sealed it up so well at the start – and some of the bolts were bent.

Here’s everything I ended up keeping from Arbor. All of the motors, pretty much all of the drive mechanics (especially those delicious custom gearboxes, which were one of my first good ones), and of course the saw and worm drive in case I rebuild it all. The VictorHVs and Sabertooth controllers were also kept and filed in my robot controllers bin.

prospect for rebuilding: slim

Arbor was a very complicated robot with lots of moving parts – it’s something which is more difficult to get right, and it’s usually more disappointing (to watch as well as to operate) when it doesn’t work. Arbor’s build was rather rushed and many details weren’t completely thought out. I’m more likely to build a 30lb bot that is either more plainly functional or spend alot more time to build a complex but well-designed and tested robot before trying to compete with it.

Going down the line, next I pulled out…

nuclear kitten 5

NK5 was heavily damaged last Robot Battles, and ever since then has been sitting on the shelf. However, the disc motor still works great – and I can make spare discs, so that’s definitely being reused on something. The controllers and motors were also potential salvage items.

NK5 was the last robot I built before I converted fully over to “T-nut” style construction, visible in pretty much all my stuff from 2009 onwards. The design actually dates from late 2008 – my first major t-nutted endeavor was the ill-fated 2.007 robot. The frame has these wonderful corner bars that I machined for this application, but it seems like now you can buy everywhere. I really liked these, so I went ahead and saved them. Tapping into real metal is way better than t-nuts at any rate.

Here’s NK’s remnants pile. The frame materials were just not worth keeping, but I kept the motors – the gearboxes are not stripped, but one of the pinions fell off (but is intact). They might become donor parts for future gearboxes. I am a fan of these little 25mm metal gearboxen: while they are not planetary, they’re big and chunky inside to make up for it, and fairly cheap at $10-15 each.

prospect for rebuilding: hell yeah

I can’t guarantee when, but D*C 2012 is likely because I pretty much have everything-minus-frame. The disc is up for some revision, though. Big tall vertical disc spinners are no longer in vogue, being replaced by small, low bricky drum things with built-in motors (of which there are now like 50).

Next up is my pride and joy,

test bot 4.5 MCE

Really? The bot that made it to real-deal-Battlebots-IQ, then Motorama 2008 and back? The first thing I ever worked on at MITERS? Yep, since its default parking spot since Moto 2008 has been in Clocker’s lifter when it’s not doing other things.

TB certainly has the most grime of any of the bots, and the lifter was pretty much utterly trashed – it took a direct from the vertical disc bot Igoo at Motorama 2008 (that video is slightly painful to watch).

This is one of my first drill motor hacks. I did a few in 2006 for the original TB version 4, but they were either terrible or dismantled very quickly. This thing predates my entire website, pretty much. The extension shaft with the pinion was added when I redesigned the lifter for Moto 2008. It had an additional outboard support, but since it was made of UHMW, the whole gearbox still flexed too much to keep the gears in mesh, and so the pinion stripped very quickly in battle.

After I took the damaged arm parts off, I realized that TB’s drive base was actually in very good mechanical shape. I still love those gearboxes, too: they are super special 12:1 drill box hacks that I made with mating the salvaged 18 tooth planet gear and 9 tooth pinion gear of the first stage of a drill motor with an intact output stage. Coupled with the extremely overvolted 9.6v drill motors, this made the bot have a rather zippy top speed of 14mph. The first version of this gearbox predates the website (again) – this version at least had the luck of being milled, so things actually lined up!

I briefly entertained throwing the BotBitz ESCs in the frame just to drive it around again, but decided against it for the time being. It’s sure been a long time since I’ve had a 4WD drill-powered box.

So I closed it right back up again. Only the damaged arm and wedge parts were scrapped – otherwise, I think I can put something interesting in this bot again, or at least give it a better sendoff at a serious combat event later on, as the most honorable fate for a combat bot is still, in my opinion, being thoroughly vaporized into a cloud of small particles.

prospect for rebuilding: not for Robot Battles

TB4′s design was optimized for “arena” combat which has more guaranteed smooth floors and a more pressing need for huge, thick angled armor. The RB stage is purposefully left fallow to discourage pure wedges – a passive aggressive attempt at encouraging more robot creativity, which I contend has been successful in the past few years even though it kind of locks me out from competing in 12lbers again there with this design. Maybe Motorama 2013….

Finally, a project that I hate to see get tossed so early, but…

razer revolution

It’s lived a decadent life of being a demo attention whore as well as occasionally coming in handy when Melonscooter was on blocks, and has seen 4 different motor controllers (Double DEC’er, Melontroller, Tinytroller, and Jasontroller!), but recently RazEr Rev has become kind of a wreck.

I donated the front end to another MITERS scooter effort after the new battery got 2 dead cells after only a few weeks – definitely a case of bad initial conditions. Since then, it’s been sort of chilling in a corner, slowly being eroded away by the tides of cruft and dead power supplies that ebbs and floes around the shop.

The Jasontroller works great, the battery can be surgically corrected (I’m literally going to scalpel/X-acto knife the dead cells out and make it into a 10S pack), and the Dual Non-Interleaved Razermotor is a little rattly in the bearings but otherwise functional.

So that’s pretty much all I kept. Oh, and the extra heavy duty generation 2 Razor handlebar, after they moved away from welded-to-frame folding joint but before cost cutting made the joint like 24 gauge steel. This front hinge is massive – the steel is something like 0.13″ thick.

The reason I decided to scrap RREV now is because I’ve become dissatisfied with the frame design. It uses a design which I now consider inferior to other similar scooters in the way it’s put together. Starting over with the frame will be a great way to optimize the design towards less material use (like giant plates of 1/4″ aluminum) and make it simpler to assemble in addition to making dedicated space for the battery and Jasontroller, both of which were “aftermarket” additions. It should end up lighter for the same performance, but I don’t see it getting any smaller. Sorry Jamo, but Razor Wind is a little on the small side for my tastes now.

All this talk of what I’m gonna do means the

prospect for rebuilding: immediate

I already ordered some more giant aluminum plates (…sigh) and will probably be redesigning the frame this week. I’ve already got the changes planned out – they’ll just need execution. Like NK5, it will just be a matter of moving old parts over to a new chassis – there’s otherwise not much about RREV that I’m unhappy about. It’s definitely going to get a stock fender.

other stuff

I didn’t take any pictures, but all the Chuckranoplans have been parted out and recycled too. I’m probably not going to be touching this for a while until I stop being afraid of foam so I can build meaningful scale models. 3D printer models were fun for design practice, but are too heavy to work.

Alright, now that I’ve eaten half my offspring, I can start considering rebirthing them again!

Return to the Copters: Global Flying Things Update

Jun 19, 2012 in Ballcopter, Chibicopter, Project Build Reports, Tinycopter

Whoa, this site still exists.

I’ve been primarily working on a Silly Media Lab Vehicle project for the past 2 weeks or so, in the spirit of me having done so during all 4 years of my undergraduate career, which is why I haven’t been posting anything. It was actually kind of refreshing to work on a silly vehicle for someone else again. Since it’s not really my project to publicly expose all the fun innards, I’ll refrain from doing so for now. It’s not that fancy, however.

Anyways, with that project squared away for now, I’m gonna take a bit of time off… by returning to my rag-tag fleet of flying things. Whatever happened to Chibicopter anyway? The last update on that was like… mid-April. So it’s on first:

Chibicopter

Chibicopter was the project I settled on to complete for the Media Lab’s DIY Manufacturing class. Admittedly, as I usually tend to do, I treated the project far more as a personal project than a means to take the class seriously, and this was reflected in the reviews I received at the end of the class.  I ended up half-assing or straight up skipping several of the assignments at the beginning because I was far more interested in seeing it work. If anything, having to do it for class made me take it less seriously – it’s an interesting psychological effect that I see in many project based classes at MIT, where once your own stake is reduced in the project, you begin turning away from it or needing to push yourself through it.

Seeing several of my undergrad peers push themselves through the same project classes this past year that I went through (namely 6.115 and 6.131) with high aspirations at the beginning of the final project push made me realize one of those everything-in-moderation things: that if you try to do an epic project for a class, you probably will end up getting sick of it at the end, because the agenda is no longer fully yours to keep. My 6.115 and 6.131 projects were rather tame in scope by comparison, and my most “epic” class project, Segfault, was actually 90% done already by the time the class started, and I pretty much only built the analog PI controller.

But that’s besides the point. The real point is that Chibicopter is gonna need alot of rethinking before it will actually fly.

Here’s essentially what it ended up as:

Previously, I had appended a FTDI header for easier (okay, possible) programming – never really having explore the wireless bootloading any further. I’m also unhappy about going with XBee control now, because it limits the command input interface to something which can talk to an XBee – which i took care of with XBYPASS this time around, but that’s unrealistic for a product or even for my own amusement in the future since it involves two $20 pieces of hardware (XBees are expensive!). And then, in the middle of term, Hobbyking, as always, came out with a solution to my problems:

Well then.

This thing seems to work fairly well – it acts as a WiFi access point, so you literally connect to its network and transmit packets with an IP socket. It already had its data format decyphered, and another enterprising MITERS member therefore wrote an iPad app which used the iPad’s internal accelerometer to control a quadrotor using tilt alone (the stock Hobbyking provided app using virtual touchscreen joysticks which were kind of annoying to use). So really if I were to revamp Chibicopter (for another product design class?) I would just lob one of these things on it.

Feeding control inputs to it was never really the hard part. I had feared that the system dynamics of Chibicopter, being so tiny, will be faster than what I could stably control with only 50Hz command refresh rates (the servo pulse repetition rate). As a result, I “overclocked” the Arduino servo library to 100hz, the maximum speed that it can do with 4 servos.

The reason it’s limited is because the servo library starts each pulse sequentially – one has to finish before the other starts. Other approaches such as the KK Multicopter controller (which Hobbyking has a version of and which most of the MITERcopters use) start all the pulses at once and end them according to desired pulse length. This is how they achieve up to 495 Hz control – a 2000us pulse has a frequency of 500Hz, and a very small dead time is used between pulses. It’s a more complex approach and needs two timers on the ATMega chips, so you pretty much only have to be making a flight controller for it to make sense – maybe not a general-use Servo library.

I think 100hz is fast enough for Chibicopter, but the rest of the problem was mechanical. The arms are really floppy – Shapeways’ “White, Strong, and Flexible” sintered nylon is really all three of them. The props are also not very balanced, and because they are so small, were hard to balance. As a result, Chibicopter tended to resonate strongly, which was most likely overwhelming my IMU.

Oh, did I mention I soldered the IMU directly to the board, which is mounted directly to the frame? From past copter experience, I really should have seen this coming as very bad news from the start. Even worse was that it was soldered at one end so it was really its own stiff pendulum – if there is one thing your inertial measurement unit should not have, is its very own not-very-inertial dynamics.

Basically, what it comes down to is needing to totally redesign the thing for easier communication, more stiffness, and higher bandwidth. The final “test video” has already been out for a while – I got it to a condition which I was satisfied with for now in time for the end of term:

As can be seen, it’s pretty much fundamentally unstable at the moment, tending towards divergent oscillations. But it’s very cute while doing so.

I might not rebuild Chibicopter immediately, but when I do so again, I think it will move towards an all-PCB construction like the other very small copters that exist now. I’ve purchased a different style of motor which has real mounting holes (not like the mounting sticks of the 2 gram HXT motors).

tinycopter

Poor tinycopter.

Tinycopter has actually been remarkably reliable, though in various states of disrepair, since its last update in February. It doesn’t have much test video past that unfortunate first video because I would usually just fly it around without thinking about it. It’s been to several demo events since then, and is very stable and easy to fly.

One of the things I wanted to change about the design was the fact that the entire board was sitting on a giant block of memory foam. This seemed to be a great idea until the foam started disintegrating where I had glued it to the frame. I had to compensate by adding more CA glue, so eventually the foam became a stiff block in places. Usually you’d put just the IMU on foam or other shock-mounting substance. Another undesirable trait of the foam block was that if I crashed for any reason, the whole thing might shift angularly because one bundle of wires was pressing on a corner more, or something, the end result being that Tinycopter never really flies the same way twice. It was a bit unpredictable and the trim angles changed constantly.

Near the end of term, it was also starting to fall apart – the glue joint on the crossed Lincoln-log carbon fiber rod frame was coming apart, I had broken off one of the standoff landing legs, and one of the motors was temperamental. So I decided to rebuild the frame this past week and roll up all of the changes I wanted to make.

I decided to construct the frame using 3D printed joists for carbon fiber tubes (heeeeeeeeeey, that reminds me of something). The center cross piece holds the long tube and two short ones in an X shape, and allows me to clamp tightly on them with bolts. The outer ‘landing legs’ are intended to bolt through the motors’ mounting flange and use it as a giant meta-washer.

Here’s the frame fitted together, without any other hardware yet. I’m hoping this build isn’t going to be heavier than the current one – while the 3DP plastic adds a bit of weight, there are many other places on the current iteration which can afford to lose some. I ordered smaller (6A) controllers which will save a gram or two each, and alot of the big servo cable wiring will disappear, as will the chunk of dense foam.

Beginning the decommissioning of the old frame…

I decided to go for a more integrated wiring approach this time. Underneath the board is a ring of wiring that distributes battery voltage to the four controllers, with the control electronics in the middle. The IMU is now on a little block of foam (which has been made into a “foam flexure” through selective cutting, not really visible in the picture). It will be wired using tiny 30ga wirewrapping wire to further isolate it from vibrations.

Signal side wiring complete and board installed… See that there’s only one connector for each controller?

That’s why. I put the power and R/C signal wires next to eachother on a header so I can keep the wire lengths short and have one thing to plug in. The ESCs are of a much better form factor this time, and mount cleanly on the sides of the frame, secured with a zip tie through the board mounting standoff slots. The motor wires exit at the place they are needed.

I like this arrangement alot – pretty much only full integration of the ESCs onto the board is better for wiring cleanliness, but if I do that, then Tinycopter becomes a 5pcb.

And it’s back! Now with landing lights!

Besides accidentally wiring the motors up sideways (rotationally confusing which motor was which), I had to do relatively little tuning to get it flying again, since the hardware is pretty much the same. The gains were turned up some, since these ESCs appear to exhibit much better linearity than the previous ones.

Now to remember to take more video before I blow it up again – I’ve already succeeded in busting off all 4 landing leg things at least once each (but don’t worry, they are both gluable and easily remakeable!)

ballcopter?

I’m getting an urge to try this thing again. The previous attempts ended in dismal failurenearly a year ago (what actually happened at the end of that post was it not working at all and then biting Shane’s finger). These things are probably being mass produced by Sony now, or something, and have been built many times by other model hobbyists. But I still want to try my hand at it since I haven’t been able to produce a working one yet.

Since last year, I’ve figured out that my control approach was incorrect. I was trying to control the angle of tilt of the thing using the upper flaps. Really angle is controlled by the lower flaps and the upper set is used for translation. All flaps are used for rotation. It came to me that this was the proper method after I watched one of Ryan’s Giant 3D Foamies do a… I don’t know what you call it, but statically hover point straight up, like an airplane burnout – something planes should not be doing, but anyway.


Excuse the…uhhh…. bloodstain?

The ballcopter is exactly a small plane, flying straight up hard enough to offset its own weight, in a little hamster ball. Like how planes pitch up and down with the elevators on the tail, so ballcopters tilt and roll using their lower flaps. A ballcopter flying horizontally should reduce to the case of two orthogonal little planes.

I still have like 20 square feet of foamcore, so I might just go for trying the old design again with my New and Improved Control Solution. I’ve been recently more favoring carbon fiber hoops for a frame with 3D printed joists

and one more thing

No, that’s not actually a Cinestar 8.

Chibi-Everything, Part II: Copter

Apr 21, 2012 in Chibicopter, Project Build Reports

Poor Chibicopter.

So I’m proud to announce that I’ve found a solution to the XBee over-the-air code uploading problem. The only catch is that…


…it involves chopping an FTDI cable header onto the board.

Yeah, not groundbreaking or world-changing. But, at least I’ve gotten over my software-induced project fear stage and now have a workable, if slightly convoluted, procedure for uploading code and debugging! The hookup for the FTDI is essentially that of the Sparkfun Pro Mini, but instead of DTR I have RTS from the standard FTDI cable going into my reset isolation capacitor thing.

I really should have just done this like two weeks ago.

Anyways, here’s a picture of me triple wielding XBees in order to get this thing to work. The current signalling protocol is:

  • The Xbee connected to my transmitter (in bypass mode) is address 2, the XBee on Chibicopter is address 1, and my debugging/base station is address 0
  • XBee 2 only transmits to Xbee 1 (ATDL = 1 ATMY = 2)
  • Xbee 1 only transmits to Xbee 0 (ATDL = 0 ATMY = 1)
  • Xbee 0 transmits to the nonexistent XBee #3 (ATDL = 3 ATMY = 0) in order for its serial transmissions to not appear on the others
  • Therefore, my radio transmits commands to Chibicopter, which in turn transmits debugging data to the base station where it appears on my screen.

To reprogram Chibicopter, I remove the Xbee from Chibicopter, disengage the base station XBee adapter and jam the FTDI cable onto Chibicopter. I have to take the XBee onboard out first because there is no selection/domination circuitry which allows both XBee and FTDI cable to use the serial lines at the same time.

It’s quite an overloaded process, but it has at least gotten me to the point of…

…being able to finally read the pulsewidths from my radio. All four of the ones I care about. The Serial buffer reading code needed a bit of tweaking – I had to flush the serial receive buffer after every read or else it would desynchronize because more packets appear as the procedure was executing.

Sadly enough, there is no more Serial.flush() in Arduino 1.0, the functionality having been removed. I wondered why briefly before just writing a dumb serial buffer clearing loop.

Anyways, the good news is that I transferred enough core functionality over from tinycopter such that Chibicopter’s props respond properly to suddenly orientation changes! That means it’s just some tuning of gains away from actually flying.

The bad news is that through some irony of fate, two of the tiny 1S-lithium motor controllers have ceased to function. Just in time, right? I’m uncertain as to why they failed. One possible reason is that since the board has absolutely no logic power supply at all (everything running off the 3.something volt battery) that 5 volts from the FTDI cable was enough to destroy the weaker ones.

Now, I’m also wondering why it is that there is an option for 3.3v-compatible logic but with 5 volt VCC (power supply). If the point is to use it with a 3.3v system safely, isn’t this undesirable?

No matter – I have more spares on the way, but they’ll still take a few days to arrive. In the mean time, I might make a little pass-through board or something which down-regulates the 5v USB power to 3.3v.

and then it will fly I swear guys

 

 

Okay, Internet, tell me more about wireless bootloading.

Apr 09, 2012 in Chibicopter, Project Build Reports

One of my perennial bad electrical engineering habits is black-boxing electronics and software – not making much of an effort to understand how a (usually software) system works, just accepting that a solution is available and not extensively exploring it unless needed. Historically, I did this to electronic hardware too, coming from a more R/C hobbyist background (I don’t really consider the battlebots to be “robotics”) where things like “Receiver” and “Motor Controller” were considered atomic components as much as screws – they could not, and should not, be decomposed further. I’ve gotten a bit better at that, what with making entire motor controllers and all, but embedded programming is still one of my sour spots.

This is part of the reason why I like Arduino so much – it’s easy, reasonably well featured, and I don’t have to think about diddling registers and setting bits – 6.115 taught me to never do that again if I could avoid it – just to toggle an output pin. It makes the software experience just a little more like high level application programming, the kind I did before getting into hardware and actually all through high school (Did you know that I was CS before I was EE or ME?). Convenience is of the utmost importance, absolute code efficiency and running speed less so. Probably because I just haven’t done a complicated enough motor controller yet, or a flying thing with enough axes. Granted, I’ve also gotten slightly better at that, since there are just some things which are easier to do, like changing the PWM frequency of analogWrite(), by breezing through the manual and just doing the annoying bit shift thing, or enabling a regular interrupt so some part of my code runs with a fixed delta-time for control calculations. In summary, I favor trying and modifying existing solutions first in order to solve the high level problem of make thing work. Which is another great thing about Arduino and the general OSHW community – someone has probably done it already. Including build a smaller quadrotor, but that’s besides the point.

But I think I’ve reached the end of reasonable high level probing, because Chibicopter is not wanting to program wirelessly at all.

Here’s the rundown. I’m using the Adafruit Solution for wireless code uploading to the ATmega328-turned-arduino. There are some differences between my exact circuit and the “community solution” in this case – I’m running 3.0v logic power and my reset line is coming out of D6 instead of D3. The Little Purple Wire hacks are documented here. Otherwise, the level shifter/buffer circuit (which I feel isn’t really necessary) is the same, and for the first few attempts, the settings for my XBee Series 1 radios were also exactly the same as directed.

So here’s what’s been going on:

The Symptom: The remote reset always worked, but the program transmission itself has a success rate of maybe 5 to 10% at most. The most common symptom is hanging – the RSSI LED on the transmitting Xbee goes out, and the ‘Uploading” stage of the Arduino IDE never completes until it times out with an Out of Sync error. A few times, I’ve had programs make it all the way through and complete, but only once or twice, and then it becomes completely up to chance again. The successful attempts seemed to require uncorrelated “adjustments” such as exact location in room (possible radio bad spots or WiFi interference) and orientation of radio, which at such close range I find implausible to be the problem.

The fixes:

1. Complete hardware swap. I ordered more XBee Adapters because my one remaining unit was clearly showing reliability problems – I had to seat the XBee in the headers in a specific half-out fashion to get the power and associate LEDs to turn on, so to rule out the possibility of bad contacts or intermittent power, I made some new boards up. This did not result in any appreciable change in the operation – the vast majority of uploads still failed.

2. More radio power and XBee swap To test the interference theory, I borrowed Shane’s XBee Pro units which transmit at something like 150mW, which tends to outpower every 2.4ghz device around it. This did not affect the success rate of upload, but in this process one of my transmitting XBees was found out to be damaged. It was replaced with another of my radios (the one which had been handling LandBearShark’s load cell reading telemetry), to no appreciable change. I then borrowed two brand new radios, also to no appreciable difference.

3. Reduction to Tx/Rx only with stock XBee settings I removed the reset circuit’s digital I/O pin function so the pin did not toggle. The programming was then done just by hitting the reset button while uploading with only Tx and Rx active. This got me 2 or 3 consistent uploads (variations of Blink.ino), but after that, it once again become unreliable. I completely refreshed the settings a few times, changing only the baud rate to 57600 8-N-1.

4. Possible undervoltage operation problems The XBee is rated to operate between 2.8 and 3.5 volts. I’m running 3.0v, technically not really “3.3v”, so it could be that the XBee is being underpowered. Testing on real 3.3 volts provided by a bench power supply, using variations of Blink.ino only resulted in the discovery of the “uncorrelated adjustments” like Shane standing 5 feet to my left vs. next to my right, or using the back half of MITERS vs. the front, and turning my wireless LAN/Bluetooth off on my laptop vs. on. I do not believe any of those environmental factors are truly the cause of the problem.

5. Power Supply instability. Xbees, being high powered digital devices, draw current in bursts. I have very little 3.0v capacitance, so maybe little dips on the power supply was causing problems such as when the receiving end sent back start/stop flags. I piled a ridiculous amount of caps on the XBee pins directly during the above power supply runs, to no appreciable gain.

6. Trying a known working board. The 2.007 Nano carrier can wirelessly program using the “community solution” or using bone-stock settings on the XBees and manually pressing the reset button. This was demonstrated several times by Shane, but I could not get any of my hardware to reliably work with it either! This was eye opening, and pointed me to the fact that the problem may not lie with Chibicopter’s board. The full battery of tests – my Xbee adapter with both my radios and his radios, the XBee Pro, his own XBee USB dongle… none of them worked reliably if my computer was involved!

7. Messing with virtual COM port settings I tried the established solution (SET RTS ON CLOSE) with no other changes, changing the baud rate explicitly to 57600bps, and even installing a fresh, new FTDI cable to talk to the XBee adapter (thus installing an entirely new virtual COM with no possible previous changes). While the latter change appeared to result in success (4 reliable uploads), it stopped being reliable again thereafter. So promising ;-;

8. Literally trying wires. Hooking up transmitting TX to receiving RX, and vice versa, with GND bridged. This was literally plugging wires in and out of XBee sockets, and it worked without issue every time. This means the issue lies strictly between how the XBees interact with my computer and with eachother – once I literally bridged the connection, there were no communication problems.

Possible explanations we gathered:

1. Some hardware level difference between computers. While this seems to be a stretch, Shane’s Dell notebook can program Chibicopter with much higher reliability such that the random interference, voltage dip, and noise explanations begin to be plausible, and the Nano carrier essentially flawlessly. My HP DV7 can do neither. I’m not up to date on integrated computer peripheral hardware, but I do want to try the exact same parts on a Macbook – if it works on a Mac, then that would explain why there are so few complaints about it, given the Arduino and OSHW community demographic…

2. I am actually missing something very fundamental and stupid. Given that the uploads are so reliably unreliable, this seems almost like the most plausible explanation. Did I really forget to ground something? Are my traces actually soldered? They must be, because I can definitely program the damn thing over 3 wire serial! Are my XBees just cancerous? They’re both  Series 1 whip antenna types with the latest 10ED firmware now.

I’m willing to rerun some of the tests and provide more verbose error message logs, as well as COM port settings and XBee settings. But what the ass?

 

 

 

 

 

 

Chibicopter: It’s Reached “That Stage”

Mar 29, 2012 in Chibicopter, Project Build Reports

…you know, the stage of all my projects where they become stuck in software hell.

For Chibicopter, oddly enough, it’s not been the actual operation code which has stumped me, but the process of getting it there. As previously described, Chibicopter’s only means of code uploading after the ATMega328 has been turned into an Arduino is through wireless bootloading. This has been done successfully many times. In the Chibicopter board schematic, I included components intended to use the Adafruit Method, and a similar arrangement is used on the Gravitech XBee shield for the Arduino nano and on the 2.007 Nano carrier. So it’s gotta be pretty bulletproof, right?

Well, kind of. Here’s how shit went down.

First off, I had to make one last wire jump for everything to stand a chance of working. The reason is because I connected the RTS pin of the FTDI cable (through the wonderful Adafruit XBee adapter) to DIO8 on the XBees:

(Don’t mind where it says “DIO12″ – that’s because Sparkfun’s XBee footprint is weird, or something – it’s actually DIO8 according to the manual)

I chose DIO8 instead of DIO3, the usual choice, because it was much closer to the appropriate pins of the ATMega based on component placement. It would have been less of a topological acid trip to route the trace there. The only problem with choosing DIO8? It’s not a thing. As in, DIO8 turned out to be only DI8 when I tried to configure it in X-CTU.

Hmm. Well that’s disappointing. Wire jump time:

I performed a Little Purple Wire jump, after cutting the DI8 trace, to DIO6 across the other side. Conveniently DIO6 was also the XBee’s default RTS pin. However, in the interest of following instructions for now, I configured the pin as standard digital input (on the transmtiter side) and a default-high digital output (on the receiver side). Now, I’m assuming there’s pretty much no difference at this point between setting it as instructed or setting both sides to “RTS FLOW CONTROL” for this pin, but I could be wrong.

The fix was promising at first – I could upload blink programs of various durations with no problems through Arduino, getting to the “Done Uploading” stage every time. But as soon as I tried uploading a bigger program, it would quit – usually after only a few seconds (short enough to transmit a blink program, but nothing much else). The activity LED would turn off, whereas if it were transmitting, it would be on pretty solidly.

Scoping the TX/RX pins and the DIO pin associated showed that the reset pulse was making it through (as my hack D13 LED did flash) and at least something program-like was being transmitted. However, it would randomly shut off, and the process would abort with avrdude-in-Arduino complaining that the programmer was out of sync.

I thought it might have been a mild baud rate mismatch problem (and still suspect it to some degree), so I hardwired Tx and Rx straight to eachother on the XBee adapter board:

Of course this arrangement worked. The blame now lay square with the XBee, and at Shane’s behest, I reset both XBees to factory default, wiping every setting I might have changed, and then changed things back exactly as instructed. (The transmitting one came out of the defunct RazErblades glove controller and the receiving side came out of…. hell if I know where)

It worked.

But only sporadically. I’m in a position now where some uploads will complete, some will totally fail within the first few seconds, and others will seemingly fail and cause Arduino to wait forever in the “Uploading…” stage until finally terminating, usually a full minute later, with an out of sync error.

Weeeeird. Well, at least I can upload some code:

I’ve since balanced the propellers much better (the whole thing doesn’t really resonate any more, though it’s still not in perfect balance) and have cut and paste enough code from Pololu’s MinIMU9 library to read all the sensors and process them. I’m not sure how you’re supposed to use their library, by the way, so I just copied and pasted the important I2C register-setting code from it and never looked back. Are you supposed to… instantiate a new instance of each sensor or something? It didn’t compile in Arduino 1.0, and the provided AHRS code was of little help since it had such lovely high level functions such as “Read_Gyro();” without explanation of where they came from, and which I couldn’t located in all the linked .h files anyway.

Anyways, Chibicopter is some more code and tuning away from flying, which is to say it will probably sit in a box for the next few weeks. If anyone from the Arduino hacker community has any idea why my code uploads are spotty, I am open to suggestions. My number one suspicion is still the 57.6Kbps baud rate mismatch now that other inconsistencies have been eliminated.

The next step is to revive XBYPASS and glue it back to my transmitter since for some reason I decided on making this thing talk over wireless serial. That step, however, has been done before. Wow, finally a legitimate use for XBYPASS that is not trolling the anti-Arduino crowd?!

Also,