Driving Linear Resonant Actuators

Status
Not open for further replies.

zelfor

Member
Hi! Looking for some outside points-of-view.

I'm trying to figure out how to drive 9x linear resonant actuators (LRAs, like this one), each potentially at a different rate.

Short intro, LRA's are one of the two types of devices that cause your cellphone to vibrate. The other type is an eccentric rotating mass (ERM), basically a very small motor with an offset weight.
LRA's are basically a voice-coil with a mass.

These devices typically take very small amounts of current ( 20-50mA ).
However, driving them is very different. ERM's work fine with PWM, however, LRA's must be driven with AC (the amplitude determines the power, frequency is constant).

I could drive all 9x LRAs off my Teensy 3.1 via PWM converted into voltage,(like this), thus being able to control both AC frequency and amplitude. However, it takes up a lot of resources I otherwise need.

I looked into buying several DACs, but, for my small budget, 9 single channel DACs is a bit pricey.
I looked at using the TLC5940, but soon realized that won't work because it switches on the low side, totally incompatible with the aforementioned method of converting PWM to voltage.

I've looked into using a SIPO like the 74HC595 to free up pins, but that still doesn't do away with having to do all the bit banging.

Does anyone know of any IC's, like the TLC5940, but that provide independent multi-channel PWM output by switching on the high side?
Are there any other options I might have? I've run out of ideas.
 
Last edited:
Perhaps a shift-register or a binary-decimal-decoder ( a few cents, 74xyz ) and the PWM in software ?
 
I've got a few 74HC595 shift registers, but I'm concerned that implementing PWM via software will eat up too many clock cycles, I've already got a lot of calculation going on.

For each of the 9 LRAs, for each step in each AC cycle, I have to calculate the PWM duty cycle needed to get the right voltage from the conversion circuit for that particular moment in the AC cycle.

Maybe I'm pre-optimizing too much. I'll try implementing the bit banging for PWM via shift registers alongside the calculations needed and see how it goes.
 
Your load is probably somewhat inductive -- constant current drivers like the LED ones are not the most suitable (and may even be damaged by inductive flyback).

Do you have to use different AC frequencies for each LRA, or can you drive all with the same AC frequency; just different amplitudes ?

Instead of using different amplitudes, could you use different PWM duty cycles for each ? -- that has a similar effect to using different amplitudes.

Say you are driving at 300 Hz, and need 3-bit resolution on the amplitude -- corresponding to duty cycles between 0 (off), 7, 14, 21, 28, 35, 42, 50 % (max power). You could setup a timer generating an interrupt every 250 us (~ 7 % delta duty cycle), and have it output on the 9 pins a signal that sweeps through the individual PWMs (so say you had just 3 and they were at off, 50 %, 7 % power etc, then output something like 011, 010, 010, 010, 010, 010, 000, 000,000,000 repeatedly) (a little similar to Paul's DMA for WS8211 LEDs).

You could drive each LRA with and NPN transistor (e.g. 2N2222). Collectors to +5 V, bases to Teensy's GPIO pins, emitters to each LRA, the other end of the LRA would be GND. As an emitter follower like this, you don't need any resistors, and it should handle the inductive kick OK
 
In this case, all the LRAs I'm working with run at the same AC frequency. It's just the amplitude that varies.

I don't think that using different PWM duty cycles would work, assuming you mean skipping the PWM->voltage conversion. I'm pretty sure switching the voltage on/off like that would negatively impact the performance as the LRA's only work well at a specific resonant frequency and the PWM duty cycle would interfere with the resonance.

You've given me a few ideas though. I'm going to see if I can use multiple discrete voltage levels instead of trying to generate the full sine wave of the AC.
 
I suggest you try it -- if in fact the LRAs have a resonance, then the PWM won't interfere with it. Worst case, you won't have as efficient a system as you might want.

The R & C PWM filter you mentioned above is really just an improvement on basic PWM -- it filters the higher frequency components. However, the LRA doesn't respond to those, so there is really no need for you to filter them !

In addition, using an R&C filter, you'd need to PWM at a quite high frequency so you can filter the PWM, but still have fast enough response to generate the AC signal.
 
Driving via PWM through an NPN BJT worked out fine.

After a lot of experimentation though I'm coming to the conclusion the LRAs aren't suitable for my application (haptic feedback across a coordinate plane). I'm going to get some cell-phone ERM units and give those a whirl.
 
If you do decide to go with LRAs, I do believe you could use filtered 12 bit PWM to synthesize many AC waveforms with variable amplitude. You'd need some code to interrupt on every PWM cycle, to update for the next one. Even though that's quite a lot of processing, Teensy 3.1 should be plenty fast enough.
 
I'm also using the USB library to output joystick info, so I am concerned about how the large amount of processing will affect that. Though, using manual USB send on a higher priority interrupt, and having the calculations on a lower priority interrupt, aught to work fine.
 
Status
Not open for further replies.
Back
Top