element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
DC to Daylight
  • Challenges & Projects
  • element14 presents
  • DC to Daylight
  • More
  • Cancel
DC to Daylight
Documents Driving LEDs to Create a Flux Capacitor -- DC to Daylight 08
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join DC to Daylight to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: tariq.ahmad
  • Date Created: 10 Mar 2022 3:57 PM Date Created
  • Last Updated Last Updated: 16 Mar 2022 8:24 AM
  • Views 35650 views
  • Likes 6 likes
  • Comments 6 comments
Related
Recommended

Driving LEDs to Create a Flux Capacitor -- DC to Daylight 08

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

In this episode we make a PWM LED driver using transistors and an Arduino Nano, which provide dimming and sequencing functionality for a Flux Capacitor. While not an exact replica, it does make a good demonstration of pulse width modulation and how to drive LEDs with a current sink/source

Supplemental Content:

  • Resources

element14 presents

element14 presents  | About Derek  |  DC to Daylight

  • LED driver
  • arduino nano
  • back to the future
  • derek
  • arduino pwm
  • current source
  • flux capacitor
  • pulse width modulation
  • pwm led
  • light emitting diode driver
  • current sink
  • arduino
  • bttf
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
Parents
  • Derek (DCtoDaylight)
    Derek (DCtoDaylight) over 3 years ago

    Hello all! If you have suggestions on how to improve this project, especially related to software let me know here. One of the things I'd like to do is to "power up" three LEDs at the same time so the pulsing looks more natural... meaning three of the LEDs are actively ramping through the PWM values out of phase. I think this would require three nested loops and maybe a state machine. Ideas?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 3 years ago in reply to Derek (DCtoDaylight)

    If you stick all 5 brightness values into an array then you can loop through that array to drive the LEDs.

    You then do 'math' on the array to change the effect.

    e.g. for a comet tail type effect you might reduce all the current values of the array by 'x', then set the leading LED value to max.

    The values of the array then get written to the LED's at the next update.

    You again reduce all the current values of the array by 'x', then turn the next leading LED value on to full.

    By doing so you get a fade-out effect following the leading LED.

    You may also want to replace your 'blocking' delay() functions with non-blocking code.

    If you assign the value returned by millis() to a variable to store the current time (since boot), then later in the code check to see if the time now is greater that the stored time plus an offset value in milliseconds and only if so, then write the contents of the array to the LEDs. Finally update the stored value with the current time.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • beacon_dave
    beacon_dave over 3 years ago in reply to Derek (DCtoDaylight)

    If you stick all 5 brightness values into an array then you can loop through that array to drive the LEDs.

    You then do 'math' on the array to change the effect.

    e.g. for a comet tail type effect you might reduce all the current values of the array by 'x', then set the leading LED value to max.

    The values of the array then get written to the LED's at the next update.

    You again reduce all the current values of the array by 'x', then turn the next leading LED value on to full.

    By doing so you get a fade-out effect following the leading LED.

    You may also want to replace your 'blocking' delay() functions with non-blocking code.

    If you assign the value returned by millis() to a variable to store the current time (since boot), then later in the code check to see if the time now is greater that the stored time plus an offset value in milliseconds and only if so, then write the contents of the array to the LEDs. Finally update the stored value with the current time.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube