Considering the design of the machine, I have had very few problems with the Picaxe Micro.
There are large electromagnet coils spaced around the rotor, with quite long connection cables. PWM is used to supply the power to the motor, and spikes can be seen on most cables.
As at July 2014 all guide wheels have been tested for operation with the rotor locked, and all seem to work as expected. However, when the rotor is powered up, all six guide wheels are retracting spontaneously at a rotor speed of only about 1mps. All are starting within a few seconds of each other. With the pic disconnected from the motor, the oscilloscope shows that the pin, B.6, is switching on and staying on at the correct voltage. But with the pic also connected to the debug screen, it shows that the pin to the motor, B.6, is switched off as it should be at that part of the program. It does appear that the program is working correctly, and the PWM spikes from the motor are switching these micros on.
I have tried fitting more capacitors, and tying all pic pins ground with 100k resistors, with no improvement. I have tried fitting the pic board into a diecast box to protect it from interference. This also made no improvement, but actually destroyed the pic. (This may have been made worse because an LED was connected to the output, forcing the micro to supply about 20mA, where previously the output had powered a transistor and would have drawn very little current.) Pin B.6 stays on even with power disconnected from the board. The only source of power being 2 input pins. I have had no previous problems with any pic on the machine, but all of the others have been positioned in behind the array of stationary ferrite magnets. The guide wheel pics are offset and are in direct line of sight with the moving array of RE magnets on the rotor, and are placed at a distance ranging from 200mm to 250mm of these magnets.
I will begin the process of relocating the pic boards as time permits.
http://www.picaxeforum.co.uk/showthread.php?8890-Picaxe-and-magnetic-fields
tells us that the picaxe is no more susceptible to magnetic fields than any other IC. The main problems could be rapidly changing fields or close proximity to RE magnets. The PWM switching of the coils should affect all the micros if it is going to affect any, but is affecting only the Guide Wheel micros.
Have now relocated all guide wheel control boxes into similar positions occupied by other micros.
No improvement.
Things to try.
1 Add more shielding to to coil interconnecting cables. (Using TV antenna cable copper braid.) No change
2 The kill switch circuit seems to have the largest spike on the 12v aux cable. The switch enables the motor to be stopped from 6 meters away, behind a brick wall. This cable may be acting as an antenna and picking up the spike. I can isolate this cable by using a small relay
to control the power to the kill switch relay, using smaller (shielded) cable. Removed and bypassed this cable. No improvement.
3 While the program may not be faulty and directly causing B.6 to switch on, it is possible that it is doing this by creating some form of internal oscillation. The program is a loop, and may be looping at the same speed as the PWM (15.6k) or a harmonic of same. I can try a pause of say 100ms each loop. Or increase the clock speed. Or both. Pause has no effect
on problem.
4 Try altering the rotor drive PWM. This is on a separate micro. 15.6k is great for manual control using a pot with the readadc command. It gives operation from virtually zero to full voltage. This is very handy for testing the motor, but I can change or set the PWM from within the program.
5 Try fitting inductors at each of the 6 36v power supply points to the mosfet boards. Not done yet, but the 36v supply has less spike than the 12v aux.
6 Try with and without debug command. No improvement.
7 It may be coincidental, but B.6 is a PWM pin, as is B.3. I particularly wanted to have PWM available as the pin to drive the guide wheel motors, as I may need a soft start capability. I may have to give this up, and try both PWM pins in input mode. No pin except B.6 is giving trouble. I have checked with debug on 3 guide wheel units, and all show the same symptom.
That is, pin goes high at low rotor speed 1mps, debug says pin is low. Tried swapping B.6 (output) with B.4 (input). Problem now B.4 going high.
8 When I connect a 1000uf electro across the 12v aux to the control board, b.6 goes high as soon as the rotor starts. Adding 470uf has no effect. Will try reducing the pic board 100uf on the 5v line between voltage reg and pic, to say 10uf.
9 All the voltage regulators are same batch I think. Try changing one to see if they are faulty.