Tuesday, December 30, 2008

This is how I roll...

I printed a plastic wheel hub and wheel molds with integrated funnel. If you want to make custom wheels like these you need to cast them using mold rubber. They have a variety of rubbers you can use to get tackier or more durable wheels.

More information about the casting process and how to use it is available on Smooth-On's website. The resin casting plastic is also very interesting for custom robot parts.

Interesting Actuator Design

It uses a small electromagent coil to twist the rare earth magnet with a linkage or end effector attached. In the video it is being used for a micro-aircraft rudder.

The direction of the current will determine which direction it will rotate while the magnitude of current and the field strength of the rare earth magnet will determine the torque.

HyperPhysics has all the equations you could ever need to determine the required size and shape of the coil and magnet.

Tuesday, December 23, 2008

Smooth 3D Printing

Stratasys has developed a new smoothing station for smoothing the surface of 3D printed parts. This looks like it will produce better results than using acetone or sanding and coating with clear spray enamel. On the downside it looks like it requires compressed air and an air exhaust system so you don't die of industrial solvents. The MSDS as usual is scary and suggests that you do not want to be near this stuff without a respirator. Also, the dimensional accuracy of the smoothed parts is currently unspecified. On the other hand, smooth parts are pretty awesome.

Thursday, December 18, 2008

Cool Tool: Last Chance for Holiday Presents

Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime. Give a man tools and he will make a robot to fish for himself. Tools really are the best possible presents.

  1. Brass Sponge
    Never forget to wet your sponge again.
  2. "Smart" Tweezers
    For when you have a pile of surface mount capacitors, all alike, all different.
  3. PCB "Fab-in-a-Box" *
    The best thing for making PCBs other than having lots of money.
  4. Calipers *
    These are the calipers I use, except the face of mine is cracked because I dropped it but it still works.
  5. Screw Chek'R *
    If you ever need to deal with screws this is an invaluable tool.
  6. Weller WES51 Analog Soldering Station *
    This is what I use to solder 0603 and smaller surface mount parts.
  7. microscope
    For surface mount soldering you want something like this... I dont know anything about this seller, do not blame me...
  8. Xacto Black Gripster Knife *
    I like this knife for detail work as I feel less likely to cut myself.
  9. Taig or Sherline CNC Mill
    I have used the Taig and I assume that the Sherline is just as good.
  10. Logic Analyzer
    I am still using an ancient Tektronix logic analyzer but one day I will get a USB logic analyzer.

* = I already bought this for myself.

Wednesday, December 17, 2008

Crash Test: Basic Kalman Filter

Crash Test: We have liftoff!

Here is the video of semi-autonomous flight testing. Since, the GPS is not working yet due to interfacing issues between 3.3V and 5V power, the horizontal motion is not controlled by the flight computer.

Tuesday, December 16, 2008

Crash Test: Ready for launch

More videos later tonight tomorrow.

Sunday, December 14, 2008

Crash Test: Guidance is internal

PID Control system is up and running with data from the inertial navigation system. Autonomous flight videos should be up later this week.

Saturday, December 13, 2008

dsPIC Testing

I wonder if the blue LED is bright enough...

Friday, December 12, 2008

Cool Tool: PCB "Fab-In-A-Box"

So I broke down and bought myself a present, and while the system is by no means fool proof, the PCB "Fab-In-A-Box" from Pulsar ProFX is the solution to making PCB boards you may have been looking for, if you wanted to make PCB boards.

The process is pretty quick and low effort, however there are a few tips.
0) Just buy the laminator, once you know it works you will want to make a lot of boards so using an iron will quickly become annoying. They also offer a money back guarantee, which I did not need to use, but I assume works since their product works. So they probably never have to return any money. I would have been frustrated if I did not get the laminator and would say it is critical to making the system work.
1) Get gloves
2) Get tweezers or tongs to grab the circuit board out of the ferric chloride.
3) Buy three easy to open airtight plastic containers with a flat bottom big enough for your boards, use one for water, one for ferric chloride, and one for acetone.
4) Do not attempt to make a circuit board without verifying the orientation, I strongly suggest putting words on the copper layer somewhere in your ground plane.
5) In the instructions it instructs you to leave 2" of Green Toner Reactive Foil but does not explain why, so you might be tempted to try to economize. The length of 2 inches is required to slide it into the laminator and hold the foil tightly to remove wrinkles.
6) Clear Scotch Tape worked better then regular masking tape at removing extra green TRF debris.
7) Cover the board in acetone and agitate for a few seconds until the green layer starts to separate, before scrubbing.

