Looking for help/advice to create the simplest/easiest circuit to produce a double beep when power applied

Thread Starter

bbrenhoch

Joined Feb 1, 2022
19
Once I did lots of messing about with microcontrollers, then I learned about the ESP devices that come pre-assembled on nice board easy to add on to. A big plus is they have a USB socket right on board so all you need to program them is a USB cable you may well already have.

For your task I would look at the D1-Mini, perhaps 5 bucks each if you can find someone selling just one.

Writing the program isn't very hard though it is in C. The web is stuffed with tutorials, all the tools (programs) you would need to write your program are free.

Here's one on Amazon



Most of the pins can marked "D"-something be used as either an output or input. Oh, they also have Bluetooth. And Wi-Fi. Mine work with Alexa.
ATTiny boards seem interesting... I like the one you suggested and started looking around at options... I ran across this Digispark ATTiny85 that looks quite small and a good candidate as well.... Any experience with this one?

https://www.amazon.com/Ximimark-Dig...id=1643812671&sprefix=digispark,aps,96&sr=8-7
 

Thread Starter

bbrenhoch

Joined Feb 1, 2022
19
Really, generating two beeps can be done with a bit of CMOS logic running at the 1 volts. NO PROGRAMMING AT ALL. A simple counter with some delays and reset at power off. But it is 3:35 AM and now is not the time to design logic.
AND for use on a sea-doo the package needs to be waterproof and very rugged because those do bounce a lot.
@MisterBill2 thanks for the ideas. Water won't be much of a concern as this isn't a real watercraft it's a scooter built to look like one. There may be a little bouncing but far less that a watercraft.
 

Attachments

Thread Starter

bbrenhoch

Joined Feb 1, 2022
19
One suggestion of many possibilities are the ATTiny microprocessors.

They can be programmed with the Arduino IDE (free) and a programmer from Sparkfun. A complete plug and play system. One advantage is that the programming language is a variant of C and there are many resources and references readily available for the language and the Arduino IDE.

NOTE: IDE stands for Integrated Development Environment. It contains a smart editor (recognizes keywords and formatting of the language), library manager (pre-programmed routines for many external devices), compiler and uploader. All in a single program.
Thanks for the suggestion. I started looking at a Digispark ATTiny85 to play with. Seems like it might fit the bill

https://www.amazon.com/Ximimark-Dig...id=1643812671&sprefix=digispark,aps,96&sr=8-7
 

MrChips

Joined Oct 2, 2009
30,823
All good ideas.

I was thinking of running a 555-timer circuit in astable mode at 2Hz, 50% duty cycle (250ms high - 250ms low).
A second 555-timer circuit in monostable mode gates the first timer for 750ms. Doable with one LM556 dual timer.
 

crutschow

Joined Mar 14, 2008
34,464
Below is a simulation for my interpretation of MrChips' suggested 555/556 circuit;
I added R6 and R9 to the typical 555 astable circuit, to provide an initial 1/3 V+ bias voltage to C3.
Otherwise C1 starts out at 0V for the first pulse, making it significantly longer than subsequent pulses, where the capacitor voltage normally goes from 1/3 to 2/3 of V+.

The advantage of the 555 is that it should be able to drive the buzzer directly without an added transistor (with slightly reduced voltage, but that likely is not a problem for the buzzer).

1643828557428.png

Addendum: If you don't mind (or perhaps prefer) a short delay before the pulses start, you can eliminate R6 and R9 by connecting C3 to V+ instead of ground.
That also eliminates the long first-pulse problem.

1643829651912.png
 
Last edited:

AnalogKid

Joined Aug 1, 2013
11,055
Warning - a little friendly crankiness . . .

Is it just me, or did this thread go sideways in only six minutes?

