Help with LED timing IC project

Thread Starter

RC designer

Joined Feb 8, 2019
14
Hello! I'm just looking to learn how to program an IC or microprocessor for a realistic lighting system that I am wiring into a model airplane design.
Just need to know which type of processor to use and how to program it. It needs to be as lightweight as possible, and able to program specific types of strobe patterns for LED's. I looked at the 555 timer, but I'm not certain it can do the dual peaked flashes I need. For example: two quick pulses together, followed by a one sec delay. Such as.. blink blink...........blink blink....... Also, is there a way to use one small IC similar to the 555 to run two programs at the same time? Basically to describe what I need, it's just basic strobe, beacon, and solid lighting that all airplanes use. I know there are plenty of products that provide model aircraft lighting, however, they're not realistic enough, nor lightweight enough for my project. I've figured out how to use a tiny arduino to program lighting, but I'd really like to go smaller and lighter if possible. Thank you!!!

a319 kit with lights.jpg fronteir 319.jpg neff 319.jpg neff 319 6.jpg
 

djsfantasi

Joined Apr 11, 2010
9,163
Hello! I'm just looking to learn how to program an IC or microprocessor for a realistic lighting system that I am wiring into a model airplane design.
Just need to know which type of processor to use and how to program it. It needs to be as lightweight as possible, and able to program specific types of strobe patterns for LED's. I looked at the 555 timer, but I'm not certain it can do the dual peaked flashes I need. For example: two quick pulses together, followed by a one sec delay. Such as.. blink blink...........blink blink....... Also, is there a way to use one small IC similar to the 555 to run two programs at the same time? Basically to describe what I need, it's just basic strobe, beacon, and solid lighting that all airplanes use. I know there are plenty of products that provide model aircraft lighting, however, they're not realistic enough, nor lightweight enough for my project. I've figured out how to use a tiny arduino to program lighting, but I'd really like to go smaller and lighter if possible. Thank you!!!

View attachment 169803 View attachment 169804 View attachment 169805 View attachment 169806

How many LEDs or group of LEDs do you need to flash?

I am personally familiar with the Arduino family. Most of the supporting circuit is done for you, there is a simple (free) development environment to help you code and many people can advise you. Research the Arduino Nano.

If you are looking for a very small footprint and only need to control five or less LED sequences, maybe the ATTiny45 is the device for you. In 0.3”x0.4”, you can control up to five different LED groups.

First, check out the Arduino.cc site. It has a forum, reference and tutorials. Let me know if this interests you
 

djsfantasi

Joined Apr 11, 2010
9,163
I re-read your post. What you describe as separate programs CAN be done in one program. I am very familiar with the necessary techniques and can help you. I have a sketch that controls 12+ servos at the same time. All independent of each other and the timing of other devices.
 

JohnInTX

Joined Jun 26, 2012
4,787
It will take some work to get off the ground *ha* but a PIC 10F series in a SOT23-6 package is about as small as it gets. Cheap, too. You can check it out by downloading the free MPLABX and XC8 from www.microchip.com
You can run things in the free simulator to check out your code without spending a penny. A 10F would handle your two sequences.

Lots of PIC help here for the asking.

Good luck and welcome to AAC!
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,163
It will take some work to get off the ground *ha* but a PIC 10F series in a SOT-6 package is about as small as it gets. Cheap, too. You can check it out by downloading the free MPLABX and XC8 from www.microchip.com
You can run things in the free simulator to check out your code without spending a penny.

Lots of PIC help here for the asking.

Good luck and welcome to AAC!
That’s great, John. But I seem to be stuck. I’m a programmer and an electronic hobbyist. But so far I’ve found Pic programming elusive. I have a few Pics unused in my parts box. I did venture out with the ATTiny45 in recent projects. But with an inexpensive programmer, I’m able to code the ATTiny in Arduino C and simply upload it. LI’m spoiled by the ease in using an Arduino and it’s (free) IDE. One man’s opinion I guess. But for someone new to microprocessors coming from another discipline, the Arduino IDE is difficult to beat.
 

JohnInTX

Joined Jun 26, 2012
4,787
@djsfantasi You posted while I was typing and I can’t argue with that.
But if the TS can get up the curve, the tiny package is attractive. I worked with a member here on a tiny LED sequencer using a 10F in C. It wasn’t horrible.
And if you need help w/PIC let me know although the AT stuff is really nice.
Best,
John
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,163
You need the resistors. LEDs are current, not voltage devices and the resistors limit the current. If you need help with the resistor values, either post a link to their specifications or provide the forward voltage (Vf) and current specification (typical and max).

If I read your schematic correctly, you then only need to flash four LED groups. Easy-peasy with an ATTiny45.

Whether or not you need transistors, is dependent on the LED specs I mentioned above.

You have two options for a microprocessor. JohninTx’s PIC10F solution or my ATTiny85 solution.

I can provide code for you to try. I’m sure JohninTx can do so as well.

In my proposal, you’d install the Arduino IDE, add the libraries for the ATTiny programmer. Then, create the program. Either by cut and pasting something someone (me) sends you or typing it in yourself. Then, you will load the program into the chip and see it start working. The programmer can contain the LED wiring or it can subsequently be loaded into s chip that is moved onto a production. PCB

Let us know how you’d like to proceed.
 

Thread Starter

RC designer

