Connect with us

Code light to pulse

Discussion in 'Microcontrollers, Programming and IoT' started by turbogt16v, Jan 27, 2018.

Scroll to continue with content
  1. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    Hy
    I am noob for audrino,i have played a litle 1 year ago,and forgot all.
    I need some assistance in making 10w led light with 12v input and with driver pulse something like lighthouse or similar like light is alive if you get my point.
    I have chinese audrino mini
    DSC_0227.JPG
    I need some help on code and on hardware that i need to buy
     

    Attached Files:

  2. Bluejets

    Bluejets

    3,991
    824
    Oct 5, 2014
    Code is in the examples " blink without delay" and drive output via logic level mosfet.
     
  3. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    OK,so i got this far

    i would need to run adruino mini from 12v is that ok ,or do i need L7805 and heatsink for this operation.

    second,is this https://www.ebay.com/itm/Pro-Mini-A...039661?hash=item58cbb948ad:g:6VsAAOSw9N1Vy-w3

    better than this https://www.ebay.com/itm/Redesign-P...498330&hash=item2ec77675a9:g:9pcAAOSwPe9Zt5Kr

    for future projects.

    will this mosfet work ok
    https://www.ebay.com/itm/5Pcs-IRF52...569727&hash=item4ada03ce09:g:bTwAAOSwEZdZ6vPb

    and i don't need code just to run light of and on,i need it to slowly dim in and out,like lighthouse,i would do the exact numbers i just need code example.Code would run random on different settings of dimness and timeing ,
    so it don't get repetitive ,and would like to install switch that just turns light to different code that just dimes light a little like flickering and light never goes of it just flicker,random variables of course.

    I know i maybe asking much about code ,but any suggestion would be of value,thank you
     
  4. Bluejets

    Bluejets

    3,991
    824
    Oct 5, 2014
    Run 12v to the RAW input . Not wise to go too much over 12v although others argue with this.
    A 168 pro mini has about half the memory of a 328 which won't be of much concern here but they cost about the same so why bother with the small memory version.
    There is also the 3.3v and the 5v models.
    Unless you specifically need 3.3v , then go with the 5v model.
    You can always add a $1 converter at a later stage if you really need it.
    The 520 mosfet is not logic level as far as I know and will probably need around 10v to turn hard on.
    For most small current applications you can stay with the 2n7002 mosfet.
    I think you can get maybe 10 off ebay for a few dollars.

    Edit: Just noticed you are running a load close to 1 amp which may make the 2n7002 run a bit warm so perhaps look for another " logic level" mosfet that can handle a bit more current. Because of the low on resistance, a to220 case mosfet will mostly not even get warm. I stress the words LOGIC LEVEL. Others may suggest a type as I cannot remember just at the moment and I am out of my workshop.

    JUst checked, the IRL540N (0.44 ohm ) rated at 36 amp max ( 5 for $3.16 Ebay)
    The IRL3803 (0.006 ohm) at 140 amp. ( 10 for $5.12 Ebay) China copies no doubt but should be ok.
     
    Last edited: Jan 29, 2018
  5. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    So if i use IRL540N i don't need led driver?
     
  6. Bluejets

    Bluejets

    3,991
    824
    Oct 5, 2014
    Normally not but it depends what your led specs are. For example, if your led can be driven straight from a 12v supply , no extra driver needed. What does the supplier say about it?
     
  7. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    I dont get it.
    If i have led 10w powered from 12v .
    And i use logic mosfet to swich it on off,
    How does adruino manage to manipulate with led brithnes
    If it can lower the power mosfet can be used as driver
     
  8. Harald Kapp

    Harald Kapp Moderator Moderator

    9,891
    2,096
    Nov 17, 2011
    LEDs are typically dimmed using PWM.
    Unless your LED has a built-in current limiter you will still need some form of external current limiting, e.g. a resistor. Here are the basics.
     
    turbogt16v likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-