cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 DAC for Actuation - 16 Channels

Hailing SKY
Associate II
Posted on January 30, 2018 at 17:51

Dear All,

I am using STM32L476 to generate actuating signals (50k Sine wave, ±6 V) for 16 piezoelectric actuators. I realize there are just two DAC channels for this MCU. I would like to know what kind of external circuit I need to control the output actuating signal.

In my case, I would like to actuate one channel at a time, say just Actuator 1 for the first actuation. The rest are now excitated, but in a full cycle, every actuator needs to be actuated one after another.

0690X00000604KTQAY.jpg

I have got an idea to amplify the unipolar 0-3V sine wave from DAC output to bipolar ±6V signal, but I am still trying to find a solution to control the actuation sequence using two DAC channel for 16 actuators. If you have any idea, it would be my great honor to listen.

Best,

Hai

#stm32l4 #dac #stm32-f4 #stm32

Note: this post was migrated and contained many threaded conversations, some content may be missing.
9 REPLIES 9
T J
Lead
Posted on January 31, 2018 at 01:48

You could switch to any node through a FET ,  ie you would use 16 FETs and 1 amplifier

any FET can be on or off

Only one DAC used;  

   the signal for the DAC is constantly on, ( you can substitute with 50Khz Oscillator to save CPU overhead.)

just switch the FETs from IO pin...  need 16 pins to enable FETs

You can choose,

none ON.

1 ON,

3 ON,

amplify before the FETs, you only need 1 amplifier, but you need beefy FETs,

amplifier size depends on Loading.

Posted on January 31, 2018 at 14:43

Thanks, T J. I found online there are demultiplexers, such as CD4051B from TI, for sequence control. Using this chip, I think I can use 4 GPIO pins to control 8 channels. Do you think this is an opition? 

For the actuation signal, it will be sine waves with a Hanning window. So I guess I should use DMA+ADC for generation.  I never used demultiplexers before. Please let me know if you have any suggestions.

Thanks,

Hai

Posted on January 31, 2018 at 23:20

it really depends on the accuracy you need at the output.

I was thinking that you amplify the output, then route it to the FETs,

if you use the 4051 (not great analog switch), then you need many power amplifiers.

how much power do you need to drive the piezo ?  

The 4051 has an on resistance of 125 ohms.

if you have the spare pins on the processor, I would use those to save having any extra parts on your board.

but if you want to multiplex, do it on the digital side to save the analog accuracy, if its important.

On many solutions, we used the 74LS138 3:8 decoder,

https://www.digikey.com/product-detail/en/texas-instruments/SN74LVC138APWR/296-1223-1-ND/276491

 
henry.dick
Senior II
Posted on February 01, 2018 at 00:29

You probably want to figure out first the piezoelectric elements signal / excitation requirements. Like do they need sine wave? Do they require sustained excitation? .... 

Without that understanding you are simply shooting in the dark.

Posted on February 05, 2018 at 17:28

Dear

Marsh.Nick

and dhenry,

Thanks for your kindly replies. I tested the piezo transducers last week. I used sine wave + Hanning window (100 kHz ±10V) signals to actuate the transducer, and the peak current was 12 mA. So, I guess the 4051 chip may not be a good option for switching control. I would listen to your suggesion and use MOSFETs and GPIO pins to control the actuating channels. Do you have any recommondations for MOSFETs? I guess on-resistance and max current should be the selection criteria.

For signal amplification, I plan to amplify the DAC output from MCU first before those FETs (One amplification module). I will use two AA batteries (3 V) to power the whole system. I have found a solution using a chip from Linear Technology (LT3463A) to generate bipolar voltages (± 8V) for the subsequnet operational amplifier (LT1677) to generate a ± 6V output signal for actuation.

The problem is that the LT3463A chip consumes lots of current compared to the current used by the op-amp. In my system, low power consumption is another requirement, so I am trying to find other potentional solution to reduce the consumption. It would be my great honor if I can hear your further suggestions.

Best,

Hai

Posted on February 05, 2018 at 17:49

Knowing more about your devices or loads in this case always helps.

Two suggestions.

1. Can you drive your loads with square waves rather than sine waves? This greatly simplifies the task.

2. Think of driving the elements differently. Let's say that you apply the same signal to all elements but switch each on and off based on individual needs.

For example a signal is applied high side to all elements at all times but individual elements Are turned on and off on the low side, via a gpio or shift registers, ....

This will require you to develop a better understanding of the task at hand and your devices....

Posted on February 05, 2018 at 18:50

Thanks, dhenry. I can only use the

sine wave + Hanning window signals

 for actuation. That is the requirement of this particular application and for switching control signal. Only one transducer can be actuated in each cycle.

My current aim is to reduce the power consumption of the whole system while maintaining the accuracy of the actuating signal. Let me know if you have other suggestions to implement those functions.

Best,

Hai

Posted on February 05, 2018 at 19:17

You may want to read u on the specs of the onboard dac to see if it can do such jobs.  A quick scan would suggest it cannot. A dedicated dds is likely your best best.

After that, low side switching is still the way to go, in my view.

Posted on February 05, 2018 at 21:46

low side switching can be done with a PWM and an TANK Filter to give an approximate sine wave. inductor and cap tuned to 50 or 100KHz.

you would repower the PWM signal output to give +-10V and the power needed through the tank circuit.

or the on board DAC can do it, you will need a proper amplifier for the FET Drive.

a Class A amp is the best for 'Audio'

Class D is a digital poor cousin with low fidelity.

AC coupled may be ok in your case.

You may want to just buy an Audio Class A, AC amplifier.

2x AA batteries, wont last 24Hours @ 12mA per unit.

the Fets, you need 'logic inputs' 3V trigger and maybe 1A or 4A capacity