Jack Crossfire's blog View Details
Archive for January, 2008
Posted by Jack Crossfire | Jan 31, 2008 @ 01:58 PM | 5,491 Views
Well, the BEC handles the HS-65's easily. The inductor still gets hot, but not even close to the LM7805. Took 2 hours to fit the BEC on the main board & rebuild everything and then it was time to start driving back to Silicon Valley.

PWM constants were rewritten to try to reduce jitter. Another round of engine mode tests is required. Then the IMU has to be calibrated because yaw is now 100% software.

Getting both stable placement & cushioning for the IMU seems impossible on a Taiwannosaurus. There's not enough room for foam like there was on the Corona....Continue Reading
Posted by Jack Crossfire | Jan 30, 2008 @ 04:33 PM | 5,675 Views
Well the local guy had the Jesus BEC for $22 + tax so the choice was easy. Despite being 1/2" thick, it really is tiny compared to the other options. The servo connector shown is not enough for the rated current. Probably need to pile it on the main board.

In other news, Russian Heroine moved on. She started getting more reticent around when her new car arrived in November and finally decided it was over on Sunday. In an area like Rain Ramon with 3 men for every heroine, U can't live for emotional support. After an adjustment phase, our full attention should be back on machines.
Posted by Jack Crossfire | Jan 30, 2008 @ 03:04 AM | 6,293 Views
So metal gears arrived after only 2 days. Unfortunately, the same story from 1/20/08 happened. Clearly the metal gears needed more current and the LM7805 promptly heated over 200F once the servos started moving. Then it just shuts down and we lose servo authority. Another point in favor of the pilot on the 1/23 crash.

Now alternatives are $25 for a commercial BEC, plug it into the BL-35X ESC, get a separate battery, build a buck converter, or just write blogs about it. Remember what happened the last time we used an ESC for servo power.

According to this story the HS-65's need up to 1.3A so that's 6A, almost as much as a second rotor. At least Hillary's not flying it.

Ultimate BEC 4 U:

HS-65 metal weight: 10.1g
HS-65 karbonite weight: 9.3g

Should be noted our boss 2 bosses ago spent a year trying to get buck converters to work. They never did really work, and then he quit....Continue Reading
Posted by Jack Crossfire | Jan 29, 2008 @ 01:59 PM | 5,964 Views
With Vicaglider's GPS going at 4Hz, the PWM resolution dropped to 18usec. U can see the effect.

Servo jitter at 18usec resolution (0 min 10 sec)

That's why we only soldered 1 servo header. A small, second PIC for PWM looks almost certain. Another trick is seeding PWM calls throughout the main loop but that never worked well.

Endless rain & Vicacopter downtime has us leaning towards sooner Vicaglider acquisitions.
Posted by Jack Crossfire | Jan 28, 2008 @ 02:20 PM | 5,497 Views
For Vicacopter, decided to assume any current GPS position is worthless & start hard coding the altitude waypoint in absolute coordinates. Then, under autopilot it should gravitate towards the hard coded point as GPS improves instead of flying away because the point U thought it was reading was really wrong.

Found the conversion from LLH to meters was wrong. Derived a new one by plotting points in Google maps. That may have been the root of our west pointing malfunctions. The conversion just scales latitude & longitude. U have to recalibrate if U ever leave Calif*, probably never going to happen.

Software yaw stabilizing is a bit harder. U need to get a center stick position & a second yaw PID loop for manual mode....Continue Reading
Posted by Jack Crossfire | Jan 27, 2008 @ 04:23 AM | 5,658 Views
For assembly language hints, go to http://www.rentron.com/Myke8.htm
Obviously not used much since 1999.

So far the expanded Vicacopter assembly language seems to be working. It does the common Vicacopter sections at 70khz while the C port only did 16khz. With GPS parsing at 4Hz, it drops to 55khz.

To save clockcycles, probably going to leave navigation units in the uBlox's binary format throughout the program. Running out of things to do on Vicaglider without buying the expensive stuff. Going to be quite a hassle to swap in Vicacopter's Xbee.

Another possibility is a small, second PIC specifically for either software UART or PWM. Note the 4 PWM outputs on the PIC are for driving an H bridge. They don't have independant duty cycle.

For Vicaglider the extra weight wouldn't be a problem. Her main processor could go back to C and do sort of the Gumstix role on Vicacopter.

Disadvantage: more complex, more expensive, less Vicacopter reuse.

Now for a Gootube demo of servo jitter with the Vicaglider loop at 70khz. We have 1 servo for testing PWM.

Servo jitter at 14usec resolution (0 min 11 sec)

Posted by Jack Crossfire | Jan 25, 2008 @ 01:36 PM | 5,841 Views
Well, another fight with SDCC and we've decided C for PIC isn't happening. It isn't fast enough to power 2 software UARTS. The best route is to expand Vicacopter's existing assembly for Vicaglider. The instructions are robust enough to address 256 bytes of additional variables without a huge disaster but it's definitely no picnic.

