-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add calibration function to the library #12
Comments
I have to still play with the calibration feature. I have heard that you can even ruin your device. I will only add it when I am confident it works well. Thanks, I will put it higher up in my priority list. |
I doubt this "calibration" works just like that. |
Has anyone had time to look at this? |
I don't think it makes sense. As documented the message must be 6 bytes 0xF8: I think this is the slave address (0x01 by default) |
More probably, I imagine you'll have to feed a specific voltage and current from a precision source to the module and then call the calibration function. In that case, without knowing these parameters, the calibration function is useless for us. Anyway, the calibration option is included in the Windows software provided by Peacefair, even in the case the calibration procedure was well documented, anybody wanting to calibrate a module could do it from that software, so I don't think the function is needed (nor desirable if, as has been said, it could ruin the module) in the library. |
0xF8 is the broadcast address for Modbus so any device will catch it. |
0x37 0x21 is the password. Refer to datasheet intro. |
I tried to calibration even though it was successful.
|
My code is adding a function to the library.
|
I was just concerned that the calibration simply may not work and clearly misconstrued the last 2 paragraphs: "".... I have use a 220v pressure with a 1amp load and had the same outcome (calibration failed) but its as far as I went. The picture above was a very poor choice of mine. Thanks for pointing this out I just realise where I gone wrong , I have a PZEM-016. |
@morganflint can you share this PZEM014 Master? |
Hello, although in the screen says "PZEM014Master", I downloaded and installed it as PZEM004TMaster: I think I downloaded it from the link that can be found at Peacefair's Aliexpress shop product page, but I'm enclosing it here just in case: |
Hello , Is this issues solve or not ? |
|
Iam using software for calibration it won't take default password help me out friends if any one did calibration through pc Software |
The chip supports this.
This seems to be in the documentation. It would be great.
The format of the master command for calibrating a slave (6 bytes in total):
0xF8 + 0x41 + 0x37 + 0x21 + CRC check high byte + CRC check low byte.
Correct answer: 0xF8 + 0x41 + 0x37 + 0x21 + CRC check high byte + CRC check low byte.
Error response: 0xF8 + 0xC1 + anomalous code + CRC check high byte + CRC check low byte.
It should be noted that the calibration takes from 3 to 4 seconds, after the master sends a command, if the calibration is successful, it takes 3-4 seconds to get a response from the slave.
The text was updated successfully, but these errors were encountered: