License

MIT

Recommend Projects

Buzzer-to-i2c

10 months ago 306
  • Description
  • Documents
  • BOM
  • Attachments
  • Members
  • Comments

Description

This projects is a device controlled thru i2C, it has a set of instructions to control two leds, two buzzers and a combination of them.

The device uses an ATTiny85 and it connects to an RaspberryPi to send the commands.

The instruction for the device are:

  • 0x00 --> Does nothing
  • 0x01 --> All Buzzers ON, All LEDs OFF
  • 0x10 --> Al Buzzers OFF, All LEDs ON
  • 0x11 --> All Buzzers ON, All LEDs ON

For a better communication between the device and the RPi set the i2c baudrate to 100000 in /boot/config.txt file on the RaspberryPi:

dtparam=i2c1_baudrate=100000

The i2c device code is available here:

https://gist.github.com/sergiomtzlosa/b0c639606dfe3e17d6ca6ac323177b02

Follow the instruction on the file to install additional libraries.

The RaspberryPi code the send the commands to the i2c device is available here:

https://gist.github.com/sergiomtzlosa/ac0bdb416f55b6de1230a298e218e4df

The device was sent to production and it is working.

Documents

buzzer-to-i2c

buzzer-to-i2c

BOM

ID Name Designator Footprint Quantity Manufacturer Part Manufacturer Supplier Supplier Part Price LCSC Assembly Mounted
1 Attiny85 IC2 DIP8 1 Attiny85 Yes
2 5mm LED U1,U2 5MM LED 2 5mm LED Yes
3 4.7 R4,R5,R7 DIP-RES-9.0MMX3.2MM 3 KNP1/2W-4.7Ω±5% T CCO LCSC Yes C122091
4 Button S1 MOMENTARY PUSH BUTTON (PCB) 1 Yes
5 10KΩ(1002) R8 AXIAL-0.5 1 MF1/2W-10KΩ±1% T52 CCO LCSC Yes C119433
6 BUZZERHMB1275-12B BUZZER1,BUZZER2 DIP-BUZZER-12X7.5 2 buzzerHMB1275-12B HNDZ LCSC Yes C96094
7 2Pin Dupont U3,U4,U5 2PIN DUPONT 3 Yes

Attachments

Filename Download
i2c_attiny.ino
Success
The owner does not allow comments in this project now

Comments (0)

goToTop
你现在访问的是EasyEDA海外版,使用建立访问速度更快的国内版 https://lceda.cn(需要重新注册)
如果需要转移工程请在个人中心 - 工程 - 工程高级设置 - 下载工程,下载后在https://lceda.cn/editor 打开保存即可。
有问题联系QQ 3001956291 不再提醒
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow
We use cookies to offer you a better experience. Detailed information on the use of cookies on this website is provided in our Privacy Policy. By using this site, you consent to the use of our cookies.