Control many wireless receivers

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

Ferla
Flowcode v5 User
Posts: 64
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 5 times
Contact:

Control many wireless receivers

Postby Ferla » Thu Jun 14, 2018 8:21 am

Hello guys
I ask for your opinion.
I have to realize number 300 receivers each with a led powered by battery (eg CR2032-CR2450 or 27A 12V)
each receiver must have its own assignment code so that the single LED associated with it can be switched on with the transmitter.
To be clearer imagine a beehive where in every single alveolus there is a LED, each LED must be able to ignite individually.
The transmitter will obviously be driven by a PC via ehthernet.
All this must be without a cable so I have to use the Wireless transmission between the transmitter and the n.300 receivers.
What do you ask of electronics genius ...according to you which micro would you use and which type of transmission (Wi-FI, RF, bluetooth, etc.).What is very important are the consumption and the type of power supply, we know that there are some picmicro that can work in Extreme Low Power.
Distance between Emitter and receiver 10/15 meters.
Thanks to all those who will indicate a valid idea.
Ferla

User avatar
Benj
Matrix Staff
Posts: 12847
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 3637 times
Been thanked: 3499 times
Contact:

Re: Control many wireless receivers

Postby Benj » Thu Jun 14, 2018 11:14 am

Hi Ferla,

For something like this it might be worth using Zigbee, it's a low power mesh network so each receiver can also forward packets onto other receivers that may be further away from the main network coordinator. There is also a SendToAll addressing mode if you need to broadcast a message to all nodes.

The main downside to Zigbee is the data throughput is fairly low. The upsides are that it is designed to be battery powered and you can easily add encryption if you need high security.

Flowcode supports the XBEE range of Zigbee modules in AT command mode.

This course document should be useful, starting from page 69.
http://www.matrixtsl.com/resources/getr ... hp?id=1000

Ferla
Flowcode v5 User
Posts: 64
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 5 times
Contact:

Re: Control many wireless receivers

Postby Ferla » Thu Jun 14, 2018 12:07 pm

:shock: WOW ..... Benj spectacular..
I did not know the sleep mode on the Zigbee, if I would like to replace the pic16f1937 with someone else who consumes less what would you recommend?

User avatar
Benj
Matrix Staff
Posts: 12847
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 3637 times
Been thanked: 3499 times
Contact:

Re: Control many wireless receivers

Postby Benj » Thu Jun 14, 2018 1:11 pm

I would like to replace the pic16f1937 with someone else who consumes less what would you recommend?


One of the PIC16F153xx devices might be useful. Generally the newer the chip the better optimised for power usage. Also the number of ports and number of peripherals onboard will likely have an effect so if you can get away with it it might be worth using something like the 16F15313. It's worth checking the datasheet as I haven't checked this is any lower than the 16F1937. The speed you run the device will also have an effect on the power usage. If you're sleeping the Zigbee module then you can always sleep the PIC too. Though you would have to wake both up often enough so that packets are not missed, or re-broadcast packets until they are received by all nodes.

Edit: Thought it was worth a look

16F1937 @ 3V @ 32MHz INTOSC = 5.3mA Typical
16F15313 @ 3V @ 32MHz INTOSC = 2.4mA Typical

Sleep current usage looks similar between devices.

Ferla
Flowcode v5 User
Posts: 64
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 5 times
Contact:

Re: Control many wireless receivers

Postby Ferla » Thu Jun 14, 2018 3:48 pm

OK Thanks...
since you are very present, I can open it by asking you a question I asked you for another post.
very simple project led flashing in loop, when I initialize EB023 using ECIO40P16 this stops working. Why?

User avatar
Benj
Matrix Staff
Posts: 12847
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 3637 times
Been thanked: 3499 times
Contact:

Re: Control many wireless receivers

Postby Benj » Thu Jun 14, 2018 3:51 pm

very simple project led flashing in loop, when I initialize EB023 using ECIO40P16 this stops working. Why?


I'm guessing the initialise routine has a blocking call in it that waits for a reply from the module. Without looking at the component code I can't be too sure.

Which version of the EB023 component are you using and is it the TCP/IP component or the Webserver component. Also which version of Flowcode :D

Ferla
Flowcode v5 User
Posts: 64
Joined: Sun Jan 06, 2013 8:58 pm
Location: Italy
Been thanked: 5 times
Contact:

Re: Control many wireless receivers

Postby Ferla » Fri Jun 15, 2018 7:07 am

Hi Benj
Use FC 7.3.0 with module EB023-00-3.
The simple project is attached.
Thanks Ferla
Attachments
40P16_EB023_00_3_UDP.fcfx
(12.98 KiB) Downloaded 1 time

User avatar
Benj
Matrix Staff
Posts: 12847
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 3637 times
Been thanked: 3499 times
Contact:

Re: Control many wireless receivers

Postby Benj » Fri Jun 15, 2018 9:48 am

Hi Ferla,

The TxEnd macro has a while loop to wait for the transmission to end.

while (FCL_TEMP)
{
FCL_TEMP = FCD_01351_TCP_IP_EB023_00_2__MAC_ReadByte(FCL_CR);
}


Do you have the EB023 module wired up to the target micro?