Arduino PWM 5V to 10V converter

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

  1. DaChicken
    Offline

    DaChicken Green fingers

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

    So.... I finally had enough with this problem, and Yes... I am now officially giving up on this.

    I struggle to build a circuit which will amplify my 5V PWM signal of my Arduino Mega to 10V.

    Can someone please help me????

    I have found alot of diagrams online, tried most of them.... but with no success.

    I am willing to pay the person for the make of three 5 to 10V PWM converter.

    Is there anyone out there whom will help me with this problem?
     
  2. dart
    Offline

    dart Green fingers

    • APSA Member
    9%
    Joined:
    Mar 20, 2007
    Messages:
    407
    Likes Received:
    84
    Trophy Points:
    38
    Location:
    Cape Towm
    @DaChicken The best place to ask would be on http://electronics.stackexchange.com/ if you are looking for a simple way to do it. Perhaps if you explain the problem and what you have tried someone there can give you a clear answer?

    I would imagine that you would feed your PWM through a transistor to switch the 10v but I'm only a electronics newb myself :)
     
  3. shihr
    Offline

    shihr Administrator Staff Member

    • Super Admin
    23%
    Joined:
    Oct 25, 2007
    Messages:
    8,863
    Likes Received:
    1,786
    Trophy Points:
    223
    Location:
    Edenvale
  4. dart
    Offline

    dart Green fingers

    • APSA Member
    9%
    Joined:
    Mar 20, 2007
    Messages:
    407
    Likes Received:
    84
    Trophy Points:
    38
    Location:
    Cape Towm
    Do post back here if you get an answer or if not. I could try help if you get no where but its unlikely that it would be before next weekend....
     
  5. DaChicken
    Offline

    DaChicken Green fingers

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

    Ok... so I have tried the traditional way by using an 2n22222 transistor, some resistors and an external 12V power supply.... here is the link which I have followed:

    http://www.nano-reef.com/topic/218115-arduino-0-10v/?hl=arduino+0-10v

    I have also tried the opamp way. Here is the link:

    http://forum.arduino.cc/index.php/topic,180359.0.html

    Now according these forums they get it right.... But I am managing to do something 100% wrong.....

    I have now bought a 0V to 9V voltage regulator from Micro Robotics but my LEDs aren't running at its full potential... only approx. 85%....
     
  6. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Ideally I want to get at least 10V so that my LED unit can operate at its optimum.

    At the moment my plants aren't very happy.... when I put my Oddyssey light unit back the plants grow nice!

    The LED unit does have the correct light wavelength (2 x 30W 6500K Spot LEDS, 20 x 3W 6500K LEDs, 10 x 3W 3500K LEDs, with 10 x 3W red LEDs)
     
  7. dart
    Offline

    dart Green fingers

    • APSA Member
    9%
    Joined:
    Mar 20, 2007
    Messages:
    407
    Likes Received:
    84
    Trophy Points:
    38
    Location:
    Cape Towm
    hmmm, that is pretty much what I though you would need (the NPN). I think that electronics.stackexchange is your best bet. But first make sure you can explain what you tried and what is not working.

    E.g. get a diagram (and pic if you can) of your circuit. Also describe why it fails. Post the stack exchange link here so that we can follow?
     
  8. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
  9. dart
    Offline

    dart Green fingers

    • APSA Member
    9%
    Joined:
    Mar 20, 2007
    Messages:
    407
    Likes Received:
    84
    Trophy Points:
    38
    Location:
    Cape Towm
    @DaChicken Oh I see. Again I'm I electronics newb but I think that is how PWM works. I.e. it is digital and it is only about controlling the pulse width hence the name. Your PWM output is digital so the output of the transistor and the OpAmp will also only be digital.

    What you are trying to do is generate a 10V analogue signal from a 5v PWM. That is two things from what I understand. First get your PWM working in the 0-10v range using the NPN. It sounds like you already have that, which is good.

    Step two is to get the 10V PMW signal smoothed into an analogue signal using caps etc. Let me see if I can find a link for you. But I think if you understand it is two separate problems you will get a lot further.
     
  10. DaChicken
    Offline

    DaChicken Green fingers

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

    Thanx @dart .

    Yes... my code is written to increase / decrease the voltage over a set time period.

    I will be waiting for the diagram. Thanx.

    I really hope I can solve this problem.... I am struggling with it for months... and I'm not exaggerating... that's why I am willing to pay someone to make it for me....
     
  11. dart
    Offline

    dart Green fingers

    • APSA Member
    9%
    Joined:
    Mar 20, 2007
    Messages:
    407
    Likes Received:
    84
    Trophy Points:
    38
    Location:
    Cape Towm
    No problem. It very often comes down to a small misunderstanding like this :). electronics.stackexhange seems pretty newb friendly though. I've also found a few nice tuts online that helped.

    Anyway for PWM to analogue you could look at this (RC filter) - http://www.instructables.com/id/Analog-Output-Convert-PWM-to-Voltage/

    Google for "PWM to analogue" will also get you a whole bunch of results that may actually help now
     
  12. dart
    Offline

    dart Green fingers

    • APSA Member
    9%
    Joined:
    Mar 20, 2007
    Messages:
    407
    Likes Received:
    84
    Trophy Points:
    38
    Location:
    Cape Towm
    BTW one very important thing to remember; your Arduino can only source a very low amperage. So don't try drive a large load directly or you will cook it. The transistor or OpAmp will sort this out for you in this instance. Just remember this for the future :) I.e. only drive small loads directly from your device. For higher loads use a transistor etc
     
  13. DaChicken
    Offline

    DaChicken Green fingers

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

    I will try this over the weekend and see if this works.....

    One question... the amps from the power supply.... it is 1.2A....will the opamp sort that out?

    I am using the Meanwell 60-48D drivers.....
     
  14. dart
    Offline

    dart Green fingers

    • APSA Member
    9%
    Joined:
    Mar 20, 2007
    Messages:
    407
    Likes Received:
    84
    Trophy Points:
    38
    Location:
    Cape Towm
    Eeek I can't say for sure. Check the opAmp or transistor's spec they should give you a max amp rating. I would guess so though.

    Let us know if it works?
     
  15. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Will do!
     
  16. f-fish+plants
    Offline

    f-fish+plants Aquascaper

    • APSA Member
    73%
    Joined:
    Jun 13, 2010
    Messages:
    1,922
    Likes Received:
    1,041
    Trophy Points:
    173
    Location:
    JHB - West
    Meanwell 60-48D requires voltage DC from 1-10 volt
    Meanwell 60-48P requires a PWM signal not DC

    So lets say you have the D i.e. need 1-10volt DC then just having 9 volt DC available means you can only drive the Meanwell 60-48D 83% or so of full load ( assuming 1 volt is off ) so you need to be sure that you get DC 10 volt on to the Meanwell 60-48D for 100% drive.

    You are in luck .. since a voltage doubler can do the trick .. see something like this

    http://www.picbasic.co.uk/forum/showthread.php?t=245&p=811#post811

    Later Ferdie
     
  17. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    Good evening @f-fish+plants

    have tried your method but it is still not working....

    I have followed the link you have posted but is still only managed to get 5.3V max out.....

    I am really getting frustrated now with this.....

    Can you please assist me?

    Regards
     
  18. f-fish+plants
    Offline

    f-fish+plants Aquascaper

    • APSA Member
    73%
    Joined:
    Jun 13, 2010
    Messages:
    1,922
    Likes Received:
    1,041
    Trophy Points:
    173
    Location:
    JHB - West
    I assume you have cranked up the frequency of you PWM

    BTW my understanding if you had the Meanwell 60-48P - you could run that straight from the Arduino
     
  19. DaChicken
    Offline

    DaChicken Green fingers

    • APSA Member
    51%
    Joined:
    Jun 8, 2013
    Messages:
    364
    Likes Received:
    123
    Trophy Points:
    53
    Location:
    Pretoria
    I would really like to get the P series... but is sitting with three D drivers now....

    Yes, I am still using pin 9 PWM on the arduino....
     
  20. f-fish+plants
    Offline

    f-fish+plants Aquascaper

    • APSA Member
    73%
    Joined:
    Jun 13, 2010
    Messages:
    1,922
    Likes Received:
    1,041
    Trophy Points:
    173
    Location:
    JHB - West
    ok what is your code that you are running to increase the frequency on pin 9
     

Share This Page