Connect with us

Led lighthouse

Discussion in 'Microcontrollers, Programming and IoT' started by turbogt16v, Feb 10, 2018.

  1. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    Hy
    I need code that will act similar to this light

    And would also like to know what function do i use to turn off that code lineary when swich comes on ,in about half second
     
  2. Bluejets

    Bluejets

    3,517
    713
    Oct 5, 2014
  3. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    Ok,so i got it running and the code seams litle to linear how can i upgtade code for somethimg more exponential light curve,so the light would seam more natural,the only thing that looks live in this code is peak ,that gives it a litle life,but i want light to keep brightness level different at different level of brightness.
     
  4. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    Ok here is a little scech of my code and the one i woul like to make
    DSC_0235.JPG
     
  5. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    And another question do i need a resistor between source and adruino gtound,and what walue
     
  6. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    Ok so i have a problem, when i connect mosfet led and adruino,the led wont start unles i tap the gate of mosfet with finger.
    I tried warious values of resiator between gate and source,but no help to start code ,led only freezes in secound i tap,and stays in that lightning level,
    Doni need transistor or what
     
  7. duke37

    duke37

    5,252
    725
    Jan 9, 2011
    A fet has a very high input inpedance and the gate voltage will stay where it is put if not connected to anything else.

    Does the output of the arduino provide sufficient voltage to switch the fet?
     
    turbogt16v likes this.
  8. turbogt16v

    turbogt16v

    173
    4
    Mar 27, 2015
    I power led and audrino from 9v 300ma

    Ok i tried 12v 1,5a and it works
     
    Last edited: Feb 15, 2018
  9. duke37

    duke37

    5,252
    725
    Jan 9, 2011
    The arduino (never used one) will not give out 9V, it will be run from 3.3V or 5V. 5V is necessary to turn on the irl520 logic level fet. A low value resistor from gate to source will reduce the drive voltage.
     
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.
Similar Threads
Loading...
Electronics Point Logo
Continue to site
Quote of the day

-