Hi fellow enthusiasts!
I've encountered a hardware issue that I'm not understanding, so am looking for some help from someone more knowledgeable than myself please.
My AtomFLY has from yesterday started exhibiting this strange behaviour where if I enable a single motor with a duty cycle of something quite low like, say, 20% (I'm using MicroPython, so specifically this means setting the PWM output to a value of 200 out of 1024) then the motor spins as expected, but as soon as I turn on a second motor to the same value (ie: enable a PWM value of 200 on a second motor) then both motors spin, but dramatically slower! Enabling more motors makes each existing enabled motor spin progressively slower.
This is new behaviour, since for the past few days I've been able to happily have all motors on at close to 100% without issue.
My attempts to troubleshoot the problem
To eliminate my dodgy code and micropython as the problem I've tried the reference Arduino example from M5's example on Github and I see the same behaviour. This example turns on motors individually each time you push the button and finally turns them all on. Running this sketch, each motor spins great but as soon as they're all turned on simultaneously at the end of the sketch then they all spin much much slower.
I thought perhaps I've damaged the little 200mAh battery and it can no longer deliver the current under load, but I have been using a separate 2000mAh LiPo battery for stationary testing without issue and I see the problem on it as well!
To eliminate some kind of issue on my Atom itself or its PWM I've removed the Atom unit altogether and started working with just the bare AtomFly chassis. From the schematics I've tried giving a 100% PWM duty cycle input for PWM3 and PWM4 to the FETs by using a jumper to pull those inputs to high (where high is the +BAT rail). Individually pulled high, each motor spins like mad as expected but when two motors are enabled like this the speed drops to about 10% (I estimate) - although you can hear it slow down over a second or so, and interestingly the little red LED that's hard-wired to the +5V rail either blinks or goes out. I would have suspected something has gone wrong with the SX1308 in supplying the +5V rail (perhaps I burnt it out during a previous drone crash where the blades got blocked from spinning?), but from the schematics it looks like the motors are tied to +BAT which is on the input side to the SX1308. I also would have expected the motors to spin about half as fast if they were sharing the available current, but instead they are about 1/10th as fast.
From 3) above and that each motor spins just fine individually (meaning the motors and FET circuits seem undamaged), my most educated guess is that the batteries I am using are no longer capable of supplying the appropriate amount of current. Why this would be the case is a mystery though since the 200mAh battery supplied with the AtomFLY I have charged/discharged no more than twenty times in the last few days (although admittedly I forgot about it overnight a day or two back and the instructions warn about this because of 'overcharging' (which I thought was a myth nowadays??)); and the 2000mAh battery although its two or three years old now has never been used before and was working just fine up until now.
What makes me suspicious of my educated guess is that it seems too much of a coincidence that at the same time neither battery seems capable of delivering adequate power, and that one motor going at 100% load works fine, but two at 20% causes problem? (unless there's some complicated voltage drop issue involved when the second motor comes online, and motor rpm perhaps being tied to voltage difference more than current as I assume).
Any insights or ideas on how to troubleshoot this further please? Getting a replacement battery is gonna take a few days during lockdown, and I'm keen to fix this sooner than that so I can carry on with getting my flight controller software working - you know how it is with not wanting to wait :-D