Git Product home page Git Product logo

simpleledstripcontroller's Introduction

SimpleLedStripController

Simple Controller for RGB-LED-Strips

This is a Arduino sketch for a simple LED-Strip Controller. The user-interface is just a normal rotary encoder with pushbutton.

the final bread board setup

usage

  • push or rotate to wake up, then click (second time) to switch on
  • rotate to change parameter
  • click to switch to next parameter
  • double click to switch between effect and global parameters
  • long click (hold > 4seconds and release) to switch off

parameter tree

  • Global
    • effect
    • brightness
    • overwrite (use only part of led-strip โ†’ rest is overwritten with black)
  • Effect
    • static
      • hue
      • saturation
    • rainbow
      • duration
      • spread
    • plasma
      • duration
      • spread
      • hue

hardware

build

to compile this in arduino you have to install a bunch of additionally libraries: marked with * are my own ones and are not jet added to the library index. (so you have to download and install them the old manual way..)

overview / concept

the first concept is written in circuit python. but with a strip of 144*3=432 Pixels this is just to slow ;-) i then ported this to C++. (src_arduino)

the Code is heavily structured with classes. eventually at first this could be complicated to understand..

the main application is split into 3 parts:

  • MyMenu a helper class for a serial debug and test menu
  • SettingsUI
  • MyAnimation
    all things animation related. here the main work happens
    this uses some sub-classes for the effects and parameters.
    This way its easier to automagically handle some of the parameters:
    there are global_current and fx_current and similar variables. these have the base type and so are able to point to child-classes.

it is used as interior lighting for a car - therefore a DC/DC converter is used to generate 5V from the 12V extension battery

history

next time i will reevaluate the DC/DC converter market..
eventually for this it would make more sens to use a Pololu 5V, 15A Step-Down Voltage Regulator D24V150F5 the MeanWell SD-100A-5 is a great thing - but it misses a Enable Input.
so i head to use the external Switch..
the Pololu D24V150F5 has an Enable input - so no need for the extra switch..
also if i had more time in the first design decision phase - and would - why ever -
decide to use the SD-100A-5 i would reconsider just using a Mosfet as HighSide switch -
trying out things like the BTS441TG Smart Power High-Side-Switch

additionally i will try out another chip as levelshifter: SN74LVC2T45
the currently used SN74HCT125 as levelshifter maxes out at about 6MHz Clock/Data speed.
but the LEDs could go up to 20MHz according to some references..
this would give some more space for effect calculations...
(its also fine as is - the classic rainbow gives us 100fps currently...)
the other advantage of the SN74LVC2T45 is its VCC Isolation Feature -
currently i have to disable the outputs of the levelshifter to High-Z manually -
otherwise the leds try to power up from the 5V coming over the data-lines :-(
this isolation feature just does exactly this: if on of the VCC's is off the output is HIGH-Z :-)
one thing less to care about in software ;-)

currently the off-state current consumption is about 4mA@12V
1,5mA are alone for the standby of the small 5V DC/DC converter that powers the uC...
another ~1mA are going to the ItsyBitsy on-Board APA102 led...
so there is a bunch of things that could be improved.
but the Lights are run from the secondary Battery that is charged via solar..

simpleledstripcontroller's People

Contributors

s-light avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.