Hi, I was wondering if anyone would be so kind as to provide the code / example to create the pulse output to simulate the output of one of the electricity meters that flash an LED 1000 times to indicate 1kW consumed (either driving a LED or just the signal pulse that I could feed into the Glow sensor under test).
I think it might need to have a fixed pulse length of about 50ms according to this
I think 1 kWh would be a good test rate and I think that relates to a pulse interval of .277 seconds so that would be 50ms on and 227ms off?
I’m asking because I’m assuming / hoping it might be fairly straight forward, std PWM stuff but I’m no coder. ;-(
As far as I know energy meters produce a pulse for one Wh, so 1000 pulses for 1kWh. You can get one pulse for example every 1second (3.6kW load) or every 3minutes (20W load). Not something you need PWM for. Just use Interval Component — ESPHome
The thing is, it was possibly nothing to you but hours of work and experimenting for me (unless I was lucky and stumbled on an oven ready solution).
It is also very frustrating when I know what I want to do but don’t have the skills to do it. I have tried coding many times over my many years and it has never really clicked for me. Possibly something to do with my dyslexia and having a ‘more hands’ on mindset?
I can design and print the case and wire up most electronics, it’s just the code that beats me.
But considering how many MIPS or TeraFlops even a phone can manage these days, you would have though the IDE would be able to sort ot the indentation.