Absolute Newbie! Simple LED Controller Question..

Thread Starter

simm

Joined Apr 30, 2019
5
So I am trying to build something that needs to control and power LEDs for a time slot during the day. Where do I start? Is there a logic board or module I can buy that would have that capability? I would prefer not to start from scratch as I intend to make more than one. Any help would be appreciated!
 

dendad

Joined Feb 20, 2016
3,084
More info plese.
Do you just want to turn an LED on and off at set times?
Or alter the LED brightness?
What power supply?
Power rating of the LED?
.......
 

Thread Starter

simm

Joined Apr 30, 2019
5
More info plese.
Do you just want to turn an LED on and off at set times?
Or alter the LED brightness?
What power supply?
Power rating of the LED?
.......
dendad, Yes, turn LEDs on and off at set times. The ability to alter LED brightness would be even better. PSU would be two AAA batteries or perhaps USB-C rechargeable internal battery. LED power rating would be very low, I only need a dim accent light.
 

dl324

Joined Mar 30, 2015
9,154
Still not enough information.

By set times, do you mean specific times of the day? Or do you mean on for a certain period and then off for a certain period? Some LED candles have a setting for them to be on for 5 hours and then off for 19 hours. The time of day depends on when they were turned on.
 

Thread Starter

simm

Joined Apr 30, 2019
5
Still not enough information.

By set times, do you mean specific times of the day? Or do you mean on for a certain period and then off for a certain period? Some LED candles have a setting for them to be on for 5 hours and then off for 19 hours. The time of day depends on when they were turned on.
Yes, a specific time of the day, say 8-9pm. It needs to be user-programmable either through buttons or bluetooth (although bluetooth is completely different animal).
 

dl324

Joined Mar 30, 2015
9,154
Yes, a specific time of the day, say 8-9pm. It needs to be user-programmable either through buttons or bluetooth (although bluetooth is completely different animal).
Given the requirement for time of day, being user programmable, wireless communications, and wanting brightness I think you're looking at a microcontroller (with an OS) based solution.
 

Thread Starter

simm

Joined Apr 30, 2019
5
Thanks dl324. Forgive my lack of knowledge, but where do I start with microcontrollers? Are there basic microcontrollers that can be *somewhat* easily programmed?
 

dl324

Joined Mar 30, 2015
9,154
The one I'm using is called C.H.I.P. It runs Debian Linux, has WiFi and Bluetooth capability. Once it has been configured to connect to WiFi, it automatically sets the time when it's booted.

It can be programmed with a number of programming languages. Ease depends on your expertise. I program mine with C, but you can also use scripting languages (bash, csh, PERL).

As Chip is no longer being manufactured, I'd look at Raspberry Pi. Pi Zero W has WiFi (but probably not Bluetooth), is reasonably small, and costs $10. The problem I have with Pi Zero W is that you can only buy in quantity 1 and shipping is almost the cost of the microcontroller.

EDIT: Just checked the specs and Pi Zero W does have Bluetooth (apparently it isn't supported yet).
upload_2019-4-30_9-28-32.png
Chip was selling for $9 and has more capabilities than Pi Zero W. That probably contributed to why the company went out of business.

You could go with a bare metal approach, but you'd need to do all of the heavy lifting.
 
Last edited:

Thread Starter

simm

Joined Apr 30, 2019
5
Wow, thanks Dennis! I really appreciate your detailed response. I will look into Raspberry Pi some more.:)
 

Reloadron

Joined Jan 15, 2015
4,593
I agree the uC is the way to go and if you want accurate ability to set times for actions to happen be it a Raspberry Pi or as an example an Arduino I believe you may need a RTC (Real Time Clock) solution added to your design. Now I see where you mention:
I intend to make more than one.
Rough guess at how many and cost per unit?
I also see where you mentioned:
The ability to alter LED brightness would be even better.
I would also consider using an Arduino Uno and here is my thinking. If you wish to control LED Brightness (intensity) as you mentioned the Arduino allows for an analog input. A simple inexpensive photocell could easily be configured on any analog input to control a PWM output to control your LED. Just as an example as ambient room light changes so would go your LED brightness. Ambient light decreases LED brightness increases or whatever you wish however you wish. You can buy a single Arduino Uno board for about $17 USD. You can also buy additional uC chips, with the boot loader already installed for about $5.00 each so with a single Arduino Uno board you can load your program on countless chips. Fii X3 Atmega328P-PU Bundle with Sockets. Once you have a design layout you have your boards made. As to the RTC a simple Google of Daily Timer will bring up a dozen solutions which can easily input to an Arduino or Rasberry Pi. Additionally a Google of Real Time Clock Arduino or Raspberry Pi will bring up other solutions all easily configured to the uC of your choosing. I only mention the Arduino because you mentioned LED brightness control and I don't believe the Raspberry Pi has an analog input available without using an add on ADC (Analog Digital Converter..

Regardless of which way you go there will be some programming involved and how many you plan to make and budget per unit figure into things. Depending on exactly what you want the hardware can vary.

Just My Take
Ron
 

dendad

Joined Feb 20, 2016
3,084
Have a look at the ESP8266. They have WiFi Also ESP32 have Bluetooth as well as WiFi.
Rui and Sara have put together a very good training set here... https://randomnerdtutorials.com/
It is well worth it!

ESP8266 and ESP32 boards are hailed as very good and versatile platforms and very cheap too.
A real time clock board is a good addition too, but you could have the ESP32 sync the time from the internet via the WiFi.
At the moment, one of my favorite varieties is the ESP32-CAM board. An ESP32 with a 2M pixel camera for well under $20
ESP32-CAM.png


EDIT: Also see the Sonoff range that use the ESP8266 and have an extensive hacking community. https://www.itead.cc/smart-home/sonoff-wifi-wireless-switch.html
 
Last edited:
Top