I also tried using the proper tooling for milling PCBs, however the CNC Mill I was using is just slightly out of level enough to make the results useless. Also, milling a PCB takes hours, even for a small one.

Using the PCB "Fab-In-A-Box", I was able to produce a circuit board with 8mil traces in about 30-40 minutes. I was able to verify good results using a microscope for one of my tests, the other test had process issues due to my attempts to use less Green TRF than was suggested.


Actually works
Chemical mess is minimal and containable
Less then 8mil traces, The vendor shows examples of 6mil traces
Fast results

No solder mask
Only 1/2 Oz. Copper Pour is recommended 1 Oz Copper is the maximum.
The recommended board is .032” thick so it lacks some of the typical stiffness one would expect from a PCB so it cannot be used as a structural element. Tested with 0.064" boards. You need to give it a little push but it seems to work fine.

While the board thickness and copper thickness are of interest to those who are working with power or antennas, for the most part this system is unbeatable and I am glad I spent the money on it.

Total cost was under $150 without shipping. I bought mine from Digi-Key to save on shipping.

I'll post a video of the process in the next week or two.

Thursday, December 11, 2008

PPM Signaling

So it turns out the Draganflyer actually uses PPM Signaling which is actually much easier to generate with a microcontroller.

Wednesday, December 10, 2008

12Bit Servo Controller

PIC Microcontroller Code Fragments

Clock shown as pin 2 on JP2 is connected to B7 on the PIC and Reset on pin 3 is connected to C1 on the PIC

Global Variables

// Number of servos
// Due to timing limitations you can really only use 9 servos with a 4017
#define SERVOCOUNT 5
// This is 65536 minus number of clock ticks in 1 ms plus or minus a fudge factor
// This was determined using an oscilloscope
#define SERVOBASE 55067
// This union allows access to the servo timing as an integer and as two bytes
// This makes the interrupt code faster and the whole thing more stable
union ServoTimers
unsigned int position;
unsigned char byte[2];
} servotimer[SERVOCOUNT];
// This is the 12 bit servo value 0=>1ms 2048=>1.5ms 4096=>2ms
unsigned int servo[SERVOCOUNT];
// Servo trims can be used to align the center position of the servo a small ammount
signed int servotrim[SERVOCOUNT];
// Counter for sending the servo signals sequentially
unsigned char currentservo;
// Used to track the state of the Reset signal
BOOL servoReset;
// Used for pulsing the Clock signal
BOOL servoOn;

