OXS as a lights controller?

Development & General Chat for the superb openxvario project.

Moderator: rainer

andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

Updated my previous post.

andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

Here is a very early beta of the add-on board (made in Eagle v6.6). The board is supposed to allow installation of one MS5611, up to 6 LED drivers (based on IRLL014N FETs) and up to 6S LiPo divider to do individual cell monitoring. At least that was the idea. :) The board size is about 40x50mm. It assumes that MS5611 will be placed on one side and the Arduino on the other.

The board is not yet ready for use! There may be errors - so a careful review is needed. Also, I have a dilemma on how to supply power to the LEDs. People will likely use various LEDs with pretty different voltage requirements. The FETs allow up to 55V which should be more than enough for most applications. But I'm not sure how to make a "universal" supply routing. I.e. someone may need 5v, and someone may need 12v, etc. The power can be taken from a battery balance connector, or from the "RAW" pin of the Arduino, or ... So for now I just made a pad (or possibly a pin) where the positive LED voltage needs to be connected to. Perhaps, there could be a better solution...

Once again: this is NOT YET TESTED !!!

Any feedback is very welcome!
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OXS as a lights controller?

Post by mstrens »

here a few comments:

I think that the size of the board could be reduced if you put some compoments at the same position (under) as the Arduino pro mini.

You put some resistors on the pcb between the led and the fet. Are you sure that those resistors can support the current. I presume that you put resistor of the size 0805. I think that they are foreseen only for 0.125 watt.

I think that some route are too small for the high currents in the led.

You foresee resistors between Drain and Source. Are you sure that those resistors are needed?

Did you consider using uln2803 or uln2804. It is an array of 8 darlignton; each can support 0.5 A, Darlingtons can be put in parallel in order to get more than 0.5A. They are cheap.

I am not sure that oXs can really measure in an accurate way a 6s lipo. Oxs can measure up to 6 voltages but in case of a 6S, you need a "strong" divider on the 6th cell. I am afraid that the precision of the measurement will not be good enough to calcute voltage of cell 6 (by difference with voltage on cell5).
I do not know if some users already tested it. Perhaps they can react here.
For sure 3S and probably 4S will be OK.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OXS as a lights controller?

Post by jhsa »

mstrens wrote: I am afraid that the precision of the measurement will not be good enough to calcute voltage of cell 6 (by difference with voltage on cell5).
I do not know if some users already tested it. Perhaps they can react here.
For sure 3S and probably 4S will be OK.
Then I think oXs should not support 6 cells, only 4 ;)

Just my 2c

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

Thanks a lot for your comments!

Please see below:
mstrens wrote:I think that the size of the board could be reduced if you put some compoments at the same position (under) as the Arduino pro mini.
Not sure I understand your idea. In my version there are 6 FETs: 3 on one side and 3 on the other side. There is some free space left on one side - but it's not that much... In fact, I also have a feeling the space could be optimized, but I don't yet see how it can be achieved.
You put some resistors on the pcb between the led and the fet. Are you sure that those resistors can support the current. I presume that you put resistor of the size 0805. I think that they are foreseen only for 0.125 watt.
Yes, they are 0805. These come from my planned use case - I thought I will use a common BEC (5-6V) with some 3.3-4V LEDs. I thought these will be sufficient. If we are talking of higher current - maybe resistors should not be there at all.
I think that some route are too small for the high currents in the led.
Thanks! I think I need to figure out how to teach Eagle to make different types of tracks for different circuits...
You foresee resistors between Drain and Source. Are you sure that those resistors are needed?
These again come from my planned use case. These are supposed to allow the LEDs to glow while OXS keep them off. Yes, these are surely optional.
Did you consider using uln2803 or uln2804. It is an array of 8 darlignton; each can support 0.5 A, Darlingtons can be put in parallel in order to get more than 0.5A. They are cheap.
Hugh! These look nice and small! Need to think about it...
I am not sure that oXs can really measure in an accurate way a 6s lipo. Oxs can measure up to 6 voltages but in case of a 6S, you need a "strong" divider on the 6th cell. I am afraid that the precision of the measurement will not be good enough to calcute voltage of cell 6 (by difference with voltage on cell5).
I do not know if some users already tested it. Perhaps they can react here.
For sure 3S and probably 4S will be OK.
Do you say that individual cell monitoring for more than 4S doesn't make sense in this particular case? I read something about it, but I don't recall the details now. So those with 6S LiPos will have to measure only the overall voltage? I usually fly on 3S, so it wasn't an issue for me. Some time ago I thought I should try OXS cell monitoring on 6S. Unfortunately, it wasn't high enough on my to-do list... Perhaps, it's time to go back to this idea.

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OXS as a lights controller?

