We have a 3 AA batteries-powered Santa figure (which sings and dances 😛 ) we want to control from an Arduino Uno board.
Being quite noob to electronics and Arduino, we have been able so far to light up a set of Xmas AC-connected lights using Arduino and a relay.
The complimentary Santa figure is giving more problems:
We have connected the Arduino board's GND pin to the negative pole of the batteries' case and a digital output pin (pin 10) to the switch of the figure (which is always switched on, to let current turn the figure on).
But the most we could get was a bit of led blinking in the figure, as if the current was not being constantly held.
So is there any standard layout to connect the figure to the Arduino board or do we have to connect the pins in a different way?
Best Answer
Summary
Your diagnosis is correct. Your Santa figure requires more power to operate than the Atmel ATMega MCU can supply (Santa input impedance too low; MCU output impedance to high) from one of its GPIO pins (~14mA*, max, safely). Continuing to attempt to power it in this way will ultimately result in the destruction of the Arduino's processor's output pin (specifically, the internal component known as the output buffer).
You need an amplifier. The simplest way (component count, cost, tolerance to variation) to do this is to put an N-type MOSFET (NFET) in the ground path of the Santa figure.
Proposed Solution
Schematic
Netlist
The above schematic embodies the following netlist:
Note: I haven't really addressed your power supply situation. If you require further assistance with that, let me know.
Explanation of Solvency
Notice the two connections to the NFET Source Pin. This configuration is called a common-source amplifier (bet you can't figure out why ;-) ). For your application, practically any discrete NFET you are likely to encounter will work.
I'll elaborate more specifically on the (1) parameters of principal interest, (2) design constraints that guide their selection, (3) an approximation of the value, and (4) the rationale:
Ids,max
Vgs,th
Qg
A Suggested Part
Vishay Si4836Dy -- probably overkill, but will definitely work.
*This value varies based on the supply voltage of your circuit and temperature, please check the datasheet of your specific chip with your operating conditions to determine the acceptable value here, 14mA should be safe for all operating conditions of the chip used in an arduino. 20mA should be more then safe if you are using an arduino.