Tag: RS485

4 articles found.

Soil NPK Sensor Library for Proteus Simulation

Soil NPK Sensor Library for Proteus Simulation: an Arduino UNO V4.0, a MAX485 module, the soil NPK probe, an OLED and two LEDs

Hello friends, I hope you all are doing great. Today, I am going to share the new Soil NPK Sensor Library for Proteus Simulation. N, P and K - nitrogen, phosphorus and potassium - are the three numbers printed on every bag of fertiliser, because they are the three nutrients plants need most. The soil NPK probe is the farmer's gadget that measures them: three stainless needles pushed into the ground, and an RS485 cable that answers Modbus requests with the nutrients in mg/kg. With this library you can run a full Proteus simulation of the probe, frame by frame, so that your Modbus code works before the probe ever goes into a field. The probe comes alive at run time: its PWR LED lights with the supply and the COM LED flashes with every answer it sends. The demo is a garden bed monitor: an Arduino asks the probe for N, P and K through our MAX485 module every two seconds, draws them as bars on an OLED, and lights an OK or a LOW LED - while the bed goes from poor soil, through a dose of fertiliser, to a heavy rain that washes the nitrogen away. NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the soil moisture board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the Soil NPK Sensor Library for Proteus Simulation: ...

PZEM-017 DC Energy Meter Library for Proteus Simulation

PZEM-017 DC Energy Meter Library for Proteus Simulation: an Arduino UNO V4.0, a MAX485 module, the PZEM-017, a shunt, a load and a lead-acid battery

Hello friends, I hope you all are doing great. Today, I am going to share the new PZEM-017 DC Energy Meter Library for Proteus Simulation, the next library of our renewable energy series. If you have searched for a Proteus simulation of the PZEM-017, the small DC energy meter that solar and battery projects read over RS485, this library brings it into Proteus with its real Modbus registers, so that the same Arduino code runs on the simulation and on the real module. The meter is drawn compact, and at run time its three lamps work on your sheet, while its label plate shows the volts, the amps, the watts and the watt-hours it has measured. The simulation model measures the supply and the current through an external shunt, counts the energy, watches two voltage alarms, and answers Modbus-RTU requests byte for byte like the real module. The demo is a battery energy monitor: our lead-acid battery feeds a load, and an Arduino reads the meter through our MAX485 module. NOTICE: Our team has put a lot of effort into these small parts: the bodies, the animation and the pop-ups are all our own design, and you get them free. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the Motor Driver board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the PZEM-017 DC Energy Meter Library for Proteus Simulation: The PZEM-017 is a DC energy meter in a small plastic case. It has no ...

Raspberry Pi CM4 IO Board Library for Proteus: MAX485 Modbus HMI

Raspberry Pi CM4 IO Board Library for Proteus: a Modbus RTU master with a MAX485 on the UART

Hello friends, I hope you all are doing great. Today, I am going to share the Raspberry Pi CM4 IO Board Library for Proteus. The Raspberry Pi Compute Module 4 is the Pi 4 made for products: the same BCM2711 with four Cortex-A72 cores at 1.5 GHz, 4 GB of RAM and 32 GB of eMMC flash on a module the size of a matchbox, plugged into its official IO Board with the 40-pin GPIO header, a PCIe slot, Gigabit Ethernet and two HDMI sockets. With this library the CM4 runs your Python program against the circuit in Proteus 8.5, on our virtual network. Every library of our board series connects the board to a different module and serves a web page. A Compute Module usually lives inside a machine or a control cabinet, so this time it does what such boards do there: it is the Modbus RTU master of an RS-485 bus. A MAX485 module on its UART talks to a field node - an Arduino UNO with its own MAX485, a BMP280 sensor and a relay for a fan. The CM4 reads the node's registers, switches the fan by the temperature, and shows it all on an HMI page on a laptop and a phone. NOTICE: this library does not run Raspberry Pi OS. It runs your Python program, with the same Python libraries a Pi uses for its pins, its buses and its network, in step with the simulation. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the Raspberry Pi CM4 IO Board section of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started ...

MAX485 RS485 Module Library for Proteus V1.0: Modbus RTU + Arduino

MAX485 RS-485 Module Library for Proteus V1.0: the module with its STATUS panel next to an Arduino UNO

Hello friends, I hope you all are doing great. Today, I am going to share the new MAX485 RS-485 Module Library for Proteus V1.0. RS-485 is how microcontrollers talk across a factory floor, a farm or a building: two wires, A and B, carry the data hundreds of meters, and many devices share them - energy meters, temperature controllers, VFDs, PLCs. Most of them speak Modbus RTU. The small MAX485 module puts an Arduino on that bus. Until now there was no MAX485 module in Proteus on which you could watch a Modbus master and a slave talk. Behind the parts sits our own model, written from the MAX485 datasheet and the Modbus RTU specification. DE turns the driver on and RE the receiver, the board's bias resistors hold the idle line, and the A and B pins of two modules form a real half-duplex bus - two drivers at once is a collision. Every byte on the bus is decoded, grouped into Modbus RTU frames, checked with its CRC and explained: which slave, which function, which registers. You get a Simple device with a STATUS panel of the last frames, and an Advance device with a pop-up window where you can click any frame to see it field by field. The demo runs on two of our Arduino UNO V4.0 boards: a Modbus master with the ModbusMaster library and a Modbus slave. NOTICE: an RS-485 module is easy to fake: a wire that copies TX to RX. We wanted more. Our module only drives the bus while DE is HIGH, so a sketch that drops DE too early loses its last byte, a node that leaves RE LOW hears itself, ...