Happen to also have a 16Mhz AT90USB Key which was $32 2 years ago. But, the goal was to use as many spare Vicacopter parts as possible and PIC's R still produced on a massive scale.

Unfortunately the 44 pin package used in Vicacopter is no longer made. Once the stock of 44 pin PIC's runs out, going to require a new board with a new socket.
Posted by Jack Crossfire | Jan 24, 2008 @ 02:05 PM | 5,775 Views
Well, it's official. It really costs $60 to crash the Taiwannosaurus. Our first bill is metal gears for all the HS-65's. Got karbonite because that was all anyone had, and now they're all stripped. Even with metal gears, the days of cheap crashes R clearly over. That wasn't even a hard crash.

Suspect the gears failed in flight and caused the apparent yaw control loss when it was really cyclic going.

Found no slippage in the tail rotor. It only has 1 grub screw. The only explanation is now excessively low head speed + lack of a heading hold gyro. Low head speed for longer flight time is a goal of Vicacopter's, but we're just trying to get off the ground for now.

The grounding of Vicacopter due to crashes & weather still pushes Vicaglider forward.

To set the starting function to 0x0200 with multiple objects:

Add --ivt-loc=0x0200 to the CFLAGS to set the interrupt vector at 0x0200.

Declare main as void main() __interrupt 0 to bind it to the RESET vector.

Todays SDCC discoveries: --optimize-df --optimize-goto --optimize-cmp --obanksel=2

Unfortunately, a proper C port was not fast enough for software UART. The only way to do it is to make every variable global & declare all functions as __naked. That eliminates the stack on SDCC.
Posted by Jack Crossfire | Jan 23, 2008 @ 05:30 PM | 5,663 Views
Had a few seconds of dry weather before commuting for a test flight. The Align motor & 13deg collective got her moving quite nicely, if not pointing in the same direction easily. Then came an irreversable yaw, pitch up & crash. Seems the tail rotor died completely. All roads lead to tightening the very inaccessible grub screws.

That flight should have produced enough data to make a throttle curve. Have decided test flights in maximum collective + stick throttle R the best way to make throttle curves.

Cyclic does not have enough authority either. Time to get rid of the flybar weights.
Posted by Jack Crossfire | Jan 23, 2008 @ 05:21 AM | 6,024 Views
So every year from Feb-April, a cutoff low forms over the Farallon islands and spins clouds at Rain Ramon. The clouds hit the East bay hills and turn into constant drizzle, day & night.

This year, considering moving some test flights near the day job. Silicon valley doesn't have the rain that Rain Ramon has, but it's super windy.

Speaking of cutoff lows, had more engine tests in the dumpy apartment. Obviously, the engine didn't cutoff during transmitter shutdown, the undervolt detection doesn't work, the analog values shoot up, and Taiwan blades R much more fragile than Corona blades.

Fortunately, in any normal situation, the transmitter won't be shut off unless idle-up is in cutoff mode or the throttle stick is all the way down. The ESC doesn't instantly go out of control.

Just unplugging the xbee showed that engine cutoff was working.
Now video of the engine cutoff tests + footage of how far over the tail rotor is to get any effectiveness.

engine cutoff tests + tail rotor deflection (2 min 25 sec)

In other news, Vicaglider was created exactly for Calif*'s brutal rainy season. Bootloader upgrade & build system complete. She's much faster to program than Vicacopter but takes a handfull of wires. Now for you SDCC gamers:

To compile source files:
sdcc -mpic16 -p18f458 -Dpic18f458 -I/root/sdcc/share/sdcc/include/pic16/ -c pic_main.c -o pic_main.o

To link object files into a .hex file:
sdcc -mpic16 -p18f458 -Dpic18f458 -I/root/sdcc/share/sdcc/include/pic16/ --no-crt -Wl -s,linker.lkr -o pic_main.hex pic_main.o

main must be the first function in the first object.

U need a linker script with the page region set to the desired start byte:

Our bootloader starts at 0x200.
Posted by Jack Crossfire | Jan 22, 2008 @ 02:16 AM | 6,218 Views
Managed to get the RCE-BL35X to cut off. Its minimum duty cycle is 0x0880 and there's no lost signal detection. The Phoenix 45 would cut off at 0x0700.

Overclocked the collective and managed to get her light on the skids without full RPM. Still wouldn't expect the Mega to be any match.

Still no improvement in the tail rotor. A few more servo nudges and we'll have to move to bigger axles.

No more flight tests R possible this week. Don't have the confidence to put her in rain yet.
Posted by Jack Crossfire | Jan 21, 2008 @ 12:13 AM | 5,854 Views
Well, it has become quite clear that the Mega doesn't have enough RPM to do the job. More notably, there isn't enough tail rotor authority. The tail rotor problem can be solved in software but it should be more effective.

Through translational lift & collective overclocking, got her in the air, but the tail control was hopeless.

Discovered the minimum throttle must be way above minimum or the motor won't stop immediately in the failsafe modes. It always shut down, but it took 3 seconds longer when throttle was completely cut off.

