Arduino PWM 5V to 10V converter

Discussion in 'D.I.Y.' started by DaChicken, Oct 10, 2014.

  1. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    Without seeing the code i could only think that the problem is between the arduino and the driver. Can you take photos or maybe a rough sketch of your connections?
     
  2. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Ah... what do you mean by floating pins?

    I am using PWM pins 9, 10 and 11.....

    I need to google more on that relay then... what will you be using it for?
     
  3. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Hey Wazi, I can take a photo... but it is still a mess with the wires so you will not be able to make out what is what,...

    I will try this weekend again.... trying to find the problem... are you guys going to the APSA meeting on Saturday?

    I will be there....
     
  4. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    OHHH Yes, I will be there. I don't have anything to Swap/Trade but hoping there is stuff to BUY.....
    I will try upload a pic of my project, it has been on hold for a while. waiting for parts from ebay if it will even get home. got to love the postal services.
    I will try upload a picture of my arduino....
     

    Attached Files:

  5. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    ha ha!!!

    I am still waiting for my 3 dosing pumps, SS filter cover and inline CO2 diffuser..... since AUGUST!!!!

    See you hopefully Saturday!
     
  6. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    Will be there. Wife and kid too. Hopefully pick up some nice goodies.
     
  7. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    Hello DaChicken. Did you ever come right with your leds fading on your project?
     
  8. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Good morning!!

    Happy new year!

    I had some time working on my light unit yes. But unfortunately it is still giving the same problem. I thought it was a floating pin causing the problem, then I spent some time making sure everything is grounded. But no success.

    The setup that is using the NPN transistor is where I think the problem is. Even if I switch off the arduino unit, it is still giving power to the LED drivers. I do no know why this is happening.

    at the moment I have connected my LED unit and CO2 reg. valve back to the old fassioned timer unit... .but I would really like to sort out this problem!!
     
  9. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    Ok, so after searching around for a solution this is the best I could come up with. Let me know what happens. WiringDiagNPN.jpg
     
  10. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Hey man,

    I have already tried this..... It did not work.....

    I do not know what is going on with this setup of mine!!!! FRUSTRATION!!!!!:BangHead::BangHead::BangHead::BangHead:
     
  11. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    oh Damn. I didn't know you tried this configuration. Im sorry to say but im all out of ideas then........
    have you got a wiring diagram of your project?
     
  12. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
  13. Riaan.N
    Offline

    Riaan.N Noob

    • APSA Member
    90%
    Joined:
    Apr 12, 2012
    Messages:
    96
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Pretoria
    I have not read the whole thread, so forgive me if I say what might already have been said and tried.

    From post #49, I don't see the need for the pot when the Arduino is to be used for switching and dimming the LED's.

    The correct way would be to know what base current is required to switch the load (10 V dimming voltage) and calculate what resistor is then needed on the base of the transistor. I would also put in a pull-down resistor on the base of the transistor to ground. Maybe try this first.... a 100k or so should be ok.

    Using a darlington transistor might be easier to switch.

    This is what comes to mind from my study years.
     
  14. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    The pot is used for Analog dimming. If I can remember correctly you said you were using the D type meanwell drivers, they use the analog type of dimming and the P type uses PWM.

    Just some quick info I got off the net

    What is the PWM Dimming Signal
    PWM (Pulse Width Modulation) signal is a digital signal where you can achieve dimming by altering a square wave form.
    This square wave form can be viewed as a pulse and changing the width of this pulse increases or decreases the dimming signal percentage that will be applied to your device.

    upload_2015-1-9_14-3-59.png

    What is Analog Dimming Signal
    Analog signal is one of the oldest type of electronic signals. It has been around for decades and can easily be achieved with a simple potentiometer.
    The dimming signal percentage is increased or decreased as the voltage on the analog signal increases or decreases.

    upload_2015-1-9_14-4-20.png


    Analog
    • Kessil A360 - Analog
    • Meanwell ENL series - D drivers
    • Meanwell LPF series
    • Inventronics drivers
    • Apollo LED fixtures
    • JBJ LED fixtures
    • Jeboa DC pumps and wave makers
    • Tunze controllable pumps
    PWM
    • Meanwell ENL series P drivers
    • Meanwell LPF series driver
    • Lux drive FLEXBOX drivers
    • PWM controllable PC fans
    • Jeboa DC pumps and wave makers

    Hope this info helps.
     
  15. Riaan.N
    Offline

    Riaan.N Noob

    • APSA Member
    90%
    Joined:
    Apr 12, 2012
    Messages:
    96
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Pretoria
    OK, I see now it can only output PWM and not true analogue.

    Maybe use a DAC then it can be done with just the Arduino and sunrise and sunset can be simulated and the intensity.

    MCP4725
    from Robotics.org.za
     
  16. Riaan.N
    Offline

    Riaan.N Noob

    • APSA Member
    90%
    Joined:
    Apr 12, 2012
    Messages:
    96
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Pretoria
    An even simpler and cheaper alternative is to use an RC circuit to filter the PWM signal so it "becomes" a dc signal. I assume that the MW driver has some sort of filter circuit on its dimming inputs that may help if the RC circuit is not perfect.

    Or replace the MW driver with a different MW driver like Meanwell LDD-1000H for example which has PWM dimming, less components and less things that can go wrong.
     
  17. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
    The only problem with the ldd series of drivers is the pwm input range. Power ON with dimming: DIM ~ -Vin >2.5 ~ 6VDC or open circuit - taken from the data sheet.
     
  18. Wazi
    Offline

    Wazi Green fingers

    • APSA Member
    9%
    Joined:
    Oct 12, 2014
    Messages:
    201
    Likes Received:
    93
    Trophy Points:
    38
    Location:
    Alberton
  19. Riaan.N
    Offline

    Riaan.N Noob

    • APSA Member
    90%
    Joined:
    Apr 12, 2012
    Messages:
    96
    Likes Received:
    3
    Trophy Points:
    18
    Location:
    Pretoria
    My interpretation is that the PWM signal must be within 2,5 Vdc to 6 Vdc in order for it to register that there is a PWM dimming control signal. Leave it open circuit if not used and to completely turn off either short circuit it or apply a voltage less than 0,8 Vdc.

    The downside of this LDD H series in my mind is that you still need a dc supply for the LDD. H
     
  20. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Good morning All!!!

    So I did not manage to solve the problem using the transistor idea as well as the op amp idea.....

    I decided Saturday morning that I will visit Mantech in Johannesburg..... I bought myself 4 of the MEanwell Ldd 1000h drivers......

    Man.... are these small things awesome!!!

    They only require 2.5V to 6V input to drive the LEDs.... Yes you need an additional power source, but for my LED setup, I already had an extra power source built in the unit.

    I must confess, I did struggle with my 2x 30Watt 30V Spotlight 65000K LEDs....

    I decided that I am going to leave the Big Meanwell ELN60-48D drivers inside and use the new Meanwell Ldd 1000h drivers to regulate the input of the drivers.... Yes, this idea is really expensive and not the best idea. But the problem is with the big spotlights....

    In order for my to only use the Ldd 1000h drivers and to remove the 60-48D drivers I have to buy a 30-30V 4A power source.... (the amps is to power all the other LEDs as well using only one power source).

    So for the moment.... This is working for me!

    I would like to thank everyone who helped me with this project, especially @Wazi ! I appreciate it!

    I also took this opertunity to hook up an Omron 5V Rely switch to my CO2 solenoid valve.... Now my CO2 is also connected to the arduino. This is awesome!!!!

    Now to play with the three light colors I installed (White, red and blue) to get the perfect sunrise/sunset color display.

    HAve a blessed day!!
     

Share This Page