Phatline Posted March 8, 2017 Report Posted March 8, 2017 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? Quote
lis0r Posted March 9, 2017 Report Posted March 9, 2017 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. Quote
latigid on Posted March 9, 2017 Report Posted March 9, 2017 Doesn't the audio DAC overlap with the SD card/SPI port? Is this mind control device running MIDIbox-like apps or totally standalone? You could consider some of Olivier's ideas (Clouds and Rings), many use STM32F4 with audio DACs e.g. I see WM8731 for the latter. https://github.com/pichenettes Quote
Phatline Posted March 14, 2017 Author Report Posted March 14, 2017 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 Quote
lis0r Posted March 15, 2017 Report Posted March 15, 2017 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 Quote
Phatline Posted May 3, 2021 Author Report Posted May 3, 2021 that topic comes again into my mind nowdays... maybe it is the winterproject 2021 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.