2771|0

5263

帖子

239

TA的资源

管理员

楼主
 

看看国外的小伙伴用Beaglebone做了什么1----Sonos音箱 [复制链接]

最近浏览到几篇国外的关于Beaglebone文章,虽然是英文的,但是有图有代码,基本上还是看的懂~~
看到大赛如火如荼的进行,瞧个热闹,特粘来,也许能提供个思路。喜欢的可以做来试试,看着并不复杂那。。

Sonos音箱估计很多人都知道,也想拥有吧。但鉴于它的价格,就是小贵呀,不过你可以用Beaglebone,照着下面的方法,试试DIY一个。

BBB - Sonos-like Sound System
IntroductionThis post briefly documents a BeagleBone Black (BBB) based music box. If you’ve ever wanted a Sonos system but (like me) felt they were a little expensive, then it is worth considering using a compact Linux platform like the BBB for creating something slightly similar. I feel the sound quality is not leagues different (better nor worse) than some more expensive commercial offerings.

It was a quick, fun project and costs about £100 including the cases and the BBB.
The idea for this project was simple - a compact box that connects to the home network and allows the ability to send it music to play (or it can play music stored on-board or on a server). The documentation provides just an overview because the circuits are already documented, and every implementation could be slightly different depending on end user needs, speaker enclosure, etc.
Here is the rear view:


Shown below is a video of it in action. The sound was recorded from the camera in-built mic so is not representative of actual sound quality. For actual sound quality, refer to the MP3 recording here, which was captured by connecting the headphone output (not line output) directly to an ADC and captured by the PC.


ComponentsThe main bits and pieces are the speaker box, the BBB and a DAC/amplifier.
Although a BBB and home-built DAC/amplifier was used, a Raspberry-Pi and Wolfson audio card could be used too, for a similar price.
The home-built DAC and amplifier is easy to assemble; it uses medium-sized SMD components that are hand-solderable, and gives results similar to a Meridian DAC which uses the same chip (a Texas Instruments ic). Full circuits and information are at these two locations: part 2 has the schematic, and part 1 has some more technical detail.
There are plenty of other DACs available including pre-built ones. A search for “I2S DAC” will reveal ones that should be suitable (I have not tried them) – this ebay example is just over £10. (Note that you may require a logic inverter, see the comments sections in the links earlier).

The speaker is a Tivoli Audio speaker. It is possible to get these in new condition for about £15-20 frequently on ebay, in various color options. Any speaker enclosure would have been fine. The official Tivoli webshop sells new speakers (slightly different model) from £39 upwards.

Design and ImplementationThe DAC board was mounted inside the speaker, and the BBB was mounted outside. This allows access to all the BBB ports while making the minimal amount of holes in the Tivoli speaker (Speakers are sealed for good audio reasons).
It won't replace main home music systems but that was not the intention, nor is it stereo (that capability is easy to achieve by adding a second speaker connector, but I didn't require it). This is more a bedroom or home study one-box sound system.

Step 1: Fit BBB inside a caseThe first step was to get the BBB into its own case. I connected a push-switch to safely power on/off the platform. I also wired up a DB9 connector to interface to the DAC.

I used L-shaped single-in-line header pins to solder up the connections and heatshrink at the DB9 connector end. The switch and LED were wired up to the power switch pin on the BBB and to the 3.3V supply (via a 100 ohm resistor) respectively. The push-switch is wired to the P9 header, pin P9_9 and to ground (pin P9_1). The LED 3.3V supply can be taken from P9_3.

The photo below shows the LiPo battery fitted. I used a paper sticker on the underside of it, to insulate it further. The BBB doesn’t run hot, but the battery could have a spacer between the PCB and itself if desired.

Here is the finished result, powered up. It can be safely powered down by pressing the button again (this feature is by default in the current Debian image).

The other side of the case provides access to the USB port, and a small USB WiFi adapter was fitted. I have not got round to finding a software driver for it yet, so for now I just used Ethernet.

Step 2: Speaker modificationsThe next step was to put the BBB aside and work on the speaker and DAC. The speaker was opened up, and the wadding was removed and stored in a plastic bag to prevent dust and drilled fragments of plastic getting on it. The speaker cable was chopped and discarded, and the grommet removed.

The DAC board was fitted with L-brackets http://uk.farnell.com/jsp/search/productdetail.jsp?CMP=i-ddd7-00001003&sku=1466881&COM=BeagleBoneBlack and the speaker rear cover was marked up for drilling the holes to secure it, and for the headphone and line jack outputs (3mm holes for the screws, and 6mm holes for the jacks).

The photo below shows the finished result. The jacks are rather recessed. This is actually no problem for some headphones (e.g. a pair of low-end AKG I own) but others will have problems. I plan to drill to a recess with a larger drill bit to 7mm and it will cover both of my sets of headphones. Note that you want to make the holes as small as practical.

After wiring up the DAC to the speaker, the wadding was placed back in position and the cover was closed up again as shown below. Then the DB9 matching connector was soldered (wires protected with heatshrink). I didn’t bother with a cover for it.

After testing, the hole needs to be sealed (perhaps with epoxy resin glue).
Finally, the BBB was attached to the speaker (rubber feet and adhesive foam pads can be used).

Step 3: Try it out!This step was the easiest.
Plug in the power supply, power up and install the audio player software:
[/url]

  • sudo apt-get install mplayer

sudo apt-get install mplayer
Then, try to play a music file (either from local storage or from network storage):
[url=http://www.element14.com/community/community/knode/single-board_computers/next-gen_beaglebone/blog/2014/03/05/bbb--sonos-like-sound-system#]


  • /usr/bin/mplayer -ao alsa -volume 10 “songname.mp3"

/usr/bin/mplayer -ao alsa -volume 10 “songname.mp3"

Summary/Next StepsA quick and simple sound system was created. With a pre-built DAC and amplifier, the hardware implementation can be extremely easy.
There are plenty of software options for creating a library of songs and providing an interface for the user to select something to play. I have not tried them. For now I will just use SSH to select music. Eventually the hope is to create a simple browser based app that will allow one to upload MP3 songs from a PC or mobile phone for instant playback. A wake-up alert in the morning with a random song, or the news, will be a good option too (enabled via browser on mobile phone).





帖子来源:http://www.element14.com/community/community/knode/single-board_computers/next-gen_beaglebone/blog/2014/03/05/bbb--sonos-like-sound-system



加EE小助手好友,
入技术交流群
EE服务号
精彩活动e手掌握
EE订阅号
热门资讯e网打尽
聚焦汽车电子软硬件开发
认真关注技术本身
点赞 关注
 

回复
举报
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/6 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表