Announcement

Collapse
No announcement yet.

Using Arduino to Auto-dim LED EBY701?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using Arduino to Auto-dim LED EBY701?

    I have an arduino board and ... well, I want to put it to use.

    Does anyone know if it is possible to power the LED Backlight system in the EBY701 with your own power source? So.. instead of the EBY701 circuit board controlling/powering the backlight, I'd like to use my Arduino board to power/control the LED backlight and install an ambient light sensor in my vehicle somewhere so that at night the backlight automatically goes LOW and in the day, it automatically goes HIGH.. maybe have a feathering code on the arduino so it slowly fades between brightnesses when going through tunnels, etc...

    Being that the Arduino board is interfaceable to the computer through USB, even bluetooth and WIFI, a small front end touch-friendly GUI could be coded to be able to add a menu to centrafuse/roadrunner to allow manual control of the screen brightness settings through software.


    Anyone interested and want to help a buddy out with this idea?

    Thanks!

    -steve

    stevey500(at)gmail.com
    Age: 18 | Car: Isuzu Rodeo 01 | http://www.mp3car.com/vbulletin/show...s-eee-box.html

  • #2
    You got any experience with PWM? Any equipment to measure the power going through the LEDs currently? Shouldn't be too hard, really...
    2001 Mustang Convertible Worklog
    Indigo Custom Frontend (Flash/Delphi)
    Blog

    Qube v1.3 Now Available at the mp3Car Store!!!!!!
    The simplest IO controller you'll ever use!

    Comment


    • #3
      I do not have experience with PWM ... hmm, I have never programmed an arduino ever, willing to learn and experiment, having someone help me out that already has done much of this stuff would be a hella lot of help in getting in done quickly. Thanks man.
      Age: 18 | Car: Isuzu Rodeo 01 | http://www.mp3car.com/vbulletin/show...s-eee-box.html

      Comment


      • #4
        First things you need to know:

        1) PWM frequency of whatever is currently driving the LEDs
        2) voltage for the LEDs
        3) current through the LEDs
        4) which of these things change when the display is dimmed

        Take some measurements, and then you can replicate the results via Arduino (or a better board perhaps)...
        2001 Mustang Convertible Worklog
        Indigo Custom Frontend (Flash/Delphi)
        Blog

        Qube v1.3 Now Available at the mp3Car Store!!!!!!
        The simplest IO controller you'll ever use!

        Comment


        • #5
          Stevey may not need to know the LED parameters other than a suitable switching frequency - though 400Hz is a typical on many dimmers (except where flicker occurs...).

          It is simply a matter of varying the duty cycle of the LEDs for dimming.

          It is current (not voltage) that is varied - ie, duty cycled.

          If controlling whatever currently (pun) controls the LEDs, you merely modulate that (eg - transistors or FETs).

          Could also insert a MOSFET into the LEDs' + or -ve supply.

          In either case, LED voltages & currents need not be known (other than total LED current, but that is unlikely to be higher than what any MOSFET can handle).

          Comment


          • #6
            Yeah I was thinking LED current for a MOSFET. Cut the control line, modulate it yourself.

            I don't know how to use an Arduino, but I think there's an analogWrite function which starts a PWM? Not 100% how it works but I think you just give it a level -- analogWrite(255) would be full on? Not sure how you set up frequency though.
            2001 Mustang Convertible Worklog
            Indigo Custom Frontend (Flash/Delphi)
            Blog

            Qube v1.3 Now Available at the mp3Car Store!!!!!!
            The simplest IO controller you'll ever use!

            Comment


            • #7
              There are sample programs - LED dimming is a popular one.
              I think they are in C++ or similar.
              Just search...

              But PWM should be a digital out unless you have a voltage to PWM circuit.
              These days many have inbuilt PWM functions.

              Comment


              • #8
                First result on Google with search phrase "Arduino led dimming"

                http://www.arduino.cc/en/Tutorial/DimmingLEDs

                Comment


                • #9
                  Too complicated, you don't want crossfading.

                  I'm pretty sure you just do analogWrite(0-255) to set a duty cycle on a PWM output...
                  2001 Mustang Convertible Worklog
                  Indigo Custom Frontend (Flash/Delphi)
                  Blog

                  Qube v1.3 Now Available at the mp3Car Store!!!!!!
                  The simplest IO controller you'll ever use!

                  Comment


                  • #10
                    So Stevey thinks it's too complicated?

                    Comment


                    • #11
                      I just meant that one example was too complicated. It has three LEDs in a crossfade. Speakin of which, where is stevey!
                      2001 Mustang Convertible Worklog
                      Indigo Custom Frontend (Flash/Delphi)
                      Blog

                      Qube v1.3 Now Available at the mp3Car Store!!!!!!
                      The simplest IO controller you'll ever use!

                      Comment


                      • #12
                        Hopefully if he's intending to use the Arduino, he'll figure out from the linked example that the key instruction is " AnalogWrite (Pin, Val); "
                        where Val is 0-255
                        and Pin is a digital output.

                        That example provides the code needed - just cut out (or don't connect) the other LEDs.

                        As to the programming language (syntax) - don't ask me. I use assembler! (And I've only just started looking at the ATmega set.)

                        Comment


                        • #13
                          i've played with that code linked above and a few things to keep in mind is that around about 5% duty cycle the leds will flicker, and thats deponent on the MOSFET and leds.

                          I'll go through and slim the code that i have so far to just 1 photoresistor and 1 output if you'd like it.

                          another edit: dedicating a whole arduino to dimm the backlight is a bit of overkill, no? maybe somebody can point in the direction of a simple circuit that can do this....
                          IDK just a random thought

                          Comment


                          • #14
                            The flicker will be frequency - the MOSFETs & LEDs are capable of much faster switching.
                            Else it's beating with lighting (eg multiples of 50 or 60 Hz).

                            Decrease the cycle delay.

                            Comment


                            • #15
                              I use a 12F683 for some small PWM products. It can do what you need cheaply and it's fast. The speed issue has more to to with switching the MOSFET. For example sourcing with 5V logic as a control requires transistors to open and close the gate. You can get it faster with less parts by using a TTL level MOSFET on the sink side. As far as flickering at the low end, just set a minimum you can live with.

                              Comment

                              Working...
                              X