Post by mstrens »

Not sure I understand your idea. In my version there are 6 FETs: 3 on one side and 3 on the other side. There is some free space left on one side - but it's not that much... In fact, I also have a feeling the space could be optimized, but I don't yet see how it can be achieved.
Except the MS5611, you have no components on the PCB in the region of the Arduino. I expect that you could put e.g. some resistors in this aera.
If you plan to put some components (e.g. the fet) on both sides of PCB, you could do the same for the resistors of the voltage dividers.
Yes, they are 0805. These come from my planned use case - I thought I will use a common BEC (5-6V) with some 3.3-4V LEDs. I thought these will be sufficient. If we are talking of higher current - maybe resistors should not be there at all.
I have no experience with 3w led (so I am perhaps wrong) but normally if you use a 4Volt led, the current will be about 0.75A. If the bec is 6 volt, you need a resistor to limit the current. This resistor will take at least 1.5 volt and 0.75 A so it will have to dissipate more than 1W. This is much more than the power supported by a 0805.
These again come from my planned use case. These are supposed to allow the LEDs to glow while OXS keep them off. Yes, these are surely optional.
If they are ommited, you can spare space on the PCB.
Do you say that individual cell monitoring for more than 4S doesn't make sense in this particular case? I read something about it, but I don't recall the details now. So those with 6S LiPos will have to measure only the overall voltage? I usually fly on 3S, so it wasn't an issue for me. Some time ago I thought I should try OXS cell monitoring on 6S. Unfortunately, it wasn't high enough on my to-do list... Perhaps, it's time to go back to this idea.
It should be good to test once the accuracy you can get from oxs.
I expect that there is no issue for the total voltage but I am afraid about the accuracy of the voltage of the highest cell. A test should confirm it or not.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OXS as a lights controller?

Post by mstrens »

did you look on ebay to this kind of component in order to drive your led without dissipation in a resistor.
search with
led driver
or
DC/AC 12V 1x1W High Power LED Driver Power Supply Pin Connector for one 1W LED

I think those devices use an IC to regulate the current. I expect that this IC has a pin to switch on.off.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: OXS as a lights controller?

Post by nigelsheffield »

http://www.ebay.co.uk/itm/1Pcs-LED-DRIV ... 4188852f64

16 channels and large and all channels are set for same current, might be something else out there better...
Problem here is each led will want different current, ...
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OXS as a lights controller?

Post by mstrens »

I think that the current supports by this IC is too small for driving 1 or 3W led.
I read in the datasheet that it drive only about 100 ma.
perhaps I am wrong.
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

Yeah, TLC5940 is only capable of driving 120mA which I think is not enough for us. Based on this criteria the initial FETs-based solution should be the best, though it's far from being perfect as a LED driver.

I have some FETs ready. I also bought a ULN2803. And I think my 3W LEDs have just arrived. So I hope to run some tests shortly...
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

I made some tests with a spare BEC laying around (with selectable output voltage at either 5.3V or 6.3V). In case of a 3W white LED connected in series with a 1K5 0805 resistor the current was 1.8 and 2.5mA respectively. In this case the LED brightness is Ok for glowing (or so it seems to me). The LED and the resistor didn't even get warm after 10 minutes of use.

In case of a direct connection of the LED to the 5.3V BEC, the current is about 1.35A. The LED survived that voltage, so maybe it is not so bad for blinking - and it eliminates the need for an extra resistor. I didn't run it for a long time, yet - I need to set the blinking up first. And ... the LED is so bright that it really hurts the eyes!
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OXS as a lights controller?

Post by mstrens »

When you put a 1.5k resistor in serie, the led delivers much less that the 3w : in fact it delivers only about 2 mA * 4 volt = 8 mw.
The resistor dissipates about 2 ma * 2 volt = 4 mw. So it is normal that it stay cold.
If you plan to limit the current so much, there is in fact no need to use a 3w led; you could use a much less powerful led.
Please note that Arduino can normally drive a current of about 20 ma. So even without any external tansistor (with just a resistor), you could drive the led. In this case, the voltage delivered by the BEC should not exceed 5 volt and the resistor should not exceed about (5 volt - 3 volt) / 20 ma = 100 ohm.
If you use a BEC which delivers more than 5 volt, then you should add a diode in serie in order to protect arduino pin.

If you connect the led directly to the BEC, I expect that the led will not survive a long time because you exceed largely his nominal power.
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

The 1.5k resistor is only to allow glowing of the LED between the blinks (this is supposed to be the resistor "between Drain and Source"). The blinking will be controlled by the OxS, and we'll need much more than 8mW for that. :)
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

Ok, here's the "proof of concept" video:

[BBvideo 425,350]http://www.youtube.com/watch?v=Px-DZS3kQXU[/BBvideo]

I apologize for the video quality - I'm a lousy camera man, but that's because the LEDs are too bright and too close to each other for the camera. :)

A brief summary of the video: There are 3 LEDs (Red, Green and White) controlled by the OXS. There are four blinking sequences configured, switched by a Throttle channel in this example. I also used my mod for the LEDs to glow when they are supposed to be off.
The LEDs I used are like this.

With short flashes the LEDs and FETs are cold. In case a LED lights up for 30% of the time, both LED and FET become somewhat warm - but still not hot. Lighting the LED up on full power for more than 50% of the time will likely require cooling (at least some kind of a radiator on the LED), it will also consume quite a lot of power - so I don't see a use case for this at the moment.
As I said earlier, glowing LEDs are cold, consume only a few mA and could remain glowing during the entire flight.

With the power and flexibility of up to 6 channels and 9 user-defined sequences, I think this is really a great lights controller!


mstrens, can you please look into the "default" sequence (in case of no PPM) and the battery monitoring features when you will have time?
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: OXS as a lights controller?

Post by nigelsheffield »

Have you considered charlieplexing to get more LEDs controlled from less pins?

http://makezine.com/projects/charlieple ... r-arduino/
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: OXS as a lights controller?

Post by mstrens »

It is a interesting schema still you have only one led ON at a time.
I presume that it is better not to use it for this application because it seems useful having several led ON at the same time.
I presume that having 6 led is already enough for this application.
If not, it would be possible to increase the number of leds:
- using some more Arduino pins
- using a special IC that should communicate with arduino via an interface.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OXS as a lights controller?

Post by jhsa »

i2c
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
andrewju
Posts: 784
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: OXS as a lights controller?

Post by andrewju »

I guess 6 is enough for a model, considering this is not just 6 LEDs, but 6 CHANNELS. The number of LEDs per channel is up to the aircraft engineer to decide (and also depends on the capabilities of on-board power system). :)

P.S. I'm testing something as I write this... So far it works great!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: OXS as a lights controller?

Post by jhsa »

Hi mstrens, I wonder if it would be possible to add this to the oXs. Please check the link

viewtopic.php?f=84&t=7299

By just connecting a shield with some MOSFETs to the oXs, one could very easily turn ON/OFF devices on the model. that is the case of onboard Glow for example.
It uses only one channel to turn several pins ON and OFF. The code is very small, so maybe it could be implemented?

maybe it would be even possible to control some devices, and at the same time and independently select different LED sequences, using the already implemented sequencer.
For example, you could not only select a different sequence, but also turn the lights ON or OFF.
I think it is an interesting idea. ;)

If you add this, there wouldn't be the need for 2 arduinos, one as sensor, and another as a multi switch.. oXs could do it all.
Please note that this can also be used to control equipment other than LEDs. I think this would be very useful.

Thanks

João

EDIT: Just thought of something, using the same concept I think you could change the behavior of just one sequencer channel without affecting the others.
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”