A 3rd idle-up mode for debugging throttle was useless. It was easier to calibrate the throttle curve by plugging in numbers until she had enough RPM to take off. For the Mega, that was 100%. Also, it was too hard to hit engine kill with 3 positions.

The Taiwannosaurus has much more stable orientation than the Corona and much less stable position. It doesn't automatically slow down like the Corona did.

Now we have Vicacopter II's first revolutions at Corona speed, followed by maximum speed on the Mega 16/15/4, followed by blade tracking.

Vicacopter II's first revolutions (2 min 31 sec)

Posted by Jack Crossfire | Jan 20, 2008 @ 06:26 AM | 6,013 Views
Finally integrated all the electronics on Vicacopter II. Found 5.3mm carbon fiber rods suitable for skid replacement in Milpitas. Decided removing board material was the only way to make it fit. The electronics tray is now much lighter, but more heatsinks have weighed down the circuit.

electronoics tray: 21g

Found the LM7805 needs a heatsink to power 4 servos. Without it, it shuts down when it hits 160F. Then, the GWS loses calibration and the tail servo goes crazy.

Currently the IMU is velcroed on, but it's going to sag over time. Didn't have enough room under the GPS for it. She's so nose heavy, we may have a table under the tail boom eventually.

Software CCPM seems to be working. Have a video of it. Still running tests ahead of the first motor spool up.

ccpm up close (1 min 50 sec)

Posted by Jack Crossfire | Jan 18, 2008 @ 04:44 AM | 6,278 Views
After Helicopter Ben's latest speech, was convinced Americans will never protest a sudden loss of free will & currency value, but they still might protest skids that R too small.

After staring at the problem between commutes, decided first of all, the electronics tray is too shallow. There's no way to slide out the board. Secondly, the Tyrannosaurus skids must go.

They need to have holes drilled & bolts attaching the main board, maybe eliminating the need to slide out the board. They could also handle the LED wires.

There doesn't seem 2 B a supply of aluminum suitable for replacing the skids.
Posted by Jack Crossfire | Jan 17, 2008 @ 02:31 PM | 6,268 Views
Well, reviewing the number of things which need to happen, Vicacopter II probably won't see sky until February.

Never used a proper transmitter, but decided a 3 way idle up switch would be required.

- automated spool up & flight rpm
- engine cutoff & stick collective
- autorotation practice & crashes
- fixed negative pitch & stick throttle
- software tests

Attaching lighting & camera power is a problem. The light cables R too long & there is no metal to attach the regulator to.
Posted by Jack Crossfire | Jan 16, 2008 @ 01:42 PM | 5,871 Views
We have a decision with the electronics mounting. Forward moving landings R going to be a bitch but sideways moving landings should be easier.
Posted by Jack Crossfire | Jan 15, 2008 @ 01:52 PM | 5,802 Views
So after 4 hours of fighting with microscopic rods, pieces of plastic smaller than a grain of rice, & useless instructions, it was time to drive back to Silicon Valley. In the meantime, Vicacopter II loves to strip. All the grub screws & some of the bolts stripped.

The gorilla proved worthless. Probably need the small allen wrenches to avoid stripping. Forget about titanium allen wrenches.

MapAmps stopped selling the 3.3Ah packs. That was the optimum size for the Corona. Looks like dual packs R a better route these days.
Posted by Jack Crossfire | Jan 14, 2008 @ 05:01 PM | 5,877 Views
So moved the common parts of Vicacopter's PIC code to C for Vicaglider, using SDCC as the compiler. The complete Vicacopter code is 2940 bytes in assembly. The common sections alone went to 7600 bytes in C. Inefficient translation of C has always destroyed PICs.

It's probably too slow in C, so that ends any more Vicaglider until test hardware exists. Vicaglider is history until we recover the cost from...

Vicacopter II's airframe arrived after 10 days, complete with smashed canopy. The Align 430XL motor is probably too small to do the job, so we'll be studying governor mode on the old Phoenix 45.
Posted by Jack Crossfire | Jan 13, 2008 @ 01:40 AM | 6,349 Views
So SheCharger abandonned quick charging, lost her MOSFETS, thermistors, & heatsinks. She now supplies constant 0.05C to 5 D slots & 11 AA slots. No more applications require quick charging NiMH. Her biggest problem was the analog levels changed depending on the number of batteries being charged so she couldn't tell what batteries were connected. Now she charges full time and the LEDs are decorative.

Now thinking of starting the fixed wing phase sooner, since copters R going to have lots of downtime. Components & current prices for the fixed wing phase

Single IDG300 for roll & pitch.                 Free
ADXL330 for gyro drift.                         $35
uBlox for heading, speed & position             Free
XBee communication                              $32
Easystar airframe                               $60
PIC18F                                             Free
Prototyping                                     $20
Motor + ESC                                  Free
Shipping                                        $30

The goal: single chip autopilot to reach high altitude, long duration, long distance, take a picture, & return.
The plan: upgrade PIC bootloader to flash a complete autopilot from the serial port. Single chip autopilot firmware in C. Board bringup before airframe purchase.