Cross posted with Hippy.
But what is the effect on the drive if its sat in its stall position with tilt switch showing closed and the picaxe restarts. So picaxe restarts with tilt switch closed, it would show normal operation i think with heart beat, stall-reset wouldn't work because it wouldn't think its in a stall, motor won't drive either because it will never see the tilt go closed because it was already closed??
If the picaxe restarts then the picaxe will just run the code as normal, so if the tilt switch is closed then the motor will be driven. StallReset would still work because that button only gets checked towards the end of the MotorStalled subroutine after the OLED has been updated.
On the drives the recall button is covered its not intended to be used by the user
If the clock bloke removed the lid to connect the screen, then there's a good chance he pressed the button. This could be for one of a few reasons..
a) Curiosity - wondering what that hidden button does.
b) Seen you press it and thinks it's a magic button which fixes things
c) Genuine mistake as the lid is off - simply got the 2 buttons mixed up and meant to press the StallReset button
so having pressed the recall button, he now has to wait over 10 minutes for the 253 stalls to be flashed out, before the picaxe could attempt to restart the motor.
clock bloke needs to be careful around stall-reset button.
This was also part of my reasoning for needing the button to be held down for around 2 seconds, as it make it more difficult for an accidental reset.
Second test,
Got drive to point where tilt switch closed and it went into stall, I had stall-reset already permanently pressed, stall constantly reset, counter incrementing constantly
Correct. However the motor will still be run for up to 6 seconds provided the power is kept on. If the power is cycled with the StallReset still on, then the picaxe will just keep looking for a new download.
So this still begs the question of how did you get a stall count of 253 because the motor should have still moved. I keep coming back to whether the mosfet is occasionally failing to turn on. Have you used the same mosfet in all versions, because this stall problem was also present when you used a 555?
Suggest you put an LED with series resistor on C.4 and then compare what this LED and the motor LED are doing when problems occurs, or you use the StallReset button and it fails to work.
he asked me to reduce the drive pulse to 200ms which i did, now this drive is on the chimes side of the clock, when its triggered it can drive continiously for between 1 and 12 chimes, i think what was happening manly for the higher hours that the 200ms wasn't long enough for the tilt switch to open
It's probably the other way around, so at the higher hours 6 seconds is probably too short for the autodrive to keep up with the mechanism unwinding.
With the drive pulse set at 200ms, the drive will still run continually for up to 6 seconds if the tit switch calls for it.
However, when the tilt switch is on the verge of opening, then 200ms may be too short for the motor to physically move but may be enough to give the motor a jolt which re-opens the tilt switch. This would NOT register a stall but may keep happeneing until the mechanism has unwound slightly allowing the autodrive to receive a longer drive pulse.
Perhaps you should run a test program that sends a 200ms drive pulse every couple of seconds to see if motor does actually move. Either test it on the clock, or use a seperate test rig. If using a test rig, then make sure the motor has a load similar to what the spring provides so that it's a fair comparison.