Timed Beeper using TPL51111

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
HallidayC
 
Posts: 2
Joined: Thu Jul 22, 2021 10:50 pm

Timed Beeper using TPL51111

Post by HallidayC »

Hello!

First off, I have never done any sort of circuitry before so go easy on me. I'm trying to make a beeper that beeps for 1-2 seconds and then turns off for 20-30 before beeping again activated by an on/off button. I think/thought the TPL5111 would solve this but currently it is just continuously beeping. I've attached a picture of my current breadboard and put my components below. Any help would be appreciated!
Thank you!
Attachments
IMG_0441.jpg
IMG_0441.jpg (818.39 KiB) Viewed 191 times

User avatar
dastels
 
Posts: 15655
Joined: Tue Oct 20, 2015 3:22 pm

Re: Timed Beeper using TPL51111

Post by dastels »

First a comment: the use of the power&ground rails on the right side for the beeper is confusing at first glance. It's best (and clearer) to keep those for power & ground.

Next, you didn't solder the header to the TPL board. Anything in a through hole pad needs to be soldered to ensure a stable, quality connection. If it's not soldered it won't work, very well or for long. It's almost guaranteed that a high speed data signal like in an I2C or SPI connection (not the case here) will just not work.

The real problem is that the TPL5111 doesn't work how you want/need it to.

The potentiometer sets the timing, i.e. have it beep every 30 seconds

The duration of the beep is controlled by the DONE signal. DONE has to be usually low, i.e. 0v. When DONE is switched to high (i.e. the voltage on the VDD pin) the output "turns off" and will remain so until the time set by the potentiometer has elapsed, and the whole thing repeats. Your problem is that you aren't using the DONE pin to turn it off.

You can use a simple RC (resistor/capacitor) circuit to make DONE high (enough) after a short time. That time will depend on the values of the resistor and capacitor.
Wire the resistor between ENout and DONE, and the capacitor (paying attention with which side is negative (connect it to ground)) between DONE and ground. Now with ENout goes high the capacitor will charge through the resistor and the voltage at DONE will increase. When it gets to a high enough value, DONE will be triggered and ENout will go low again (discharging the capacitor as well as turning off the buzzer). I found that a 27k ohm resistor and a 10uF capacitor gives about a 1 second beep. Using a higher value resistor will cause a longer beep.

See issue 10 of Hackspace Magazine (free PDF at https://hackspace.raspberrypi.org/issues/10) for my article on capacitors.

Dave

User avatar
HallidayC
 
Posts: 2
Joined: Thu Jul 22, 2021 10:50 pm

Re: Timed Beeper using TPL51111

Post by HallidayC »

Thank you Dave! I have a soldering kit here ready to go, I just wanted to make sure it was working before I made anything permanent. I will dive into this feedback and report back with any issues. Thanks again!
dastels wrote:First a comment: the use of the power&ground rails on the right side for the beeper is confusing at first glance. It's best (and clearer) to keep those for power & ground.

Next, you didn't solder the header to the TPL board. Anything in a through hole pad needs to be soldered to ensure a stable, quality connection. If it's not soldered it won't work, very well or for long. It's almost guaranteed that a high speed data signal like in an I2C or SPI connection (not the case here) will just not work.

The real problem is that the TPL5111 doesn't work how you want/need it to.

The potentiometer sets the timing, i.e. have it beep every 30 seconds

The duration of the beep is controlled by the DONE signal. DONE has to be usually low, i.e. 0v. When DONE is switched to high (i.e. the voltage on the VDD pin) the output "turns off" and will remain so until the time set by the potentiometer has elapsed, and the whole thing repeats. Your problem is that you aren't using the DONE pin to turn it off.

You can use a simple RC (resistor/capacitor) circuit to make DONE high (enough) after a short time. That time will depend on the values of the resistor and capacitor.
Wire the resistor between ENout and DONE, and the capacitor (paying attention with which side is negative (connect it to ground)) between DONE and ground. Now with ENout goes high the capacitor will charge through the resistor and the voltage at DONE will increase. When it gets to a high enough value, DONE will be triggered and ENout will go low again (discharging the capacitor as well as turning off the buzzer). I found that a 27k ohm resistor and a 10uF capacitor gives about a 1 second beep. Using a higher value resistor will cause a longer beep.

See issue 10 of Hackspace Magazine (free PDF at https://hackspace.raspberrypi.org/issues/10) for my article on capacitors.

Dave

User avatar
dastels
 
Posts: 15655
Joined: Tue Oct 20, 2015 3:22 pm

Re: Timed Beeper using TPL51111

Post by dastels »

Unfortunately, not soldering something like that opens it to all sorts of connection problems. With this circuit it's not as much of a problem since it's quite simple, and no MCU or communications are involved. Just something to keep in mind.

Just to mention, I did test out the idea and it does the job... nothing fancy needed.

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”