logo elektroda
logo elektroda
X
logo elektroda

Sensor network for Android on CC2530 + ESP8266 - Is it possible and how to do it ?

Creativemind 987 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18929950
    Creativemind
    Level 10  
    Hello
    Looking for the most optimal solution to control 10+ sensors from an android app , project assumptions are:

    - Each sensor is equipped with a light sensor with AC converter and RED/GREEN diode
    - The value from the sensor is sent to the application, depending on its value android sends a signal to light up the RED or Green diode
    - The sensor can be added/removed from the network at any time without interfering with the sensor software.
    - The android system can be 20+ metres from the sensors.
    - The cost of implementation must be as low as possible.

    From what I have been able to see on google ( and I am not familiar with communication modules) I see here a combination of CC2530 + ESP8266 modules.
    Question :
    Is my reasoning correct ? - Is it possible to build such a network on these modules ? Do you need additional microcontrollers for the CC2530 or can they be used without additional microcontrollers ?
    Will the bridge between Zigbee and WiFi be an ESP8266 module or do you also need a microcontroller for it ?
    If you need to use microcontrollers - ATMEGA or ATTiny - are there any at a price below 5PLN - it is important to have as little additional electronics as possible for the modules
    CC2530 + ESP8266.

    Or maybe my whole concept is wrong and zigbee is not needed here ?
    Please give me any suggestions so I can understand it all better.

    Thank you and best regards
    D.
  • ADVERTISEMENT
  • #2 18931098
    mpier
    Level 29  
    How do you want to power it? If you don't reckon with current, you could use 10+ esp8266/esp32, each with an led.
  • ADVERTISEMENT
  • #3 18931701
    TvWidget
    Level 38  
    Is this to be a unit solution ?
    Does the decision to light the LED have to be made on-line by the application ? Maybe it is enough for the sensor to light the LED itself and for the application to set only the tripping threshold ?
  • #4 18932401
    Creativemind
    Level 10  
    TvWidget wrote:
    Is this to be a unit solution ?
    Does the decision to light the LED have to be made on-line by the application ? Maybe it is sufficient for the sensor to light the LED itself and the application only sets the tripping threshold ?
    .
    Thank you for your question.
    Yes , this has to be done in the app because all 10+ sensors form a dependent network where, for example, the signal from sensor number 1 will cause the LED to light up at sensor number 8 and all the dependency logic between the sensors is just controlled from the android.

    Added after 5 [minutes]: .

    mpier wrote:
    How do you want to power this? If you don't mind the current, then you can use 10+ esp8266/esp32, each with a led.

    It is possible that using 10+ ESPs would be a solution, the only question is whether I would need an additional microcontroller on each ESP and whether such a combination would satisfy all the mentioned sub-points - e.g. how to do dynamic sensor pairing?
  • ADVERTISEMENT
  • #5 18932485
    Karaczan
    Level 42  
    Perhaps the EasyESP project will be suitable for this?
    Depends if the light sensor used is in the inventory.
    Ew whether it can put out an output voltage depending on the lighting. This can simply be wired under the ADC.

    Each sensor exposes itself to the WiFi network with its IP. It also communicates with many hubs (Blynk, Domoticz, OpenHAB...) via HTTP and MQTT.
  • #6 18932522
    TvWidget
    Level 38  
    A range of 20+ metres for WiFi on the ESP8266 is quite a lot.
    We don't know what the topology of the sensor placement will be, whether there will be any obstacles between them, how they will be powered, whether this Android device is a smartphone or something larger, whether the installation site already has WiFi, etc.
    If battery power is required, Bluetooth Low Energy, also available on Android, can be used. It has a comparable range to WiFi. There are also solutions that use BLE to create MESH networks. There are also ESP32 chips that support BLE and WiFi at the same time. In your query you also mention the CC2530 which is Zigbee. So the possibilities are many.
    You also mention a 'light sensor with ADC'. If this is to be used to measure light intensity then the matter is not as trivial as it may seem. I have such small sensors with a BLE interface and an OPT3002 chip. This chip has a 23-bit ADC. So the dynamic range is very high. In practice, however, the lighting changes to an even greater extent. See how it looks outside in the city centre, for example. The sensor was lying on a windowsill on the first floor.
    Sensor network for Android on CC2530 + ESP8266 - Is it possible and how to do it ? .
    Sensor network for Android on CC2530 + ESP8266 - Is it possible and how to do it ?
  • ADVERTISEMENT
  • #7 18957706
    Creativemind
    Level 10  
    Karaczan wrote:
    Maybe the EasyESP project will work for this?
    Depends if the light sensor used is in the inventory.
    Ew whether it can put out an output voltage depending on the light. This could simply be wired under the ADC.

    Each sensor exposes itself to the WiFi network with its IP. It also communicates with many hubs (Blynk, Domoticz, OpenHAB...) over HTTP and MQTT.
    .
    Thank you for your reply.
    The idea is to not have to configure any sensors manually, everything would have to be done on the principle of pairing with the main receiver by pressing a button (pairing only with modules with which there is communication (are enabled) ).

    Added after 10 [minutes]:

    TvWidget wrote:
    The 20+ meter range for WiFi on the ESP8266 is quite a lot.
    We don't know what the topology of the sensor placement will be, whether there will be any obstructions between them, how they will be powered, whether this Android device is a smartphone or something larger, whether the site already has WiFi, etc.
    If battery power is required, Bluetooth Low Energy, also available on Android, can be used. It has a comparable range to WiFi. There are also solutions that use BLE to create MESH networks. There are also ESP32 chips that support BLE and WiFi at the same time. In your query you also mention the CC2530 which is Zigbee. So the possibilities are many.
    You also mention a 'light sensor with ADC'. If this is to be used to measure light intensity then the matter is not as trivial as it may seem. I have such small sensors with a BLE interface and an OPT3002 chip. This chip has a 23-bit ADC. So the dynamic range is very high. In practice, however, the lighting changes to an even greater extent. See how it looks outside in the city centre, for example. The sensor was lying on a windowsill on the first floor.
    Sensor network for Android on CC2530 + ESP8266 - Is it possible and how to do it ? .
    Sensor network for Android on CC2530 + ESP8266 - Is it possible and how to do it ?
    .
    These 20 metres are the distance from the android smartphone , there may be other networks and obstacles nearby but not walls - I would see WiFi here more as a bridge between zigbee and the smartphone - or would a bridge on BLE be more effective ?
    MESH on BLE ? - Would that be cheaper than the CC2530 ?
    "You also mention a "light sensor with ADC". - Here it's just an example to illustrate the project in the simplest way - simply a signal from an already finished sensor transmits a value between 0 and 999 in digital form.
    Do you have any experience in building this type of project ?
  • #8 18957749
    TvWidget
    Level 38  
    Creativemind wrote:
    .
    These 20 metres are the distance from the android smartphone , there may be other networks and obstacles nearby but not walls - I would see WiFi here more as a bridge between zigbee and the smartphone - or would a bridge on BLE be more effective ?
    MESH on BLE ? - Would this be cheaper than the CC2530 ?
    .
    It is not known, for example, how fast the whole thing is to work and how often data is to be transmitted. It is not known what the reliability of information delivery is to be. There are formal restrictions on transmitter power, bandwidth utilisation factor, etc. These vary according to the purpose of the system. It is not possible to indicate an optimal solution on the basis of such scanty information as you have given.
    Creativemind wrote:
    simply the signal from the already finished sensor transmits a value between 0 and 999 in digital form.
    .
    Note that the scale on the graph I have given is logarithmic. The values on it change from 1 to at least 100000. In the real world, the dynamics of change are even greater. The human eye can adapt to this. Measuring, for example, the photodiode current over such a range is not a simple problem. It cannot be done with a simple ADC. Regardless, there is still the question of the different sensitivity of the eye and optoelectronic components for different parts of the spectrum.
    You have not written what this is to be used for and what measurement range is required. A lot depends on this.
    Creativemind wrote:
    Do you have any experience in building this type of project ?
    .
    I think I have some.
  • #9 18958467
    khoam
    Level 42  
    Creativemind wrote:
    It is possible that the use of 10+ ESPs would be a solution, the only question is whether I would need an additional microcontroller on each ESP and whether such a combination would satisfy all the mentioned sub-points - e.g. how to do dynamic sensor pairing ?
    .
    It is possible with ESP-NOW. It is a faster transmission than with "traditional" WiFi. As far as pairing is concerned, this is done based on the MAC addresses of the ESP chips - ESP-NOW itself does not use IP, an edge router is unnecessary. Article on the electrode:
    https://www.elektroda.pl/rtvforum/topic3672038.html

Topic summary

The discussion revolves around creating a sensor network for an Android application using CC2530 and ESP8266 modules. The user aims to control over 10 sensors equipped with light sensors and LEDs, with the ability to dynamically add or remove sensors without manual configuration. The communication distance is expected to be over 20 meters, and cost-effectiveness is a priority. Various solutions are proposed, including using multiple ESP8266/ESP32 modules, which could operate independently or in conjunction with a microcontroller. The possibility of using ESP-NOW for faster transmission and BLE for MESH networking is also explored. Concerns regarding power supply, sensor placement, and the complexity of light measurement are raised, emphasizing the need for a reliable and efficient communication method.
Summary generated by the language model.
ADVERTISEMENT