Hi,
I'm driving a couple of high power servos and their power is connected directly to the power supply (not fed by the Arduino board). When the PWM pulse is sent, the Yún board resets similar to when you press the Yún reset button. Can't say 100% sure yet, but seems that the AVR continues to work but the Atheros Linux side goes reboot.
The power to the Yún board is via the Vin pin and I have nothing on the 5V pin on the header.
I tried some tricks like a big capacitor on the power supply and a pull-up on reset, etc. The power supply is a pretty strong switcing power supply and this identical setup was working with a Yún Shield and never failed.
Why is this happening??? What else can I try and/or diagnose this further?
After some analysis with the oscilloscope I was able to see an inductive type pulse every time the high torque servo was activated. This made me realize a had a few problems:
- The main power supply wires were too thin probably causing lead inductance.
- The large servos even though they probably have a double h anti flyback circuitry are unable to control regulation spikes from the main power supply. The large current draws cause a sort of switch bounce and the Atheros part seems very sensitive to these pulses.
- The Yún DOES NOT come with a voltage regulator. This is stated clearly on the product page and that is the reason I never saw this on the Yún shield + Uno arrangement I had prior to purchasing the Yún. Perhaps this is the root cause, but all of the above were not helping.
Solution:
- Changed the power feed wires to 18ga
- Added a small Pololu S7V8A regulator and power the Yún and all the electronics from that.
- The servo power now comes from the main power supply with 18ga wire before the electronics regulator.
- Added a 100uF Electrolytic Cap to the input of the electronics regulator.
Everything works perfectly now and in fact the Yún seems much more stable on the WiFi side. I think that anyone using this should add a small local up/down adjustable dc-dc regulator such as the S7V8A until Arduino comes out with a Yún that includes power regulation circuitry.
Cheers,
Alex