Hi all,
I have a buzzer and a RGB led ring and trying to use a switch 3 positions to make an option to disable the buzzer or the leds or both enabled.
So i do my wired with the ground connections of both buzzer and leds, it works with the buzzer but not for the leds ring. Doesn't matter if the ground is interrupted or not the Leds ring works.
After testing a realize the led ring look like do not need ground in order to work but on all tutorial i see the ground are always used so 3 wires (5V, Ground and D1) but on my test if i use 5V and Ground pins only it works also.
Most probably phantom power via the digital input of the LED module (that some of the time will be at ground level).
This may destroy your digital output. I strongly recommend a ground cable connected at all times. Not via a selector switch.
Humm phantom power (vampire power funny name ) i learned new thing.
Ok then i will think another solution to disable buzzer/Leds ring. But do you have any wiring suggestion to do that without using extra pins because i will use later probably an aTtiny85?
Thanks.
I would like to add ability to disable buzzer/Led ring for saving power purpose only. It should powered by a battery later.
I will later add an sensor and not sure will left extra pins.
@ LarryD I used 3.3v even looks made for 5v because of also saving power purpose. I read somewhere it may sometime not working but for me it always works so far maybe because on my code only one led are ON at the time and i reduced the brightness.
I thought actually to break the power 5V but i won't able to have action on both buzzer and led ring via switch.
@ build_1971 For your suggestion with digitalwrite will require me to use another pin in order to detect the switch state.
You can use the switch to turn off the buzzer.
I meant to say that there is no reason to be afraid that the buzzer will use power even if it is shut down in your code.
You should use a 470 ohm resistor in the data line of the LED ring.
That will stop the first LED and/or the Arduino pin from burning out.
Because it will reduce fault current to <1mA.
Don't know if the pin is HIGH or LOW when no data is sent to the ring.
That would determine if it's better to switch 5volt or ground to the ring.
Maybe someone can test that.
If the buzzer is a piezo, then just leave it connected.
It won't draw any current when not 'buzzing'.
Leo..
Ok i see it's work (the switch) but i realize i did not indicated with the buzzer i play a short song (some combination of high, low and duration on pin 10). In this proposed wiring as soon i power it the buzzer buzz continuously and my playing song do not have any effect anymore.
May be i could control the buzzer in code if i inverse the polarity in code if i use GND instead of its power pin .But i should put pin 10 to HIGH as soon the board boot but not sure i can prevent it to beep first.
Hi Wawa, so 470 ohm is enough then? Most tutorial recommend 1k.
I think the pin is LOW when no data is send. I use the piezo one and thinking to change it because does not bip louder (i tested 82dB).