Voltage & DC offset

120 views
Skip to first unread message

Eirinn Mackay

unread,
May 28, 2016, 7:09:01 AM5/28/16
to Mozzi-users
Hi Tim,

I'm building a sine-wave generator for use in my lab and Mozzi looks like a very useful library for me, so thanks in advance. I'm curious about the way it generates a signal: my understanding is that line-level audio is an AC waveform centered around 0V, but Arduinos can't generate a negative voltage. How does Mozzi solve this?

Cheers,
Eirinn

Tim Barrass

unread,
May 29, 2016, 4:35:02 AM5/29/16
to mozzi...@googlegroups.com
Hi Elrinn,

Mozzi outputs a signal between 0-5v, so one way to solve the problem is to use a decoupling capacitor in series with the output.  I think around 0.1-0.22uf does it.  It  works as a high pass filter which tends to pass the AC variations without the long-term DC bias.  Not sure if that's a good solution for a signal generator - you might need to look up how to bias a signal properly...

Tim

--
You received this message because you are subscribed to the Google Groups "Mozzi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mozzi-users...@googlegroups.com.
To post to this group, send email to mozzi...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/mozzi-users/dae262e9-51cf-469d-b1f2-dc55e7bf8179%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eirinn Mackay

unread,
May 29, 2016, 5:02:22 AM5/29/16
to mozzi...@googlegroups.com
Hi Tim

I'm still driving a speaker (just with brief sine wave pulses) so if it works, it works. I'm guessing the speaker coil is limited to half its travel range which will limit volume and dynamic range, is that right?
Can the 5V signal damage the audio amplifier which will be expecting line level audio (max 1.7V)?

You received this message because you are subscribed to a topic in the Google Groups "Mozzi-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mozzi-users/98xQ0Xu9Igg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mozzi-users...@googlegroups.com.

To post to this group, send email to mozzi...@googlegroups.com.

Tim Barrass

unread,
May 29, 2016, 5:26:08 AM5/29/16
to mozzi...@googlegroups.com
Hi Elrinn,
I wouldn't expect it to hurt the amp, but you'll probably get distortion from overdriving the input stage.  I would recommend the decoupling cap followed by a potentiometer to allow you to adjust the level to suit the amp.... that's what I usually do.

Tim

Eirinn Mackay

unread,
May 29, 2016, 5:40:35 AM5/29/16
to mozzi...@googlegroups.com
Great, thanks for the advice!

Reply all
Reply to author
Forward
0 new messages