WeMos D1 mini

Appearance

Energy supply

5 V

Connecting peripherals

11 digital inputs/outputs

1 analog input

Power outputs 3.3 V and 5 V.

Pinout

Connecting to IoT

1) Select the board: Tools (Tools) -> Board (Board) Wemos D1 R1 (or Generic ESP8266 Module).

2) Paste the prepared code.

3) Set the data for the Wi-Fi connection and the identifier of your object on the platform.

4) Compile and upload the sketch to the board.

5) We see the appearance of data on the platform.

average price

~ 3$

Where could I buy

In China

3.NodeMCU V2

Appearance

Energy supply

5 – 10 V

Connecting peripherals

11 general purpose I/O ports

1 analog input

Maximum output current of 3V3 pin: 600 mA

Pinout

Connecting to IoT

1) Select the board: Tools (Tools) -> Board (Board) NodeMCU 1.0 (or Generic ESP8266 Module).

2) Paste the prepared code.

3) Set the data for the Wi-Fi connection and the identifier of your object on the platform.

4) Compile and upload the sketch to the board.

5) We see the appearance of data on the platform.

average price

~ 4$

Where could I buy

In China

ESP32 based board

ESP32 WROOM DevKit v1

Appearance

Energy supply

5 – 14 V

Connecting peripherals

Digital I/O: 21 pins 1-5, 12-19, 21-23, 25-27, 32 and 33 General purpose I/O pins. Pins can be configured for input or output. The logic level of one is 3.3 V, zero is 0 V. The maximum output current is 12 mA.

Digital inputs: 4 pins 34-36 and 39 General purpose input contacts. Can only be configured for input.

PWM: All I/O Pins Allows analog values ​​to be output as a 16-bit PWM signal. The maximum number of channels is 16.

ADC: 15 pins 2, 4, 12-15, 25-27, 32-36 and 39 Allows you to represent analog voltage in digital form with a 12-bit resolution.

DAC: pins 25 (DAC1) and 26 (DAC2) Analog output of a digital-to-analog converter that allows you to generate 8-bit voltage levels.

Maximum output current of pin 3V3: 1A

Pinout

Connecting to IoT

1) Select the board: Tools (Tools) -> Board (Board) DOIT ESP32 DEVKIT V1.

2) Paste the prepared code.

3) Set the data for the Wi-Fi connection and the identifier of your object on the platform.

4) Compile and upload the sketch to the board.

5) We see the appearance of data on the platform.

average price

~ 8$

Where could I buy

In China

DIY: repeater on micro:bit and LoRa radio module increases the communication range

DIY or Do It Yourself

Electronics for beginners

In DIY: Transmitting Data for Kilometers with Micro::Bit Controller and EBYTE LoRa Radio, we showed how to communicate over large areas with low radiated power.

But what if you need to transfer data over distances of tens or even hundreds of kilometers? For example, along objects such as highways, railway lines or pipelines?

In addition to satellites, repeaters will help here, capable of receiving data over a radio channel and transmitting them further, to the next repeater or to the final data exchange node.

For now, however, we will not solve such grandiose tasks, limiting ourselves to increasing the range using one micro::bit repeater with the EBYTE E32 LoRa radio module.

Suppose we need to control the weather in a greenhouse from home, but the distance between the house and the greenhouse is such that with a minimum radio module power of 10 mW, a reliable connection cannot be established.

Let’s place a repeater somewhere in the middle that will receive requests from the central node, made on the basis of the Raspberry Pi, and transmit them to the greenhouse on the micro::bit node. Measurement data in the greenhouse will be transmitted back to the central node again via a repeater (Fig. 1).

Architecture of a data acquisition system with a repeater

A layout of a data collection system with a repeater is shown in.

Here we used the same blocks as for the star system from the last article, only changing the software.

The central node is based on Raspberry Pi, while the repeater and greenhouse node are based on micro::bit.

We left the configuration of the E32 radio modules the same. All radios in our examples will operate on channel 15 and their addresses are given

Knot

Address

Central node

14 (0x0E)

Repeater

13 (0x0D)

Greenhouse

12 (0x0C)

Of course, you can use a different channel number for the repeater and greenhouse. Moreover, the central and peripheral nodes can transmit data on one channel, and the repeater on the other. When choosing channel numbers, you should consider which frequencies are allowed to be used in your country without a license, or draw up the appropriate documents.

Repeater node

The micro::bit relay program, like all the programs in this article, can be downloaded from GitHub

The repeater program file is called microbit-pxt-lora-repeater.hex and the greenhouse program file is microbit-lora-net-host2r.hex.

The relay program is very simple. At the initialization stage, it sets the connection and operation parameters of the E32 radio module, and also sets the size of the data transfer buffers for the UART.

After initialization, the micro::bit LED matrix lights up with the letter “R”, identifying the repeater node

When the central node sends the “getRData” command to the relay, the relay unit transmits the “getData” command over the air to the greenhouse node with address 12 and draws an arrow on the micro::bit monitor directed to the server. After that, the letter “R” is displayed on the monitor.

Leave a Reply

Your email address will not be published. Required fields are marked *