-
Notifications
You must be signed in to change notification settings - Fork 16
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
Tasmota Template Difference #9
Comments
Hi @mgoeller! arendst actuall changed the GPIO design in Tasmota as I was developing the driver (see arendst/Tasmota@9cbd2d5) hence the GPIO number changing, but the pin function remains the same. Looking at the pinout table on Blakadder's template site it is maybe easier to see what these pins do:
The pins |
Thank you for your help! One more question and then I will close this issue, in your overview of the GPIOs I don't see that a HLW8012 power measurement IC is used for the Shelly Dimmer 2. I also don't see one on the PCB, how are you measuring the power then? And couldn't we use this to do a calibration procedure? I already made a guess once in the original tasmota for shelly dimmer thread: "I would guess, that the calibration feature is using the power measurement combined with a dimming from 0-100%. Knowing how much energy is used while slowly dimming up you can approximate the dimming curve of the lamp and map that to the linear "new" 0-100%. E.g. a small LED lamp using the uncalibrated 0-100% only does a visual (/power consumption) change (and non linear!) from 1-15%. After calibration that is mapped more or less to the new 0-100% and allows much more granular control. And looks linear for the human eyes in brightness increase while sliding up." And last question: do you know the GPIO for the physical reset button on the shelly dimmer 1/2? |
Power measurement on the dimmer 2 is done manually using two op-amps - one to measure voltage across the Live-Neutral and one to measure the voltage across a shunt resistor. This makes measuring the power a little bit more difficult as the ADCs must be polled multiple times during the cycle and the average value calculated. I have been thinking a little about this and I think it would be best for the calibration values should be stored in the EEPROM used by the ESP8266 rather than the flash memory in the STM32 due to limited write endurance in the STM32.
If I am not mistaken that is connected to the RST pin (physical pin 1, not GPIO 1) which is not assigned a GPIO number. |
Thank you James! The physical reset button on the Dimmer 2 is connected to GPIO 13, otherwise the STM would be reset every time it's pressed. Wiring it to GPIO13 has the advantage, that one then can define a long press or similar on the ESP and write your own reset routine (maybe even without reseting the STM, just restarting the ESP and so on). And yes, I agree that the calibration values should be stored in the EEPROM for the ESP. I think that is also the case with Altercos original firmware. |
Hi
Thank you for the open source development of your STM firmware. I am interested to use this firmware with my own ESP8266 firmware, and the serial protocol is understandable and works fine.
However only, when I flash the tasmota_shelly_dimmer_v1.3.bin.gz firmware file from the support thread first.
If I update the STM firmware to v51.5, I cannot control the STM anymore, and I guess there is a difference in initialisation, right?
Would you be so kind and tell me how to initialise GPIO 4 and 5? I saw that the template is different from the combined binary to the official Tasmota release:
Official Tasmota Release:
{"NAME":"Shelly Dimmer 2","GPIO":[0,3200,0,3232,5568,5600,0,0,193,0,192,0,320,4736],"FLAG":0,"BASE":18}
vs. Binary v1.3:
{"NAME":"Shelly Dimmer 2","GPIO":[0,3200,0,3232,5504,5536,0,0,193,0,192,0,320,4736],"FLAG":0,"BASE":18}
The text was updated successfully, but these errors were encountered: