Tuesday 13 November 2007

Disaster recovery

I am pleased to say HydraRaptor is now back up and running after my accident where I connected 240V to a 3.3V logic input. I had to replace most of the electronics, which is annoying because I originally made it out of things I already had, so it cost me nothing, but replacement parts cost me around £180 and obtaining them set me back three weeks.

Things that were destroyed:
  • My ADSL router: a friend kindly gave me a replacement.

  • My PC's serial port: I replaced it with a USB to serial adapter.

  • The Freescale DEMO9S12NE64 evaluation board that I used for my axis controller: next day delivery from Farnell.

  • The EZ430-T2012 eval board that I used for the extruder controller, fortunately the spindle controller was not connected at the time so that survived.

  • The ULN2803 and 7407 chips on my interface board.

  • The optical shaft encoder chip on my extruder.

  • The NEAT MDM7 stepper driver on the X axis. The only thing wrong with it was the direction input was not working. They are opto coupled so it should have been just a simple matter of replacing the opto, but the whole thing is potted in epoxy resin so it is impossible to fix. I managed to find a replacement on the web and I have got some spares on the way as well.

Things that survived:
  • Both power supplies and all the local voltage regulators.

  • The Y axis stepper driver.
  • The X-Y table shaft encoders and Hall effect limit switches.

  • The protected MOSFETs on the extruder controller.

I spent the time waiting for the stepper controller to arrive from the US improving my firmware. I fixed a long standing issue with timing: I was doing my Ethernet comms under interrupt and the stepper motor timing with a higher priority timer interrupt. Unfortunately, the 9S12 does not have nested interrupts, so the interrupt priority is pretty meaningless. I fixed it by moving my comms to the foreground as the machine has nothing else to do in the foreground but process commands coming from the network so there was no point in doing it with interrupts.

I also added acceleration and deceleration to my stepper driving software. I am aiming to lay down 0.25mm filament at 64mm/s. My XY table can easily move that fast but I didn't like the thump I was getting when it started and stopped. It's a bit much to ask it to accelerate a few kilograms to 64mm/s instantly! The datagram for the goto_xyz command now includes a table of delays to use for the first and last n steps. It remains to be seen how much distortion I will get from not moving at constant velocity. At the very least the acceleration will be useful in speeding up the moves when it is not extruding.