Hello, I'm just looking for some guidance on a project I'm working on. I have a R503 fingerprint reader and 0.96" OLED display that are powered by a D1 mini which is encased within a 3D printed enclosure. That circuit has been running happily 24/7 for months without issue.
I'm looking to add an active buzzer to this project and have got the buzzer running on a secondary test D1 mini but just want to check my wiring plans attached (sorry if they're a bit of a mess, not used any online diagram tools before) are correct before soldering up to the existing circuit. Only the active buzzer is changing here. I'm not too familiar with the hardware side of things so not sure if I've got the resistor/power stuff right.
There are loads of different examples online of wiring up an active buzzer.... some just directly wire up the pins to GND and D5, some use resistors in between and some also add capacitors. For my quick test I just used a 330Ω resistor I had. I've not really gone into resistors/capacitors before so I'm not sure if that's needed or not but looking for a reliable and safe circuit with everything else that is currently attached.
Thanks for any help, I know this will be an easy question to most here!
Some power usage if it helps:
5V Active buzzer - 3.5 - 5.5V. <25mA
OLED 50% lit - 11.0mA
R503 Typical touch standby voltage: 3.3V, Average current: 2uA. Working current: 20mA
What are the specifications for the buzzer? What voltage does it require and how much current? I suspect, but don't know, that a D1 Mini GPIO cannot supply enough current, but with the limited information that's only a guess.
The board provides 3.3V on it's pins and the voltage for the buzzer is typically 1-60V so you are good there. The resistor is optional. I would encourage you to use a variable resistor as it's basically your volume control.
I would also test it on a breadboard before soldering anything. I make that mistake too often myself.
That screen runs reliably hooked off the webmos regulator? Just curious
Perfect thanks. Yeah the R503 and OLED part of the circuit have been running as pictured for about 9 months now, 24/7. I've not witnessed any problems there, the only addition in the pictured circuit would be the buzzer itself and potential resistor. Both circuits run fine individually, I've just not tried wiring all up and encasing yet.
I'm not going to need to alter the volume and it's all enclosed within a case so I think I'll be okay without the variable option. If you say the resistor is optional (which I do see in quite a lot of diagrams) what would be the point in adding it? Just to stop the buzzer from ever trying to grab more power that it can be given?
In this case, single inline resistor, it reduces current. In effect controlling the volume.
As it does not need to be adjusted later you can just test with different resistors until you find your desired volume, then go with that one.
Hmmm, I thought the generic buzzers were all pretty common in terms of specification but I guess not! It came from an electronics kit so is only listed as an "Active buzzer", I'll see if I can find the data sheet for it.
The D1 mini can provide enough to get the buzzer going (the test circuit works) but I was just unsure when also adding on the OLED (50% lit - 11.0mA) and R503 (Standby current: Typical touch standby voltage: 3.3V, Average current: 2uA. Working current: 20mA).
Edit: The 5V buzzer data sheet lists voltage at "3.5 - 5.5V" and current at "<25mA".
Maybe, maybe not. Even if they are you can't assume that everyone or even anyone reading this knows the specification of your buzzer. We need to know what you have, not what you assume we will think you have.
I get ya, looks like 12mA per GPIO pin and 500mA on the 3.3V and 5V pins. So if my understanding is correct the fingerprint reader and OLED won't come anywhere close to an issue as they're powered via those pins but the buzzer could as it might take up to 25mA which is well over the 12mA the GPIO pin provides.
I think this leaves me with two options? A transistor to boost the current to what the buzzer might use or to use a resistor limit what the buzzer can take? Given it works fine I suspect it's operating quite a bit under the stated "up to 25mA" listed...
Do you know Ohms law? If not, it's here Ohm's law - Wikipedia
Either way, what does it say about the current that the buzzer will draw through that resistor?
I understand that adding a resistor will reduce the current passing to the buzzer (whereas I probably would want to increase the current passing to the buzzer).
Does that mean if I pop the 330 resistor in the circuit and it continues to work then it's all good. i.e. 3.3V / 330 resistor = 10mA. So if working as expected the buzzer is taking up less than 10mA which is under the provided 12mA on the pin.
Yes, that was what I wanted you to work out. It will be less than10mA because some of the voltage will be across the buzzer.
One more thing, is the buzzer electronic or elector-mechanical? Anything with an electromagnet in it will produce voltage spikes that will kill the D1 Mini.
Just checked, sadly it's listed as electromagnetic. Is there anything easy to overcome this (as I'm very limited on enclosure space as-is) or is it likely easier just purchase a different type?
Yeah the buzzer is working fine on the second test D1 mini I have here (continuous loop of short beeps), I've not seen a diode used on any of the examples I've seen online either.
Would I know immediately if it's an issue or could it cause an issue at any time down the line? I have some diodes in this kit (listed as Do-41 diodes) but if it's not likely to cause an issue if it hasn't already I'd rather leave them out!
I can't really answer you very well. The only way to know for sure if the thing is generating high voltage spikes is to check with an oscilloscope, and I am guessing you don't have access to one. I don't know what buzzer you have so I can't comment. I'd expect if there are high voltage spikes that the D1 would die very quickly, but I also know that sometimes you get away with things you shouldn't get away with.