​ 29.08.2015 – An Xmega mistake

A project log for Sit.Up

Sitting for long periods has become more common in today’s life causing serious health issues. Sit.Up!

electrobobelectrobob 08/29/2015 at 18:270 Comments

Because of so many available pins and a higher current requirement of 80mA, I have connected the vibrator motor to 3 pins in parallel of the Xmega microcontroller. This is a good practice and saves adding an extra external switch, like a transistor in these cases. However, once I swapped the fresh alkaline batteries for some not so fresh rechargables, the vibrator was barely felt. Checking the datasheet shows that the Xmega pins are less capable than the old MEGAs, where my mind went for when I was considering that 3 pins are sufficient. So, time for the first design change: add transistor to switch off/on the vibrator. A NMOS is better than a NPN, since it includes a diode to protect against back EMF and does not need a base resistor, saving 2 components extra.

Xmega pin strength