Given this:
I only have very basic knowledge of circuits(I'm much better at engines and mechanics). Forgive the newbie-ness, I haven't done much with circuits since my childhood(70's and 80's) and my Radio Shack "150 in One Electronic Project Kit"
I respectfully disagree with this:
The simplest is a tiny 8-pin microcontroller chip.
The simplest? Really? "I don't think so, Tim."

Again:
I only have very basic knowledge of circuits(I'm much better at engines and mechanics).
IMnsHO, I don't think micro-anything is a good response to "very basic knowledge of " -anything.

In other news ...

No other components required.
Well, except for the power supply, and an output driver. And while the microcontroller programmer isn't a part of the final circuit, it is a critically essential component of its production. And then there is the software development system. Is that a component?

Of course, it needs to be programmed.
Yeah, about that ... Putting aside how long it would take for someone with zero C++ or Python programming experience to learn the operators and syntax, and get to the point of writing and debugging the core program, I contend that in the time it takes just to read up on and configure the I/O pins, you could build a double beeper circuit on perf board.

Abraham is spinning.

ak

Thanks to Wally for #25. Both he and I have posted several double-pulse circuits, going back to 2017 for me and probably farther for him. He posted the #25 circuit in 2019.

This also can be done with a CD4060 oscillator/counter, or a CD4017 and a 555, or three FETs and no ICs. Still, hard to beat the 4093.
 
Last edited:

MrChips

Joined Oct 2, 2009
30,823
Single chip MCU is still the simplest solution!
This does not refer to the tools and expertise required to implement that solution.
I could have that solution in the mail in one hour.

The next simple solution is to send the text file of the program code to the user.
User has to acquire their own programming hardware and has to follow programming instructions.

The two 555-timer solution (or one LM556) posted by @crutschow seems good enough to me. Drives 200mA load.
 

ErnieM

Joined Apr 24, 2011
8,377
ATTiny boards seem interesting... I like the one you suggested and started looking around at options... I ran across this Digispark ATTiny85 that looks quite small and a good candidate as well.... Any experience with this one?
I've got zero experience with this one, but after a very careful 3 minute read of the Amazon post I would say this would be fine for your needs. Do you run off 12 volts? That has an advantage over the ESP ones which will need 5 volts.

Still needs something to make some noise like that buzzer in post #13, or a small speaker, either of which just might run right off a pin of the micro. (DEFINITELY check this as I did not.)

Warning - a little friendly crankiness . . .
Is it just me, or did this thread go sideways in only six minutes?
<snip>
It seems the OP found a delightfully simple micro that suits his needs. Plus the component count of... one (as the board is a single part), easily modified, and may open a whole new world of ideas.

For code? Well shucks, I wrote that while you weren't looking:

C-like:
#define BEEPING_PIN 1

void setup() {
  // put your setup code here, to run once:
  pinMode(BEEPING_PIN, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(BEEPING_PIN, HIGH);  // start beeping
  delay(250);                       // beep for 1/4 sec
  digitalWrite(BEEPING_PIN, LOW);   // hush up
  delay(250);                       // shhhhh
  digitalWrite(BEEPING_PIN, HIGH);  // beep again
  delay(250);                       // beep for 1/4 sec
  digitalWrite(BEEPING_PIN, LOW);   // hush up
  while(1){};                       // all done, stay right here
}
 
Last edited:

dendad

Joined Feb 20, 2016
4,479
I too would vote for a micro to do the job instead of logic chips or 555s.
Maybe an Arduino Nano?
One thing that that micro like the Arduino Nano will do for you is supply a ready built board and a great support community.
As a bonus, you could add temperature sensors to trigger the alarm as an over heat alert.
And any other alarm that comes to mind.
Easy to modify. And a good learning project.
If you add a temp sensor, an LCD or OLED display may be the next step to display it all.
Battery voltage display too? ........
 

dendad

Joined Feb 20, 2016
4,479
"As a bonus" is where that came from. An indication of how easy it would be to extend the function later. Hard to do with a dedicated circuit.
 

dendad

Joined Feb 20, 2016
4,479
How easy it to extend the function after it is soldered to a board with only the needed components to do the original job?
Quite easy in my opinion.
A lot easier than if it is just a logic approach. For a temperature alarm, adding a resistor and thermistor soldered onto the pins of an Arduino Nano is not at all hard to do.
And an I2C LCD is just 4 wires soldered onto the correct pins as well.
Very easy to upgrade.
I have often found it hard to understand some folk's horror at using an Arduino.

In my industrial control custom designs over the years, I often added a couple of extra inputs and outputs over what the customer ordered, as most times, when they put them into service, they decide a couple more functions spring to mind. It had very often proved to be a wise thing to do.
So, I am a big fan of designing the device with an easy upgrade path from the start.
 

Thread Starter

bbrenhoch

Joined Feb 1, 2022
19
I've got zero experience with this one, but after a very careful 3 minute read of the Amazon post I would say this would be fine for your needs. Do you run off 12 volts? That has an advantage over the ESP ones which will need 5 volts.

Still needs something to make some noise like that buzzer in post #13, or a small speaker, either of which just might run right off a pin of the micro. (DEFINITELY check this as I did not.)
It will be installed into a 12v vehicle. The input voltage as well as the minimal nature of the board definitely helped in my choice :) I already have a buzzer with an input range of 3-24v
https://www.amazon.com/gp/product/B075PT19J2/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

For code? Well shucks, I wrote that while you weren't looking:

C-like:
#define BEEPING_PIN 1

void setup() {
  // put your setup code here, to run once:
  pinMode(BEEPING_PIN, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(BEEPING_PIN, HIGH);  // start beeping
  delay(250);                       // beep for 1/4 sec
  digitalWrite(BEEPING_PIN, LOW);   // hush up
  delay(250);                       // shhhhh
  digitalWrite(BEEPING_PIN, HIGH);  // beep again
  delay(250);                       // beep for 1/4 sec
  digitalWrite(BEEPING_PIN, LOW);   // hush up
  while(1){};                       // all done, stay right here
}
Thank you so much @ErnieM!! When I found this board I was Youtube-ing (how did we ever survive without this) and the video actually showed how to get up and going with it. It also demonstrated how to load a default blink script that blinks an onboard LED. I had thought I could work with that script as a start and modify the time, number of pulses as well as the pins. It will be cool to compare your script against that one to help learn some of the different options.

Blink script at Timestamp 5:10

Electronics, like IT, have a thousand different ways to accomplish the same thing. THANK YOU to all that have contributed answers... I haven't completely decided which way to go but this board seems like an easy place to start :)
 

ErnieM

Joined Apr 24, 2011
8,377
I have often found it hard to understand some folk's horror at using an Arduino.
Same here, though I have never used one. Once I did most of my micro work using PIC devices as they were fairly simple though they did require a custom breadboard every single time. A few (three?) designs even made it into products, one of which some 20 years on is still in production.

Lately the price of single board computers has come so low that I don't go the chip/breadboard route any more. I found the ESP devices when I started looking into my own IOT devices I could run with Alexa (who controls much of my home lighting now). Very cheap and powerful devices put into a few projects such as a candle controller (augmenting the IR remote with a box sending codes) and my four channel RGBW LED strip controller (because I could not find a remote for RGB and White that Alexa worked with). Developing software on my PC and uploading it over USB, and getting back debug info also over USB is delightful.

I also put the Raspberry Pi to good use. Got one for home to play with and found it very powerful for little money. Soon had a work project to switch a unit on and off 3,000 times for a life test. Of course, once completed the customer wanted to borrow it to do 6,000 cycles and "can we add inputs for the limit switches?" One VP told me never to agree to things like that we don't have weeks to accomplish it; I did it in a short afternoon.

I never got around to using an Arduino (though I do use the IDE), probably because there are so many variants I just haven't gone thru selecting one to start with. But I see no harm nor shame in using one.
 

Ya’akov

Joined Jan 27, 2019
9,170
Same here, though I have never used one. Once I did most of my micro work using PIC devices as they were fairly simple though they did require a custom breadboard every single time. A few (three?) designs even made it into products, one of which some 20 years on is still in production.

Lately the price of single board computers has come so low that I don't go the chip/breadboard route any more. I found the ESP devices when I started looking into my own IOT devices I could run with Alexa (who controls much of my home lighting now). Very cheap and powerful devices put into a few projects such as a candle controller (augmenting the IR remote with a box sending codes) and my four channel RGBW LED strip controller (because I could not find a remote for RGB and White that Alexa worked with). Developing software on my PC and uploading it over USB, and getting back debug info also over USB is delightful.

I also put the Raspberry Pi to good use. Got one for home to play with and found it very powerful for little money. Soon had a work project to switch a unit on and off 3,000 times for a life test. Of course, once completed the customer wanted to borrow it to do 6,000 cycles and "can we add inputs for the limit switches?" One VP told me never to agree to things like that we don't have weeks to accomplish it; I did it in a short afternoon.

I never got around to using an Arduino (though I do use the IDE), probably because there are so many variants I just haven't gone thru selecting one to start with. But I see no harm nor shame in using one.
As an aside, since you are using Alexa and ESP(8266?) boards, are you using Node-RED? Have you heard of it? It's really quite good, and you do an amazing amount of integration of HA devices with it. My son, who is not a programmer, was able to get all his Google devices to work with HomeKIt. It uses a graphical programming interface, but also allows for JavaScript functions, and it uses node.js and NPM so there are many, many modules.

Combining it with MQTT is very powerful and also actually a lot of fun when things just work, easily.

You can host the whole thing on a Raspberry Pi and this script makes it really easy to get going. Even though it hasn't been updated recently, it still works.
 
Top