Comments (11)
Hi,
Normally Rx is open collector. So if you use a pull-up (10k) to 3.3V, you have only 3.3V. The serial signal is inverted, but the newer core software of the ESPs is capable to invert the signal!
Serial.begin(115200, SERIAL_8N1, SERIAL_FULL, 1, true); // true inverts the signal
You find the circuit on:
http://weigu.lu/microcontroller/smartyReader_P1/index.html
from esphome-p1reader.
I have a Wemos mini D1 which I plan to test this on. Can get back to you when i've tested.
from esphome-p1reader.
I tried with an ESP32, it worked fine with inverting there instead of using the NPN. I tried using the internal pullup resistor but I don’t think it’s large enough so I added a 10k resistor to 3.3V. I did have to use additional capacitors (2x10uF) to get the ESP32 to power correctly.
If the ESP8266 can power fine without additional caps, I think all you need is a 10k resistor.
from esphome-p1reader.
I am not sure if you can run w/o it. Why dont you remove it and test without it?
from esphome-p1reader.
Searched a bit on that too. And some report it is fine and some say it's speced at 3.3V and might fry the microcontroller but still reported it working with 5V for an extended period. But might decrease lifespan of it.
from esphome-p1reader.
Hello,
Were you successful with removing the NPN?
from esphome-p1reader.
The D1 can handle 5v but it needs the invertion.
Haven't tried what weigu1 mentioned that you can initialize it with inverted function.
from esphome-p1reader.
Does this mean that i can connect D1 like this:
5V and RTS to 5V.
Data GND and GND to GND.
TX to RX and invert the pin in code.
In other words exclude the voltage divider and NPN-transistor?
from esphome-p1reader.
No transistor nor divider needed. Pullup resistor and a capacitor (if the energy meter doesn’t supply enough current)
from esphome-p1reader.
Thank you Fredrik!
from esphome-p1reader.
For those who want to do the same to invert the pin in software just change uart to below. Might need to change GPIO ports if not on NodeMCU ESP8266.
logger:
level: INFO
uart:
id: uart_bus
rx_pin:
number: RX
inverted: true
baud_rate: 115200
rx_buffer_size: 1024
from esphome-p1reader.
Related Issues (20)
- Hungarian Sanxing SX631 Read issue HOT 2
- ESP32
- D1 Mini suddenly needs external power to start HOT 3
- esphome encryption key instructions HOT 2
- Extend the esp to act as active repeater to connect additional P1 device HOT 2
- HDLC support missing (is AIDON meters really supported?)
- Instability Frequent Drop out HOT 3
- Compile Error with esp-idf Framework HOT 2
- Add XIAO ESP32C3 to hardware section of readme.md
- Aidon meter and slimmelezer-wt32-eth01 HOT 5
- Landis Gyr e360 lte HOT 1
- SlimmeLezer+ with HDLC stops working HOT 1
- dual tariff HOT 2
- CRC Pass=no after a while HOT 3
- Update interval HOT 3
- Strange readings HSP Meter HAN port
- Problem error
- Custom components are deprecated HOT 3
- Slimmelezer not response after HAN plugged HOT 1
- CRC error, start block occasionally corrupted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome-p1reader.