Go Down

Topic: Charlieplexing Motors on Arduino: a proposal (Read 619 times) previous topic - next topic

Syvwlch

As part of an HMC6343-based compass project, I wanted to make a haptic interface based on little vibrating motors in a hatband. Like the compass-belts that have been done before, but for your head. :-)

My first prototype worked fine with some 8 LEDs, using some digitalWrite() to select which LEDs to turn on from the high side, and some analogWrite() to control how brightly from the low side, like charlieplexing. I was able to create a cylon LED ramp that smoothly indicated how the compass was pointing.

To replace the LEDs with vibrating motors, however, I needed some additional electronics since they eat roughly 80mA at 3.3V each (I'm using a 3.3V volt Arduino, the Wee, because the sensor is 3.3V and that saves me a lot of grief on level shifting on I2C), and that is way too much for Arduino. So after some research and some simulations on LTspice (free, get yourself a copy today!) here's what I came up with:



According to the simulations, this will draw uAmps from Arduino while driving the motors at nearly their full 80mA. You can generalize the concept to charlieplex motors just like you would LEDs, I think.

Going on vacation, so won't be able to test it with the full 8 motors just yet, but it works with just one. Of course, with a multiplexer rated for 100mA, I could do the same with one transistor per lower side PWM circuit and nothing but Vs on the high side, but I don't have a multiplexer of any rating at the moment, and this seemed like a good alternative.
----------
Mathieu

Go Up