Joined Feb 8, 2019
14
This is so exciting! I'm very grateful for your help gentleman! I have arduino IDE and use it for 3d printing with the uno. So that may be easier for me. I'll get the ATTiny on the way, and add the libraries. I'll also locate the LED's I had in mind and post back with that info so we can figure the resistors and possible transistors. Also, with 4 groups, is it possible to sync the two strobes together so they flash at the same time, and also the two beacons? Or is there a way to chain two of them to one output? What's your recommendation there if so?

Here is a link to a video showing the timing of the light pulses on the aircraft being replicated here.. skip to min 1:13 to see:

Thank you so kindly!!! So glad to have found a solution and great people to help!
 

djsfantasi

Joined Apr 11, 2010
9,163
You’ll also need the ATTiny USB programmer!

Yes, you can chain the strobes to one pin, assuming their flash pattern is identical.

Let me know how it goes.
 

Thread Starter

RC designer

Joined Feb 8, 2019
14
ah thanks! I'll wait to order everything at once after we find out which resistors. Some of these LED packs come with resistors and some people say they're running them on 9v? But I'd rather be sure about the wiring and do everything from scratch with the right stuff.

WHITE-
  • Size: SMD Led 0402(1.00x0.50mm)
  • Forward voltage:2.8V~3.4V, AC or DC Compatible.
  • Forward current (typ/max): 15mA/20mA
RED-
SMD Led 0603, Forward voltage:1.8V~2.4V, AC or DC Compatible.Forward current (typ/max): 15mA/20mA.

GREEN-
Forward Voltage / Direct Current : DC 2 - 3 Volt 20 mA



If we wanted to keep it simple as far as voltage, there are these that have all the same ratings, and I could just solder the wires-
https://www.amazon.com/Assorted-Lighting-Electronics-Components-Emitting/dp/B01CUGA380/ref=sr_1_13?ie=UTF8&qid=1549686930&sr=8-13&keywords=smd+led's
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,163
I have this programmer. It’s documentation contains links to the necessary libraries. It’s an alternative to the USBAVR listed by danadak

https://www.sparkfun.com/products/11801

This is Valentines weekend for me and my sweetie. I’ll get back to you in a day or two with more information re: resistors and programming.
 
Last edited:

danadak

Joined Mar 10, 2018
4,057
Then there is this, ArduBlock, a graphical interface to Arduino. You
drag and drop objects, config them, then hit Upload and it cross
compiles into Arduino code. Burn to Arduino and you are in business.

Simple way to create timed sequences, measure analog signal and use it
in various ways...control duty cycle, set alarms, move servos.....

http://blog.ardublock.com/2016/03/13/justin-petersen-my-pitch-for-ardublock-graphical-coding/


Note only works with Arduino 1.6.11 currently. Active facebook and Twitter
pages.


Regards, Dana.

Update : I have a link to a version that works with current Arduino 1.8.8. In
fact I think it should work with ATTINY85, more investigation in progress.
 
Last edited:

Norfindel

Joined Mar 6, 2008
326
Resistors for leds are easy to calculate. Just need to calculate the voltage over the resistor, and use ohm's law to calculate the needed resistance to get the current that you need to flow there.

For example: if the output voltage of the I/O pin is 5v, but the led has a Vf voltage drop of 2v, and you want to run the led at 10mA, the resistor needed will be (5v - 2v) / 10 mA = 300 ohms. Different led colors tend to have different voltage drops. Blue or White tend to have around 3v Vf (also could be more). The datasheets will give you the correct values.

Regards.
 

pmd34

Joined Feb 22, 2014
527
Have a look at the MIC1555 and MIC1557 they have similar functionality to the 555 but in a SOT-23-5 package. you should be able to wire a couple together to trigger each other to get the timing cycle you are looking for.
 

djsfantasi

Joined Apr 11, 2010
9,163
I've run into an oops, so the details will be delayed.

But, it looks like you'll need six resistors and the ATTiny chip. And nothing else expect for your LEDs. How do you plan on powering the LEDs? Your choice will affect the the necessary calculations. I think the best recommendations would be 4 AA batteries installed in the model base.

I've included all the calculations I performed so you can go forward on your own.
 

Thread Starter

RC designer

Joined Feb 8, 2019
14
Thank you so much for all the replies! I will take time to look into these alternatives. Hope you had a great V-day weekend DJS.

So I've decided to go with a set of LED's from amazon that have all the colors I need, and the same ratings for all colors.
This is 3v and 20mA for all. As far as power goes, I'm trying to save literally every gram possible in weight, so if it doesn't take much more weight in components, I'd really like to draw from the main power source of the aircraft system. The main power is a 7.4v 2s lipo pack. I have a BEC that will power the radio and servos separate from the thirsty electric jet engines, and that will power at an adjustable range between 5-6v and up to 3 amps for the servos. I'm also able to set it to power up to 2 amps if necessary. So Basically what I'm saying is, I'd like to draw from the BEC. If I could save weight by other means, such as using a 3.7v 1s lipo, or even a coin batt, which only weighs a couple grams, I'd be open to doing that. But the convenience of only having to install one battery for a flight is nice. I think I'd probably need a switch if I ran a second source or an extra step to plug the battery in and secure it to velcro etc. What are your thoughts? I'm ready to hit that amazon button! I can't wait! I'm still a little confused about programming. I read previously about using the arduino uno. But I'm also prepared to order the usb programmer if that's more convenient.
 

djsfantasi

Joined Apr 11, 2010
9,163
Great information. I still believe the ATTiny solution will be the best for your requirements. If you can supply 5VDC to the microprocessor and LEDs, my previous comments still apply. One microprocessor and a handful of SMT resistors. I’ll follow up tomorrow.

And I’ll include the software.
 
Top