Interrupt Code
void HighPriorityISR()
// If Timer0 Interrupt is Flagged
if (INTCONbits.TMR0IF) {
// Reset Interrupt Flag
INTCONbits.TMR0IF = 0;
// If the servo has been reset hold C1 low for almost 20ms
if (servoReset) {
servoReset = 0;
TMR0H = 0xF8;
TMR0L = 0xAF;
LATCbits.LATC1 = 0;
// Otherwise bring Reset/C1 high briefly and start clocking
// servo data out via Timer 3
} else {
servoReset = 1;
TMR0H = 0xFF;
TMR0L = 0xF0;
TMR3H = 0xFF;
TMR3L = 0xF0;
LATCbits.LATC1 = 1;
if (PIR2bits.TMR3IF) {
PIR2bits.TMR3IF = 0;
// For each servo pulse set Clock/B7 high momentarily
// then hold B7 low for the current servos desired pulse width
if (currentservo < SERVOCOUNT) {
if (servoOn) {
TMR3H = servotimer[currentservo].byte[1];
TMR3L = servotimer[currentservo].byte[0];
LATBbits.LATB7 = 0;
servoOn = FALSE;
} else {
TMR3H = 0xFF;
TMR3L = 0xF0;
LATBbits.LATB7 = 1;
servoOn = TRUE;
// Otherwise dont call this interrupt for a while
} else {
TMR3H = 0x00;
TMR3L = 0x00;
LATBbits.LATB7 = 0;
servoOn = FALSE;

Servo Control Functions

void ServoInit(void)
int i;
servoReset = FALSE;
servoOn = FALSE;
// Center all servos and zero all trims
for (i=0; i<SERVOCOUNT; i++) {
servo[i] = 2048;
// UpdateServos must be called after servo[i] or servotrim[i] is modified
currentservo = 0;

void UpdateServos(void) {
int i;

// Convert each 12 bit servo position into interrupt timing
// The maximum time for an interrupt to overflow and trigger
// with a given prescaler and clock is with TMRxH and TMRxL
// set to 0, a timer setting of 0xFFFE will trigger the interrupt instantly
for (i=0; i < SERVOCOUNT; i++) {
servotimer[i].position = SERVOBASE - (3*servo[i]) + servotrim[i];

This setup allows the servos to be positioned with 12bit resolution.
servo[0] = 0 => 1ms => Left
servo[0] = 2048 => 1.5ms => Center
servo[0] = 4095 => 2ms => Right

The trim control is done independently of the servo position setting and does not effect the positional resolution. The actual resolution will vary between different manufacturers and models and this controller unfortunately does not work with the Draganflyer.

Tuesday, December 9, 2008

Crash Test:: Progress in the face of adversity

It turns out I didn't fry the diode.

After some advice troubleshooting, it turns out that I burned out one of the traces.

After desoldering and scraping it clean, copper foil tape is cut to size and applied to the damaged area.

Resoldering the copper tape helps ensure conductivity.

Reassembled and successfully tested.

This post was brought to you by 3M, the makers of electrical tape.

Crash Test: Flight testing & Servo Problems

The servo controller was glitching due to interrupt problems.
I should have known better, but I have learned my lesson and will not use WriteTimer3 inside an interrupt ever again.

Sunday, December 7, 2008

Circuit Board Milling Attempts

Today various experiments were made to produce circuit boards, and many of them failed.

Interesting lessons; nail polish does not work as a solder mask, I hate soldering without a solder mask, and if you plan ahead getting boards printed is cheap. I would probably not try this again unless someone can explain what exactly I did wrong.

Cool Tool: USB to RS232 TTL

In some ways I might be sad to see the serial port go, but I have to say this USB to RS232 3.3V TTL 5 volt tolerant cable looks pretty awesome.

Also, let me add my serial port haiku

I type plus plus plus
then I type eh tee haych zero
I hate serial

Friday, December 5, 2008

Milling Carbon Fiber

Milling custom carbon fiber robot parts is possible if you have the proper safety equipment and tools. While carbon fiber dust has not yet been proven to be carcinogenic, its safe to assume that you do not want to inhale it or get it in your eyes, so both eye protection and a respirator are required.

A CNC mill and a bur were used to route the carbon fiber parts. While cutting, the carbon fiber is kept wet with lubricant to prevent dust formation while being vacuumed. A speed of 10000 RPM and a feed rate of 50 mm/min were used with good results on a plate 0.059" thick. The edges were finished with wet sandpaper to prevent injury due to splinters.

Thursday, December 4, 2008

Crash Test: Electronic Parts

Wednesday, December 3, 2008

Tuesday, December 2, 2008

PCB Milling Test

A 30 Degree Conical Burr was used as the cutting tool mounted in a CNC mill to cut a copper clad board.

The cutting path produced is approximately 0.5mm wide, so it should be possible to produce layouts for SOIC and other surface mount footprints. Smaller separation between pads may be possible as the 1oz copper pour is only about 1.4 mils thick.

Canned air worked fairly well to remove the copper debris from where the path was cut and this looks like an interesting calculator for PCB trace widths.

Tomorrow's experiment will be to manufacture an actual circuit board and to test how well nail polish acts as a solder mask.

Monday, December 1, 2008

Weekend Round-up

Interesting Personal Pages

While I am not sure I like the name physical computing, I do like the idea of making the job of programming embedded systems easier.

Tomorrow's project is to figure this out.

Here is a great quote.

Jewelry and Metalworking store in NYC