没有合适的资源?快使用搜索试试~ 我知道了~
树莓派用GPIO做模拟音频输出,对于zero和CM3没有模拟音频的适用

温馨提示
树莓派用GPIO做模拟音频输出,对于zero和CM3没有模拟音频的适用
资源推荐
资源详情
资源评论





















Adding Basic Audio Ouput to Raspberry Pi Zero
Created by lady ada
Last updated on 2016-09-13 12:53:43 AM UTC

2
3
3
5
5
5
5
10
15
16
18
18
19
Guide Contents
Guide Contents
Overview
How Audio Works on Other Pi Computers
Pi Zero PWM Audio
Let's go!
Option 1. Use Device Tree Overlay
Option 2. Manually Assigning PWM pins
Changing the GPIO ALTs
Low Pass Filter Wiring
Set Audio Output
First Test
Adjusting Volume
Automate it!
© Adafruit Industries
https://learn.adafruit.com/adding-basic-audio-ouput-to-raspberry-pi-
zero
Page 2 of 22

Overview
To keep the Raspberry Pi Zero as low cost and small as possible, the Pi foundation didn't include a
3.5mm audio jack. There's also no breakout pads for the audio output. This made us a little :( at first but
then we thought "hey you know, we can probably figure out how to get audio out with a little hacking!
How Audio Works on Other Pi Computers
The Broadcom chipset used for the Pi does not have a true analog output. Instead, two pins are PWM
(pulse-width-modulated) at very high speeds, and filtered. The PWM frequency has to be at least 10x
as high as the highest frequency we want to replicate in audio. Then, by adjusting the duty cycle of the
PWM, we can 'fake' an audio signal.
Audio is 20Hz to 20KHz, and the PWM output from the Pi is 50MHz so we can easily filter the high
50MHz out (and anyways it cant be heard).
Looking at the Pi B schematic, we can see PWM0_OUT and PWM1_OUT are the left and right
channels. R21 and R20 are voltage dividers to get the 3.3V signal down to about 1.1V max (that's the
max peak-to-peak voltage you want for audio line level.
© Adafruit Industries
https://learn.adafruit.com/adding-basic-audio-ouput-to-raspberry-pi-
zero
Page 3 of 22

C20/C26 works with R21/R27 to create an "RC low-pass filter". You can calculate the cut-off frequency
with 1/(2*pi*RC) = 1/(2*pi*270*33*10
-9
) = 17865 Hz which is pretty close to 20KHz!
C48/C34 acts as a DC-filter capacitor, it only allows AC through - speakers and headphones don't like
DC voltage!
Finally 8AV99 are ESD protection diodes. That's to protect the Pi from static coming in and zapping the
PWM pins..
© Adafruit Industries
https://learn.adafruit.com/adding-basic-audio-ouput-to-raspberry-pi-
zero
Page 4 of 22
剩余21页未读,继续阅读
资源评论

- 凉稀饭豆腐脑2019-07-09树莓派GPIO音频

普通网友
- 粉丝: 2
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 论信息技术革命条件下网络经济.doc
- 校园网络信息会议会发言稿.docx
- 工程项目管理--组织协调PPT课件.ppt
- 2023年网络管理知识点.doc
- 会计信息化的会计职业道德建设研究【精品发布】.doc
- 网络信任服务系统在工商电子政务中的运用.pptx
- (源码)基于Arduino的智能家居照明模拟系统.zip
- 数据库考试题及答案.docx
- 应届毕业生电子商务实习小结.pdf
- 院感培训MicrosoftPowerPoint演示文稿.ppt
- 2023年南开春学期网络营销在线作业答案.doc
- 十字路口交通信号灯PLC控制系统.doc
- 微波工程课程设计实验报告Smith圆图程序设计.doc
- 通信无线网主设备安装工艺规范.doc
- 电子商务模式案例分析ppt课件.ppt
- 算法分析与设计作业及参考答案样本.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
