WS2812 RGB LED Ring is ground required?

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.

So i would like to know if the ground is required for any kind of safety?

Thanks!

Always show us a good schematic of your proposed circuit.
Show us a good image of your ‘actual’ wiring.
Give links to components.


Yes, the pixel strip/ring needs a GND connection to the Arduino GND.

Hi LarryD, can you please explain me why it still work without GND?
Here is what I'm trying to do.

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 :smile:) 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.

Why would you want to disable the led ring?
Is the problem that you have too little input/output pins?

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.

image

  • Why are you using 3.3V to power the pixel ring ?

  • Your switch should not be breaking the GND connection to the ring, break the power (+5V) connection instead.

If you digitalwrite a low yo your buzzer it will take no power.
If you set all your leds to 0, the ledring should use almost no power.

@ 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 connect the buzzer between 5v and the output pin thru the 1k resistor.

You can then switch the buzzer 5v with the switch.

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.

based on the documentation of ToneAC library i should use pin 9 or 10 and do not see anywhere how to use 5v pin with the buzzer.

5v——1k——buzzer——Pin 9

Oh Ok, let me test that.

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.

OP seems to be using toneAC (H-bridge drive for more volume).
Leo..

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).

Does the buzzer buzz when you connect it from 5v to grond via a resistance?
Or does it tic?