PDA

View Full Version : Discussion funny Circuit: On board LED CONTROLLER


rlord
Nov 13, 2007, 02:17 PM
I developed this circuit for a spanish forum (www.miliamperios.com/foro). The main function of this circuit is to emulate real plane light system. In that way it has 3 different led groups (blinking leds(4),fixed leds(9) and Takeoff-landing leds(2)).

It´s controlled by a radio channel so is capable of distinguish 3 different modes ( 1. OFF, 2. Landing/Take off, 3. Flight). In the first mode all leds are off (obviously). Second mode activates 2 leds (typically in plane nose) to see the runway, turn on all fixed lights and start blinking sequence. In third mode all leds go in the same way and turn off Takeoff/landing leds.

The circuit has 7 programmed sequences (plus one test sequence). You can move betwen sequences changing the dip switch bits.

I think it's better that you see circuit running to take an idea of its behaviour.

Original project thread:(Spanish)

http://www.miliamperios.com/foro/viewtopic.php?t=77791&postdays=0&postorder=asc&start=30

Manual:

http://rapidshare.com/files/69335554/Manual_Luces_RC.doc

Videos:

http://youtube.com/watch?v=sZOnyb1D3Ys

http://www.youtube.com/watch?v=GeblCBb0NAk

http://www.youtube.com/watch?v=vKWzlpWPP4E

http://www.youtube.com/watch?v=QbQndmpiRu0



PD. My English isn't brilliant, so please forgive me any mistakes. I tried to do my best but I'm not used to write in english

rcgolf
Nov 13, 2007, 10:42 PM
rlord.
Very impressive. I am also working on a project like yours. Mine is no where near as complex as yours. I am using a PIC 12f683 (8 pin) to control four led lights. It plugs in to an empty channel in the receiver (runs off receiver 5 volt) and is operated by a knob/switch on the transmitter with selectable modes. The PIC simply reads the channel Pulse Width Modulation from the receiver and runs a sequence in the program. It was just a test with the small 8 pin to see if I could get it to work. I plan to get a PIC with more output pins to expand the number of LED lights.
here is a short video demonstration.
http://youtube.com/watch?v=huLWSHL5djM

I am not proud of the looks of my circuit but it is very effective for my needs. Your circuit looks much more impressive and complex than mine. Both producing near the same results.

rlord
Nov 14, 2007, 02:48 AM
Hi rcgolf. I think your circuit main funtion is almost the same with less space requirements. The point is that my circuit was designed to big planes with a lot of lights inside. For small(foamies) or medium size planes your solution is better than mine.

Acetronics
Nov 14, 2007, 07:36 AM
Hi, Rlord

you wanted something like that ? :

http://www.mes-avions-rc.net/video/lighttest1.wmv

a simple 16 C(!) 84 drives it all ... why use a MONSTER 18F2620 ???

Alain

rlord
Nov 14, 2007, 07:59 AM
It has a simple explanation. I usually work with this pic in other projects and i took this one like a little entertainment. I don't want to buy others pics or take more time searching components.

It's not commercial, so doesn't matter how smart it is.

Acetronics
Nov 14, 2007, 08:42 AM
That's fun ...

because, here, hobbyists have very easy access to 16F84,628,88,876 and 877 but must go to Farnell's to get a 18F2620 ( @ 25 Euros or 35 US $ ) !!!


The question is not to be "smart" or not, but only is for friends to be able to reproduce the project ... ;) as you stated :

<< I developed this circuit for a spanish forum ...>>

Alain

rlord
Nov 14, 2007, 12:58 PM
Like you said before "but only is for friends to be able to reproduce the project". forum people will thank you very much if you migrate from original code to "easy access pics" with the same board layout. Original code is in C, so it isn't difficult to modificate for an electronics expert like you.

