power and dim control 12V LED strip

Hello, i want to power and control the brightness of a LED strip with Arduino.
The thing is, the strip has only 2 pins (12V, ground). It's not a RGB led strip.

I have a 12v-5A power source plugged into the Arduino Mega2560.

Can you tell me how to wire for power and for dim control with a digital rotary encoder.

thank you.

Hello, may you, please, post a link to your led strips so we can gather information on this said 2 pin led strip?

Also, I am not sure about rotary encoders, but you want the LED strip to be dimmed, why not use a potentiometer? Do you need a button and a potentiometer because that's what a rotary encoder basically is, and it is harder to program. Well, if the LEDs are not RGB what are they? I have never heard of a LED strip not having 3 or more wires. That is really strange. If so, do you want to also change the color of the LED strip or just change the brightness? Because if you want to change just the brightness then you don't need an Arduino, if you use a potentiometer. I am just really confused why one would use a rotary encoder if one was to just control the brightness of the LED strip, you could instead hook up the potentiometer in series with the power of the LED strip then hook it up with the wiper terminal of the pot to the LED strip.

Rotary encoder is also a unlimited range pot, which is why it is harder to program.

Like this:

UptownKitten:
Also, I am not sure about rotary encoders, but you want the LED strip to be dimmed, why not use a potentiometer? Do you need a button and a potentiometer because that’s what a rotary encoder basically is, and it is harder to program. Well, if the LEDs are not RGB what are they? I have never heard of a LED strip not having 3 or more wires. That is really strange. If so, do you want to also change the color of the LED strip or just change the brightness? Because if you want to change just the brightness then you don’t need an Arduino, if you use a potentiometer. I am just really confused why one would use a rotary encoder if one was to just control the brightness of the LED strip, you could instead hook up the potentiometer in series with the power of the LED strip then hook it up with the wiper terminal of the pot to the LED strip.

It’s an hydroponic LED strip.

Is this LED strip used for plants? If so, then why this specific led strip? You still didn't answer my other questions: why do you need a rotary encoder, why not just hook the LEDs up to a pot and power?

What are you using to power the LED light strips?

What's the voltage of the LED's, current rating? Datasheet? Brand?

UptownKitten:
Is this LED strip used for plants? If so, then why this specific led strip? You still didn't answer my other questions: why do you need a rotary encoder, why not just hook the LEDs up to a pot and power?

Because I'm making an Hydroponic Multipot lamp with my 3d printer, including time clock display, timer and dimmer.
My questions are legit. I want to learn step by step :

  • how to power a 12V LEDstrip via Arduino
  • how to dim with a rotary encoder
  • how to use a sevseg to show time
  • how to switch from time to dim percentage on the sevseg

I know I can just plug it to the wall.

UptownKitten:
What are you using to power the LED light strips?

I already answered that question. I'm using a 12V-5A output power source

Well, what all do you have for parts? I am sorry, I misinterpreted what you said earlier above #1, I thought you were using 12V with just the Arduino. And I am also sorry about me assuming you didn't know that you could plug it into the wall adapter. Let me just restart... okay, so why do you need a rotary encoder and not a pot? I am just trying to emphasis that one would be easier to code than the other, is it for adjusting the time? I mean, I am sorry that you already knew what a rotary encoder was and I assumed you didn't, it's just that people that are newbies I assume automatically they don't know how to code for Arduino and know very little about electronics, because they just started (hence why they are mainly called newbs). Is this, like, a learning experience or a legit project? And I am also sorry I didn't take your questions so legit. I just need lots of information about your project, like datasheets, websites, etc. I'm cool about the no code ordeal because I can handle that for you, but I just need to know EVERYTHING about this project or else I can't help you. I am new to this concept of the whole "2 pin LED light strip" thing, so I need to know LOTS of information on this subject and your project. Based on what you said, I can try to help you with your project. Do you have a schematic or do I need to make one?

Thanks,

UptownKitten

Did you also try any example code? What type of seven segment display? Like, one digit or four digits? Do you plan on multiplexing? How many LED light strips do you need?

Here's a good link for this project: LED light strip adjust brightness with rotary encoder

Part of the YouTube vid: GitHub LED strip

Put an N-channel MOSFET on between the GND wire of the LEDs and circuit ground. Drive the gate of the FET with a PWM output from the Arduino (i.e. analogWrite(...) ).

Read the encoder via digital inputs (if a quadrature encoder read both A and B phases) and map direction and summed count to a value between 0 and 255 which you'll write using analogWrite.

Choose a logic-level FET rated for ~30V or more and which can handle the current (with a good margin) of the LED strip when they're fully on.

UptownKitten:
Like this:

Err, no.

Seriously, just no! :astonished: :astonished: :astonished:

UptownKitten:
Part of the YouTube vid: GitHub LED strip

Thx for this video. Very helpful.

UptownKitten:
Well, what all do you have for parts? I am sorry, I misinterpreted what you said earlier above #1, I thought you were using 12V with just the Arduino. And I am also sorry about me assuming you didn’t know that you could plug it into the wall adapter. Let me just restart… okay, so why do you need a rotary encoder and not a pot? I am just trying to emphasis that one would be easier to code than the other, is it for adjusting the time? I mean, I am sorry that you already knew what a rotary encoder was and I assumed you didn’t, it’s just that people that are newbies I assume automatically they don’t know how to code for Arduino and know very little about electronics, because they just started (hence why they are mainly called newbs). Is this, like, a learning experience or a legit project? And I am also sorry I didn’t take your questions so legit. I just need lots of information about your project, like datasheets, websites, etc. I’m cool about the no code ordeal because I can handle that for you, but I just need to know EVERYTHING about this project or else I can’t help you. I am new to this concept of the whole “2 pin LED light strip” thing, so I need to know LOTS of information on this subject and your project. Based on what you said, I can try to help you with your project. Do you have a schematic or do I need to make one?

Thanks,

UptownKitten

Thx for your answer. I’ll post my project with details soon. I’m gathering the info.