Arduino PWM 0-5v to 0-10v?

Discussion in 'I made this!' started by bearings, Sep 1, 2011.

to remove this notice and enjoy 3reef content with less ads. 3reef membership is free.

  1. bearings

    bearings Plankton

    Joined:
    Jul 10, 2011
    Messages:
    7
    Location:
    Fort Myers, FL
    Hey guys, I'm beginning my LED build.. I got the 36 LED kit from RapidLED and I am wanting to use this as an excuse to do something with my Arduino Uno. I want to use the PWM output of the Arduino to control the dimming of some MeanWell ELN-60-48P drivers.

    The problem is that while I'm very comfortable writing the software, but I'm a complete newbie when it comes to hardware. I've searched and searched for something that would tell me exactly what I need to boost the PWM to 0-10v, but none of it makes sense to me. Does anyone here know how I should go about doing that, or pointers to help me understand how that kind of thing works?

    If I can get some help with this then I promise I'll share my source code :)
     
  2. Click Here!

  3. insanespain

    insanespain Ocellaris Clown

    Joined:
    May 3, 2011
    Messages:
    1,479
    Location:
    Illinois
  4. bearings

    bearings Plankton

    Joined:
    Jul 10, 2011
    Messages:
    7
    Location:
    Fort Myers, FL
    Ok, I'll see if I can pick up a couple NPN 2N2222 transistors to play with.. thanks! Yeah I think it would be fun to share ideas and code. I was just reading your thread before I posted, I didn't want to hijack it with my question.
     
  5. bearings

    bearings Plankton

    Joined:
    Jul 10, 2011
    Messages:
    7
    Location:
    Fort Myers, FL
    So I picked up some NPN 2N2222 transistors today and I have them hooked up like this (scroll to bottom) https://sites.google.com/site/caddnima/myreeftank/led_controller

    I have my multimeter hooked up to see what the MeanWell driver would be receiving and I'm a little confused. The scale doesn't seem to be very linear, maybe not a huge deal but it's not what I expected so I'm wondering if I did something wrong.

    I'm using a 9V battery input for testing, I don't have a 10v power supply yet.

    When I have the output of the PWM pin set to 0, I get 0 and when I have it set to 255 I get full power, these are ok. However if I set the pin to just 1, I get about 3.0v. If I set it to 100 I get about 6.75v. If I set the pin to 150 I get about 8.1v.

    Is that what I'm supposed to get? It's definitely workable in the code, but I want to make sure this looks right before I get too far!