plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

LED strip + PWM not enough light

Wed Jan 25, 2017 4:54 am

Hi all,
I connected my LED strip as per this discussion and it's working fine, except that the light is really low even if I set the cuty cycle to max (100). It's really less than half of the bright than it should be. What could be the issue?

here's the code I'm using

Code: Select all

import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BOARD)
GPIO.setup(37, GPIO.OUT)

p = GPIO.PWM(37, 100)
p.start(0)
try:
	while 1:
		#p.ChangeDutyCycle(100)
		for dc in range(0, 101, 5):
			p.ChangeDutyCycle(dc)
			time.sleep(0.1)
		for dc in range(100, -1, -5):
			p.ChangeDutyCycle(dc)
			time.sleep(0.1)
			
except KeyboardInterrupt:
	pass

p.stop()
GPIO.cleanup()
thanks

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: LED strip + PWM not enough light

Wed Jan 25, 2017 6:21 pm

What are the specs of your LED strip? and your supply?

If you've connected it as in the last diagram on that page (apart from using a different GPIO), it should just work ©.
Reasons for it not doing so:
  • The FET isn't being turned on fully.
    The supply cannot supply the current required by the strip
    You're expecting too much!
If you connect the supply directly to the strip, is it now bright enough?
If not, then it's one of the last two.

plasticus
Posts: 34
Joined: Tue Nov 01, 2016 10:31 pm

Re: LED strip + PWM not enough light

Fri Jan 27, 2017 10:54 pm

Hi there, after trying everything, the issue was with the only thing I wouldn't think it was screwed..the transistor..for some reason (it was new) it wasn't working well..I soldered a new one and everything is fine now :D

User avatar
Burngate
Posts: 6302
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: LED strip + PWM not enough light

Sat Jan 28, 2017 11:43 am

According to IR's spec, the gate threshold can be anywhere between one and two volts. Similarly the Forward Transconductance can have a range.
Perhaps the first one was towards one end of the range, and the second at the other.

Glad it's working.

Return to “General discussion”