I don't want to use this thread to complain about my design mistakes (lots, i'm sure). I think you can link your circuit here (used in your video) so people can decide what's better for them. My initial idea is to help people in hobby stuff, i didn't ask for anything (i don't sell kits), but i think you didn't understand my intention.

PD. You can order free samples directly from microchip website (0 €/$) or buy online ($3.87).

Acetronics
Nov 15, 2007, 03:53 AM
Hi, Rlord

:D Time to update your knowledge :



Straight from Direct Microchip :



Device Total (EUR): 3.55


Shipping: (EUR):
15.17
Handling: (EUR): 5.00
VAT: (EUR): 4.65

--------------------------------------------------------------------------------

Total: (EUR): 28.37 :eek: :eek: :eek:


:( AND No more Samples sent for a private mail address ( xxxxx@orange.fr i.e. )


Alain

rlord
Nov 15, 2007, 05:17 AM
First: It´s simple to find "no private mail" to register. I find this pic in my local hardware shop for 10.3 €

Second: If you take a look to the spanish forum you can find the code

Third: I'm waiting for your code, please teach us how to do things

Propeller
Nov 15, 2007, 07:40 AM
Hi,

As all electronic gadgets (small or big) for our RC planes are now a days with a PIC. As lazy as I am, I didn't even build a PIC programmer yet, which is quite simple with all those schematics on the inetrnet. So I tried to figure out a schematic for navigation lights based on analog components and "normal" CMOS IC's.
It was a day of work to figure out which components to use and to draw the schematic. I aslo build the prototype on a test PCB which is about 4.5 x 1.2. It is possible to build this much smaller if I design a real PCB.
The functions are fixed LED's, blink LED's and landing LED's. For the blink LED's there are 2 outputs: 1 output with 1 blink and 1 output with 2 short blinks. For the landing lights you can turn them on and off by remote.
All the design consits of some analog components and 2 IC's.
The only downside of this schemtic is that there is a small error in the blinking LED's sequence. With the internal delay of the IC's some of the 2 blinks blink only once. After a 5 sequences of 2 short blinks the output only blink once, but it doesn't bother me. BTW I know you don't even notice during flight.
I will try to put a small video on this forum when it is working.

Propeller

Acetronics
Nov 15, 2007, 08:47 AM
[QUOTE=rlord]

First: It´s simple to find "no private mail" to register. I find this pic in my local hardware shop for 10.3 €

> you're lucky !!! this chip doesn't belong to any of our Web-retailers ...

Second: If you take a look to the spanish forum you can find the code

> I tried to re-compile the C code you talk about ... but refers to files from YOUR computer ... only.

> And overall it seems to be written for a 12F675 chip ( '675 header file and no references to ADCs in the listing i.e...) and not a 18F2620 . did I miss something ??? :confused:

Third: I'm waiting for your code, please teach us how to do things

> You'd like a transcription of YOUR Project or my poor old 16C84 file with its fixed ( but true ! ... clocked by Airbus pilot ...) timings ???

I'm not here to show what I've done, but to try to bring something usable to others ...

as one of your "Forumers" write :

<< La humildad es la madre de la sabiduría >>

Alain

PS : 500 $ for the compiler ... way too much for me !!! :p

AndyKunz
Nov 15, 2007, 11:54 AM
You probably have that much in an airplane. Not only do you get a great tool, but it allows you to make more toys more easily in the future - unlike a plane, which only lasts until it crashes.

With the dollar down right now, it's a good time for you to buy.

Andy

rlord
Nov 15, 2007, 01:17 PM
You can go to the second page (original thread) and will find the exact code. If you want to spoil the thread philosophy, you got it. If you think I didn't want to help the forum only myself, you're wrong (i don't know how).

In case you don't find the code, i posted it here so you can help me to make it useful to the forum. I haven't seen you posting something that forum people can use in their planes.


PD. Hablando de "humildad", ¿Dónde está la falta de ella en el hilo hasta tu primer post?. TRANS:Talking about "humility",Where is arrogance in the thread before your first post?. The guy who post this singular phrase in the forum is the same guy who is going to make a few circuits to forumers for free (only components costs)(Ignacio).

rlord
Nov 15, 2007, 02:10 PM
I think our conversation has gone beyond forum interests. If you want to post your design i will thank you (I want to know real timming). It'd be perfect if you can translate my original code to an 877 or something like that.

I will only reply to design questions. In that way i try to explain the use of 18f2620. (your question)

- It's familiar to me (I've lots)
- Microcontrollers works @ 8Mhz (internal RC clock), that help us to reduce electromagnetic interference (in adition of pcb layout). In this way, we don't need external xtal.
- PIC works at 2.5 volts. The reason is because of input travel goes from 3.0 volts to 15 volts. You can use 1,2 or 3 lipo element as power source (independent) or radio supply.
- It´s a prototype. 16f877 and this one is almost the same (+mem,+peri,...). The written code is in C, so you only have to change header file and few more.

bitmaniac
Nov 16, 2007, 02:40 PM
Propeller : Take a look here (http://www.rcgroups.com/forums/showthread.php?t=772567) if you are interested

Andy120
Nov 16, 2007, 03:16 PM
Guys
Can these be modified to operate 1W LED's?

thanks
andy

Andy120
Nov 16, 2007, 06:22 PM
I dont see them on the schematics, what range do they need to cover?
scrap that - brain failure!

thanks
Andy
NZ

rlord
Nov 16, 2007, 06:50 PM
Each led line can drive 500mA(MOSFET LIMIT), if led has Vf>2volts you can rise to 1w. But I Think it'd be better to change Mosfet using one which can handle more current. You also have to change drive resistors because design resistor are 1/2w.

phil_g
Nov 16, 2007, 07:23 PM
Its a shame how these discussions sometimes turn bad, here we have at least 3 people tackling the same problem in 3 different ways, all equally interesting and equally successful, but somehow we've fallen out over a circuit that flashes LEDs. Come on, lets all be pals, we might not build these projects but if they just give us an idea or make us think then they're all worthwhile, whether they be simple or complex.
[/SOAPBOX]
Cheers
Phil

rcgolf
Nov 16, 2007, 07:42 PM
Phil.
I couldn't agree more. In no way in my post did I mean any negativity or disrespect and apologize if my post came across that way at all. I'll be the first to admit my project is farthest from the correct way of executing the idea (See post 3 here (http://www.rcgroups.com/forums/showthread.php?t=772567)). Bottom line we are all here to learn, share & sometimes be humbled so that we can all excel in both our hobbies and passions.

Andy120
Nov 17, 2007, 12:45 AM
Can i assume the external power supply is 9v, or is it 5v x-a BEC?
Is any one who frequents this thread able to flash the code to the pic? For some reward?

Since the MOS can apparently cope with 0.5A and the 1W LED draws only 0.35A, wouldnt a 22Ohm resister replacing the 100Ohm surfice?

thanks
Andy
NZ

Acetronics
Nov 17, 2007, 05:18 AM
Each led line can drive 500mA(MOSFET LIMIT),.

Hi,

I disagree ...

The BS170 can't handle such CONTINUOUS current ( Internal resistance is 2.5 to 5 ohms @Vgs = 10v ) that make much more than a Watt to dissipate.

TO92 cases offer 250°C/Watt Rth ( from Phillips datas ...) and your poor BS is fried before you can see the smoke :eek: .

That only Make a continuous .3 Watts allowable = 245 mAmps ...

When blinking, that roughly allows 200ms / s of lighting time @ 500mA.

note here, for good visual effects, the "flash" has to have a minimum ON time of 150-200 ms ...
Understand, the BS will be at its great maximum for a "strobe" light effect, but no more ...


Add to that a 5*.5 = 2.5 v voltage loss ( Vds) in the BS 170 ...

Seriously, using TO 262 devices, like IRLZx4LZ i.e. or TO 220 would really be safer ...

Alain

rlord
Nov 17, 2007, 09:49 AM
I agree, I looked at bs170 datasheet and all acetronics comments are correct. In my design mosfet handles a maximum current of 100mA (at least in my tests) without problems.

Like i said before its a good idea to change transistors which will be able to handle more current (and dissipate that power). I'm sorry if I put you in a wrong way (Andy120)

xorcise
Nov 17, 2007, 04:02 PM
A FET will work nicely, but I disagree that T0-220 is necessary. Consider this Lo-Sat NPN in T092 package, Fairchild KSC5019, which that can handle 2A continuous and pulses up to 5A. Only 200mV drop across the C-E junction. Drive at 10ma and you get a lot out of a small package:

http://www.fairchildsemi.com/ds/KS/KSC5019.pdf

Andy120
Nov 17, 2007, 06:53 PM
I am 100% innept at such things. Can the pic18F2606 be replaced by a picaxe 28x ? the pins seem to have the same arrangement, pic's are hidiously expensive here.

Andy

xorcise
Nov 17, 2007, 07:05 PM
PIC18 are great but expensive. Consider a couple new big PIC16's that are very inexpensive, lots of goodies, and half the price:

PIC16F887/886 (http://ww1.microchip.com/downloads/en/DeviceDoc/41291D.pdf) for around $2 USD.