Jump to content

mindmachine LED and AudioDAC... again


Phatline
 Share

Recommended Posts

which supported DAC for simple Audio-Sinus (Stereo/dualchannel) generation? (80-4000Hz)

Also need 3DAC Channel for LFO (20-4Hz) Sinus for 3x LED-Stripes (660nmRed.Blue,..) which are for spa-like Skin penetration... that is the main purpose of the thing.

1DAC Channel for LFO Sinus generation for bodyshaker. (20Hz-60Hz)

so

stm32F4

+

2 Channel Audio DAC

4 Channel LFO DAC.

 

any idia for DACs hardware?

Link to comment
Share on other sites

Wouldn't it be easier to drive the LEDs, body shaker, etc. from PWM modulated outputs, instead? Given you'll want power transistors between the controller and the effector, that would be more power efficient too.

The PWM can drive the transistors rail to rail, leading to better power efficiency and less heat generation. If needed (and there's a strong likelihood it wouldn't be) you could use a reconstruction filter between the power transistor and the effector to get a truly analogue signal.

Also beware back EMF from the body shaker! You probably wouldn't want to connect it directly to a DAC or a PWM output. An H-bridge driver would give better protection to the circuitry.

That leaves audio, but the STM32F4 discovery board already has an audio output on it, so you could use that or copy the circuitry?

I've considered similar things myself, using an H-bridge to drive bipolar TENS signals through an isolation transformer in addition to lights, sound, etc.

Link to comment
Share on other sites

On 9.3.2017 at 11:11 AM, lis0r said:

Wouldn't it be easier to drive the LEDs, body shaker, etc. from PWM modulated outputs, instead? Given you'll want power transistors between the controller and the effector, that would be more power efficient too.

The PWM can drive the transistors rail to rail, leading to better power efficiency and less heat generation. If needed (and there's a strong likelihood it wouldn't be) you could use a reconstruction filter between the power transistor and the effector to get a truly analogue signal.

Also beware back EMF from the body shaker! You probably wouldn't want to connect it directly to a DAC or a PWM output. An H-bridge driver would give better protection to the circuitry.

That leaves audio, but the STM32F4 discovery board already has an audio output on it, so you could use that or copy the circuitry?

I've considered similar things myself, using an H-bridge to drive bipolar TENS signals through an isolation transformer in addition to lights, sound, etc.

@PWM: the thing is, its for (my) healthcare... and for that i dont want PWM Square Signals, the only waveform should be sinus, with a frequency i want to syncronize as human.

when you say reconstruction filter> then a sinus is generated using DOUT and capacitors? > how much more code-complicated vs dac-code is this then, on a scale from 1easy and 10 (sinus generation)

could that also be used for audio-sinus-generation? - take then different DOUT-Pins for different frequency-ranges (with different capacitors on it) ... is it capacitor based? > then i could take the best cap for a frequency, but when setting other frequencys (from 20-2Hz) the sinus isnt sinus anymore? (just a thougt)

H-Bridge Driver... thx.

TENS maybe also  ;)

...ah thought the stm32F4 dacs (cs43L22) was mono... but this problem (isnt) solved > Need SD-Card and a Midiport as well because of midibox stuff/code is going on > yes DAC-Overlap...its tiresome.

DAC WM8731 thx

 

thx4the inputs

Link to comment
Share on other sites

Hi Phatline,

I'd suggest reading up on some sampling theory, specifically regarding the Nyquist frequency. Once the signal has been low pass filtered, it won't be discernible from a fully analogue signal. Low pass filters include a filter circuit, which for audio could be as simple as an RC filter, but also persistence of vision also acts as one, which is why you can see films, TVs, etc.

Most microcontrollers have dedicated hardware to help with PWM generation, but I'm not sure of the specifics on STM32. Normally it involves selecting a switching frequency, and then setting a duty cycle - what proportion you want it on/off. Very easy to program.

You don't select your capacitors based on your desired output frequency, but based on your sampling rate - then you just play back a sample.

 

Lisa

Link to comment
Share on other sites

  • 4 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...