Author Topic: Driving an RGB LED Strip  (Read 1267 times)

0 Members and 1 Guest are viewing this topic.

Offline aussieWTopic starter

  • Newbie
  • Posts: 7
  • Country: au
Driving an RGB LED Strip
« on: February 07, 2019, 12:22:20 am »
Hi
I am building a circuit to control some 12 volt RGB LED strips that I bought on AliExpress ( https://www.aliexpress.com/item/SMD-5050-RGB-LED-Strip-Waterproof-5M-300LED-DC-12V-24V-CCT-RGBCCT-RGBW-RGBWW-WHITE/32903257649.html). I am controlling each of the R, G, B channels through a mosfet which in turn is being controlled by a PWM signal from an ATMega328. The LED strip and ATMega are being powered using a 12 volt linear bench power supply. The LEDs seem to behave as expected, however, when I looked at the PWM signal on the scope (probing the Gate pin) I was surprised to see spikes in voltage of ~22 volt . That seems strange to me as I would expecting to see a nice clean square wave with a max voltage of 5 volts, but as I am a newbie I am seeking guidance from experts as to whether this is normal behaviour,  whether I may potentially do damage to my LEDs, what I may have done wrong in my circuit,  etc. I have attached a circuit diagram and a screenshot from the scope for reference.
Any advice/assistance would be most appreciated.
« Last Edit: February 07, 2019, 12:59:46 am by aussieW »
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Driving an RGB LED Strip
« Reply #1 on: February 07, 2019, 02:13:49 am »
Could be layout problem, could be probing problem. Most likely both.

First thing to ensure - proper probing (of high speed signals) so what you see on the scope screen is what actually happens in your circuit. Use spring clip, not ground "crocodile tail" and measure between two pins of the transistor (gate/ & source). Never connect ground of your scope probe at random ground point, always pick ground connection as close to probe tip as possible. For slow signals "crocodile tail" is ok, but for fast and hi-current spikes in nearby (ground?) wires - it acts like antenna.

 

Offline aussieWTopic starter

  • Newbie
  • Posts: 7
  • Country: au
Re: Driving an RGB LED Strip
« Reply #2 on: February 08, 2019, 01:20:53 am »
Thanks for the tip. My probing method was obviously the problem. After I got the probes as close as I could the wave form was a much cleaner square wave ranging from 0 to 5v.
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Driving an RGB LED Strip
« Reply #3 on: February 08, 2019, 12:48:11 pm »
Having the trig level right near the level of the 5V noise is a bad position, moving it down onto the pulses, or up onto the spikes would be better. :)
.  That took much longer than I thought it would.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf