Go Down

Topic: WS2812b led strip and arduino, should I give up? (Read 1 time) previous topic - next topic

sblantipodi

#15
Jan 19, 2019, 12:03 pm Last Edit: Jan 19, 2019, 12:03 pm by sblantipodi
It offers a good balance between protection and not cutting the drive voltage down too much. Mainly from imperial experiments.

Powering from both sides is always preferable if possible.
You should always have the resistor the 5V side of the of the converter.

I am not convinced that those I2C converters are fast enough for Neopixel driving.
Thanks for the answer mike
How.can I see if they are fast enough?
If seems that my ambilight reacts well to movies and multimedia in general. Should I check something? Thanks

PaulRB

How.can I see if they are fast enough?
If the standard example sketches for FastLED or Neopixel libraries run normally, and the patterns and colours displayed are as expected, then the converter is fast enough.

These converter modules are designed for use with i2C and similar signals, which have a data rate of 100KHz or perhaps 400KHz. WS2812B leds use a data rate of 800KHz. I found that when I used these adaptors for LED strip purposes, the strips displayed colours and patterns correctly, but if I touched certain contacts on the adaptor with my fingers, the strips would flicker, freeze and not show the correct colours & patterns. As soon as I removed my fingers, the patterns would return to normal. This indicated that the signal to the strip was only just good enough. Mike suggested that I should try a 74hc14 chip instead of the adaptor, and I found this was much more stable, because it did not react in any way to being touched - the colours and patterns remained stable.

sblantipodi

If the standard example sketches for FastLED or Neopixel libraries run normally, and the patterns and colours displayed are as expected, then the converter is fast enough.

These converter modules are designed for use with i2C and similar signals, which have a data rate of 100KHz or perhaps 400KHz. WS2812B leds use a data rate of 800KHz. I found that when I used these adaptors for LED strip purposes, the strips displayed colours and patterns correctly, but if I touched certain contacts on the adaptor with my fingers, the strips would flicker, freeze and not show the correct colours & patterns. As soon as I removed my fingers, the patterns would return to normal. This indicated that the signal to the strip was only just good enough. Mike suggested that I should try a 74hc14 chip instead of the adaptor, and I found this was much more stable, because it did not react in any way to being touched - the colours and patterns remained stable.
I'm waiting the 74hc14 as per mike suggestion, in the mean time using logic level converter, I will keep you posted if I will encounter some problems with it.

sblantipodi

it seems that ambilight does not suffer from problems using the logic level converter.
probably because ambilight sends a signal every 15ms so it doesn't need fast response? in any case I am waiting for 74hc14.


another question if I can...

currently I am using a schema similar to this:


I have an
- ESP8266 on a wemos d1 mini lite
- logic level converter
- 220ohm resistance on the GPIO
- 1000uf 16V capacitor on the 5V line.

I noticed a strange thing though...

If I connect the power to the strip, and than connect the ESP to the PC, monitor blink black and then return the image.

Is this a signal of some malfunctioning? I don't want to burn the pc.

PaulRB

#19
Jan 19, 2019, 07:36 pm Last Edit: Jan 19, 2019, 07:42 pm by PaulRB
Quote
because ambilight sends a signal every 15ms so it doesn't need fast response?
No, the update rate is not relavent here. The doubts about the speed of the level convertor concern things that happen 1,000 to 10,000 times faster than the update speed. The concerns are about the speed that the signal between the Arduino pin and the first led in the strip can change from a 0V to 5V and back again. If those signals cannot change fast enough, then the data will be corrupted and the strip will not be able to receive it correctly, because the 0s and 1s of the digital data are transmitted by different timings of the transitions from 0V to 5V and back to 0V again.

PaulRB

Quote
monitor blink black and then return the image
I do not know what could cause that. I am also concerned that the pc could be damaged.

Search your circuit for any possible short circuit. It may be that a short circuit could be causing to much current to be drawn from the usb port.

Grumpy_Mike

Quote
If I connect the power to the strip, and than connect the ESP to the PC, monitor blink black and then return the image.
Connecting a PC to an Arduino while it is running will reset the Arduino. Best not to connect anything once it is powered up.

sblantipodi

I do not know what could cause that. I am also concerned that the pc could be damaged.

Search your circuit for any possible short circuit. It may be that a short circuit could be causing to much current to be drawn from the usb port.

this is the final image of my exact circuit.

there is no short on the circuit but probably I'm sharing 5V via usb from the esp and the pc.
how can I "save my PC"?

Paul__B

#23
Jan 19, 2019, 10:54 pm Last Edit: Jan 19, 2019, 10:54 pm by Paul__B
Please be specific.  Which monitor "blinks black" when you plug what into what and what does it show when it comes back?

sblantipodi

#24
Jan 19, 2019, 11:53 pm Last Edit: Jan 20, 2019, 12:13 am by sblantipodi
it's incredible...
I have a power strip. on this power strip is connected the monitor, the PC and the 5V power supply I use to power my leds.


now I have the PC, the monitor, the 5V power supply connected to the power strip.
5v power supply is disconnected from the arduino project I posted in the picture in the previous post.
ESP is not connected to the PC usb.

now if I connect the 5V power supply to the 2 pin connector of my arduino project,
MONITORS BLINK :O :O :O :O

how can it be possible? it blink even if the usb is disconnected as soon as I connect the 5v power supply to the 2 pin connector :O

than if I connect the PC USB to the esp the PC monitor blinks again.

than the strip works correctly.

what can it be?

sblantipodi

I add a question

Is is safe to power LEDs from an external power supply and power the esp via pc usb to use serial communication with the microcontroller?

Is this normal or we need some protection like usb isolation?


CrossRoads

Yes, that is safe. Be sure to connect the GNDs together.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

sblantipodi

Yes, that is safe. Be sure to connect the GNDs together.
Thanks for the answer ...
But if it's safe why monitor blink when I connect the esp to the usb? :)

Grumpy_Mike

Quote
But if it's safe why monitor blink when I connect the esp to the usb? :)
Once you tell us exactly what you mean by monitor blink we would stand a chance of telling you. But as far as I am concerned your explanations are not very good.

sblantipodi

Once you tell us exactly what you mean by monitor blink we would stand a chance of telling you. But as far as I am concerned your explanations are not very good.
Pc monitor goes black for a second and then return to normal.

That's all but it's a clear sign of something not working correctly. Am I wrong?
If I disconnect the 5v leds power supply I don't see any monitor blinking

Go Up