Back to Home Page
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.

Machine Construction Home Page
Back To Electronic Drive Home Page
VeeCad & DesignSpark Files
12 v Aux to Guide Wheel 1 Small spike.
5 v at pic output (low).  Spike amplified. This spike also shows on the micro case.
10  Try car audio line suppressor on each Guide Wheel aux power supply.

11  Check that the spike is definitely the same as, or caused by, the PWM. Yes it is the falling edge when the magnetic field is collapsing.

12  Try a separate 12v battery to a Guide Wheel control unit. Makes no difference.

12  Try fitting the pic board ceramic cap 0.1uf under the board to get it closer to the pic power and ground inputs. Also try other capacitances.

13  Remove all connections to control unit, except for probe to output pin on pic.
     
Makes no difference.

14 Check probe to frame. Huge spike anywhere on the frame with or without oscilloscope ground connected.

15  Drive coils are attached to frame with alum angle. Alter with angle pvc attachment.
Have cut the aluminum angle and fitted a short piece of PVC angle 40 x 40 x 4mm at each end as an insulator, to all 3 coils. This has made an immediate improvement. The spike is now contained to the coil core and mounting. This spike is entirely negative and follows the voltage level of whatever 240v AC is in the vicinity. This AC waveform can be found on any
metal part of the machine, but is eliminated by disconnecting most AC things nearby. I now run the laptop with the oscilloscope program from the machine battery bank 12v supply. Two computers are required so the other one will also need to be battery operated when testing the machine. The battery chargers are also causing problems, so these will need to be disconnected when the machine is running.

16 Try to eliminate or absorb the negative spike. The 3 phase bridge which is used to switch the rotor  power has diodes which are set out like a rectifier bridge. The positive return or spike is free to return to the battery positive, and the ground also appears correctly connected.
Each coil on my machine is comprised of 2 separate coils, each powered by its own bridge.
They switch together, and are  able to share the load better.
17  There are non polarised electro caps which I have fitted between the phases near the coils. I have removed all 6 of these and the large spike has gone. These were fitted to improve the power of the rotor, and this seemed to work. At this stage I assume that 1 or more of these caps is faulty, and has been the  principal cause of my problem. Because I have now electrically isolated the coils from the frame, this fault is unlikely to reoccur. The micros seem quite happy where they are located, about 100mm from ferrite magnets and alum frame components .

This could change when the motor is rotating at speed, and will need to be watched.