element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Upcycle IoT Design Challenge
  • Challenges & Projects
  • Design Challenges
  • Upcycle IoT Design Challenge
  • More
  • Cancel
Upcycle IoT Design Challenge
Blog Blog #5: Completing up-cycling broken wireless earbuds
  • Blog
  • Forum
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Upcycle IoT Design Challenge to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: misaz
  • Date Created: 9 Feb 2024 11:37 PM Date Created
  • Views 610 views
  • Likes 10 likes
  • Comments 0 comments
  • earbuds
  • Upcycle IoT Design Challenge
  • SAM E51
  • Curiosity Nano Evaluation Kit
Related
Recommended

Blog #5: Completing up-cycling broken wireless earbuds

misaz
misaz
9 Feb 2024
Blog #5: Completing up-cycling broken wireless earbuds

I welcome you to my last part of my series as part of Upcycle IoT Design Challenge. Today I will complete up-cycling my broken wireless earbuds which I introduced in previous blogs.

The last part remaining in my project is controlling device using Microhip SAM E51 microcontroller. In my second blog I shown reversed schematic of earbuds. On schematics we have seen that one button is connected differently for being able wake up sleeping SoC when “powered off”. In meantime I soldered wires to buttons. Under some circumstances buttons can be emulated directly by open-drain GPIo from MCU but this is not the case, because

  • MCU runs on 3.3V while earbuds SoC on 1.6V
  • Middle button pulls the voltage up to battery voltage (3.7 – 4.2V)

For this reason I need to implement some kind of level-switching.

Emulating buttons using transistors

Switching the two “normal” buttons is easy because we can emulate them just using simple NMOS (on left is MCU GPIO, on right is wire soldered to earbuds buttons):

image

The center button is more complicated because we must pull it up instead of down. We need to use PMOS, but there is one more problem. PMOS gate is usually driven by pull-up, but problem is that we pull this voltage to 4V and at the same time attach the gate to MCU which is 3.3V only. For this reason we need cascade of NMOS and PMOS solving the issue. I do not have PMOS in home, so I used PNP instead.

image

Firmware

That is all. At this point I tested that driving gates emulates button presses and move forward to implement it in firmware. Earbuds distinguish short and long presses. They even understand very very long press on center button which enters pairing mode.

I extended my UART driver for capability to receiving data also (originally it was TX only) and implemented triggering actions just by typing key in UART terminal. Keys do following:

X: turn on or off earbuds (toggle power)

E: pause or resume playback (toggle playback)

C: enter paring mode

+: Volume up

-: Volume down

N: Next song

P: Previous song

S: print humidity and temperature as per previous blog

Here example of usage:

 image

Final circuit

Final circuit showing connected earbuds, fake battery emulator, and button driving transistor looks as follows:

image

Conclusion

Circuit works well and I am happy about it. Working circuit shows that I correctly reversed button section of schematics of the earbuds and successfully implemented remote control originally broken earbuds using Microchip SAM E51 microcontroller which I used for a first time. The last part remaining is desoldering one broken (and one working) earbud cable and soldering output to jack or jack cable for playing sound using standalone speaker instead of one broken (and working) earbud. But this last step should not be that hard. Now I can play music wirelessly from iPhone and tune iPhone volume from serial port terminal. It is cool, is not it? :D

Thanks for reading my blog series as far. I hope you enjoy it as much as I enjoy making this project. Of course, I would be very happy if you leave some feedback in the comments below. You can download project sources in the section below.

Resources

  • Microchip SAM E51 Earbuds Control Firmware (ZIP)

 

  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube