Increase the control speed of milights

Advice on general approaches or feasibility

Increase the control speed of milights

Postby Satoer » Tue Nov 08, 2016 5:33 pm

First of all I would like to thank you for the library. It seems way more reliable than the other solution with a an emulation on a nrf24L01. But I have a problem, and I hope someone knows a solution to fix this.

I’m trying to react the light to music. But the problem is that it’s way too slow. I’m trying to control 25 lights. But it takes almost 5 seconds to turn them all on and off in sequence. Is there a way to speed this up?

I’ve looked into the code, there are a lot of delay’s, spi starting / stopping for sending just one command. Also a there’s a header that gets send before each packet.
Code: Select all
RGBWAndWhiteSendHeadPacket();
delayMicroseconds(350);


Is this necessary? If I comment this out it seems to work just fine.

Anyhow, the biggest culprit seems to be that it is retransmitting every package 100 times? If I lower DEFAULT_RADIO_TRASMISSION, than it really speeds things up. But sadly it’s gets less reliable.
So why does it send each package 100 times? Does the original remote works the same way? Is there a way to lower this a lot and keep the reliability? If I sniff the packets from the remote control (like dialling on the colour wheel) the speed is way higher. (and really reliable, it does not seem to miss a packet)


One “solution” I can think of is to set DEFAULT_RADIO_TRASMISSION to 1 and put every light in a array, control each light from the array, and repeat this at least 100 times.

Any other ideas?
Satoer
 
Posts: 2
Joined: Tue Nov 08, 2016 4:31 pm

Re: Increase the control speed of milights

Postby pietromoscetta » Fri Dec 02, 2016 10:30 am

Hello Satoer,

we apologize for this late reply but your post has been moved to the spam queue and only today with some adjustment to the forum we discovered it.
Unfortunately the MiLight bulbs use a one way radio communication protocol so the only way to be sure that the bulb will receive the command is to send it a lot of time.
We copied exactly what is done inside an original MiLight remote: it is sending a continuos stream of radio packets and for sure the Remote firmware is much more faster.
Anyway It is not suggested to reduce the DEFAULT_RADIO_TRANSMISSION because you will reduce the control distance and increase loss of packets.
Most probably you can work around the code and decrease as much as possible the delays between all the SPI operation bringing them to the minimum working value.

Ciao,

Pietro
pietromoscetta
Site Admin
 
Posts: 65
Joined: Tue Jun 30, 2015 3:03 pm

Re: Increase the control speed of milights

Postby Satoer » Sun Dec 04, 2016 10:31 am

Hi Pietro,
Thanks for the reply.
We copied exactly what is done inside an original MiLight remote: it is sending a continuos stream of radio packets and for sure the Remote firmware is much more faster.

Why is the original remote firmware faster if it’s exactly copied?

I might found another solution that probably speed things up by 3 times.

I’ve discovered the Autometion code sends the packages on 3 different frequencies. So the Milights probably are listening while randomly hopping between these 3 frequencies. And since these lights do not communicate, it’s probably not synchronized with the host. What if I send the light code on al the 3 frequencies at the same time?
My idea is to connect 3 extra microcontrollers connected to the same serial bus to the master microcontroller. Each extra microcontroller has its own LT8900. When the master microcontroller sends out the Milight code over the shared serial bus, and the 3 extra controllers send out the Milight code each on its own channel to the LT8900’s simultaneously.

This way I can get a performance upgrade of at least 3 times. Every microcontroller only have to send it 33 times to get the same reliability. I might even lower the resend transmissions because the package is always receiving the light no matter what frequency Its listening at that time.
One concern, the 3 LT8900’s might get interference with each other sending out data simultaneously although it’s on different channels.

What do you think?
Satoer
 
Posts: 2
Joined: Tue Nov 08, 2016 4:31 pm

Re: Increase the control speed of milights

Postby pietromoscetta » Fri Jan 27, 2017 12:41 pm

Hi Sator,

sorry your post was lost in the approval queue...
Telling the truth I don't know why the remote is faster.
Probably only because it has been designed only to sent hundreds of packets and optimized for that.
You idea seems nice but it will burn a lot of resorces to accomplish your objective.
But probably it is very important for you so let us know if your test was succesfull!!

P.
pietromoscetta
Site Admin
 
Posts: 65
Joined: Tue Jun 30, 2015 3:03 pm


Return to Project Guidance

Who is online

Users browsing this forum: No registered users and 0 guests

cron