Software engineer here. The value is probably a 32 bit unsigned integer (4 bytes, range 0-4'294'967'296) accurate to a single watthour. You write this number to the EEPROM in the first position, then when you want to write it again, you write it 4 bytes offset, then 8 bytes, 12 bytes and so on. Once you reach the end of the EEPROM, you overwrite the first value again. The EEPROM for this chip is 256 bytes, and thus will fit 64 values, and it claims 1 million write cycles. This means you can under ideal conditions write 64 million times to it. When deciding which value to read when the device is powered up, simply read all values starting at position 0 and stop once a value is lower or equal to what you've read before. You then know the latest value as well as the position where you should continue to write. In the case of this specific meter, the largest value to ever write with the given display digit count would be 99'999'999, which exceeds the 64 million writes if you were to write down every single watthour change. But we should also remember that the EEPROM is not used up after the write cycles provided in the datasheet. Those are merely guaranteed writes. You can very likely write more than that for a while. Or you can decide to only write even watthours and you land comfortable within the allowed limits.
There are more advanced wear leveling mechanisms for this kind of stuff. For example in this case it is known, that the value is counting and it only goes up. It depends what kind of memory you have, to find the optimal wear leveling mechanism. For sure it is not necessary to write the full 32bit when the counter increments by 1. There are also other encoding methods than binary, for example like gray-code. I'm pretty sure eltako made extra sure there won't be issues with couter value and the EEPROM.
Yep. It probably uses big EEPROM (maybe even few kilo-words), and only writes to it when it deem necessary, i.e. something like total changed, and enough time passed, or total advanced by enough. This is how I would code it. If the total did not change, do not write. If total changed, but by less than 0.1kWh, do not write until 10 seconds passed from previous write. and then each write you do to a next word in EEPROM. Once you reach the end, you write to the first cell, and zero out all the other cells. A checksum could also be used, but might not be needed in practice. This way one restart you know where is the last value (it is either the last one, or the one just before last 0), and where to store new values (at first 0, or at first position, if all are non-zero, this would only happen if there was a power loss when doing erase cycle). Doing delta encoding (basically a form of compression), is a possibility too, at the expense of slightly more complex algorithm.
What I'd do - write every XX seconds (ensures worst case for data loss) and write when the sensed voltage has not reached high enough (200V) for 1/50s. Ensure enough capacitance to operate for like 0.2sec. You don't even need to have a counter for the wear index, even writing to a random position would do it. While reading - use the highest value. There could be an option to pack the deltas of energy change, or have a full encoded energy use. Delta encoding is quite common when transmitting time series.
EEPROM storage wear reduction: Increasing numbers are easy to store in an EEPROM without exceeding the limits. As an example you can use 32 byte to count the lower 5 bits by using the lower 5 bits as address for said table. You will have to clear all the bits of the "old" byte (address -1) and set all the bits for the current byte. That would give you 16 times the endurance. (16 milltion for that PIC16F690). Upon power loss you just need to search for the one byte that is not 0. If it's byte 12 then your last 5 bits are 0xC. I have seen that exact thing in car odometers where the milage is stored in an I2C 24C02 EEPROM.
yes i also think the 100k writes is per memory address, so if you have 10 addrs. to store your number, you can do 1M cycles, just change de memory address, ive done something similar to you once using some bits from the number as address, other methode, that ive used to store water consumption measured in some caudalimeters, is to write on the next memory cell available, after a power up, you just look for the biggest number (done on a 32 bit int, wont ever happen a rollover during the device life, otherwise RIP)
With this schematic (5:01), I would expect the in-circuit reading to be quite accurate. Nothing is connected to the "top side" of the capacitor except a 2MΩ resistor across it, and the voltage sensing divider network of perhaps tens of MΩ (via the now-insignificant 120Ω resistor). I just fixed a radar-based motion-detecting light timer switch thanks to this info! Its relay did not get enough voltage (7 V instead of 12) to turn on. I was expecting the Zener to be bad but it works after replacing the 560nF dropper capacitor, which fell to around 410 nF, with a 470nF one (closest I have, and another 100nF in parallel won't fit).
A known trick in the home appliances trade is to bump the relay with the handle of a screwdriver and if the relay clicks, it's the capacitor too degraded to provide enough voltage.
The data sheet says 1% accuracy. It said 93w on the display for a 100w rated bulb. He has it going through his isolation transformer so there will be a voltage drop, but that much? www.eltako.com/fileadmin/downloads/nl/_flyer/1-fase_32A_kWh_meter_WSZ12DE-32A_nl.pdf
I look forward to your component tester video. It's fascinating how the code works. Thanks to Markus Seidl for making it open source. That made it possible for the Chinese to copy without paying him a penny.
Thankyou so much for the insight into these kinds of Mains fed dropper caps. It explains why i have had so many failures in various SMPS etc when the devices are still quite young! The Mains in my location can become unreliable so i guess this is when the self healing by these kinds of caps sees them become damaged!
I just watched your video on the small 12v power supply ( wall wart), and I really like how you re engineered the schematic . Cheap dangerous supply. I joined your channel and a thumbs up. Have a great Father's Day. Stop in and visit, I would like to have you as a knowledge base for my electronic projects. 21 i South Carolina, Old Radio Night
Great video on the electricity meter and totally agree that the dropper caps are the usual culprit if many mains-powered devices stop working properly. I have seen that mainly in electronic timer switches ...BTW, those transistor testers are neat. I just made a video about mine which seems to be the same type and now I am working on one on how to update the firmware because there are many new tests it can do with different firmware
Glad to see another troubleshooting and repair video. Your psu repair videos are some of the best troubleshooting videos on RUclips… If you could make that a regular feature on your channel…. it would be awesome and really helpful. I hope you and your sweet animal friends are doing well. That little gray cat with the smooshed face is the cutest little fella
will be nice to see if these one's have a reed switch inside to stop people using magnets to give a lower reading. here Ireland 90% of all meter's were changed to the "pay as you go" type, were you buy credit in a shop just like phone credit and type it into your meter for electricity . if your running low but it goes past 6 pm on a Friday it will not knock off until after 10am Monday morning. but it's more expensive than normal. so folk's were using magnet's on the meter's that would slow the power reading down inside them... but the "ESB" BOARD (the main company here in Ireland) realized and added protection inside them in the form of a reed switch. signalling them that a magnet is been placed on the meter. im sure other countries has has the same type of meters installed in their countries too...
The 5% tolerance error is easily possible to adjust away during manufacturing/testing, as-long as it is only an absolute error and not indicative of other flaws like temperature/age drift. The meter looks like it's a 2% accuracy meter within its intended measurement rage. (range = 250mA to 32A) It will ofcoz measure lower currents, but are allowed additional error (probably it is pretty accurate down to around 50-100mA). Measurement standard is pretty relaxed below 20mA (-100% to +10%), yes it does not even have to measure at all below 20mA. All current ranges mentioned here are subject to the stated base current of this meter of 5A. If a meter has another base current these ranges will move accordingly. Higher base current = worse for precision (allowed) at low currents.
Yay, I got a component tester like this one as a kit - with the acrylic case. It has only one sot3-6 SMT component (below the ZIF socket) which I experienced no difficulties soldering in (if you do - just add more rooowseeeeen!), everything else is THT. Works pretty well, but doesn't want to work with ds18b20 digital thermometers (and I don't know the reason why, they are functional).
Regarding writes to EEPROM, perhaps disconnecting the capacitor during operation would help determine if it writes on power-off? My e-bike's computer only writes during power-off (pulling out the main battery will cause total loss of all trip data since last power-off).
I would like to see a video where we can try to fool a meter and possible methods applied in modern meter design to overcome that or is there flaws in our modern power meters as well....
(EU / MID standards/rules) The register is saved to eeprom upon detecting a power fail situation, however the standards does give manufacturers some slack, a minimum of 1/10th of kWh must have advanced for it to be mandatory to store the new energy register status. So, if you have a situation with alot of rapid on/off/brown outs it will not "wear out" the silicon. (I'm pulling this from memory, possibly it could be 1/100th kWh, one of them) You will ofcoz only save when the electronics are about to quit. Manufacturers may incorporate alot of tricks to avoid a needless save, and it is typically only done as a last resort before uC hits a critical low voltage that threatens normal operation. As such; a massive under voltage for a period or two does typically not trigger a register save scenario, the software senses "yep, Phase voltage are out... no big problem, my reservoir cap is full, I can wait for it to back to normal levels". As I mentioned, there are tricks to resort to, you may cut back on non-essential calculations and functions during extreme prolonged voltage drops and spend more time in uC sleep-modes to conserve energy.
lol i can only imagine living life and every thought in my head and words i spoke sounded just like you...its like at the end of every sentence is drawn out for surprise...but good wooooorrrrkkkkkkkkkkk, i really like itttttttttttttt lol
The datasheet of the meter states more than 15 years of life at maximum load. The PIC16F690 microcontroller has an EEPROM endurance of 1 milion cycles. Dividing 1 milion cycles to 15 years results in about 7.6 writes per hour so it probably writes every 10 minutes to EEPROM if the count has changed and possibly also at power loss. I would not rely only on the power loss writes on a metering/logging application because software can hang, capacitors age over time and might not provide the supply for enough time and so on. With a 10 minute timed write and a watchdog inaccuracy can be limited to around 16% or better. At a maximum load of 32A*230V=7.36kW * an accuracy of 1%=73.6W*2000imp/kW=147200 maximum counts at which data must be written to keep the 1% accuracy no matter what the life of EEPROM.
It's possible that this uses wear-leveling to dramatically increase the endurance. This chip has only 4KB of Flash, but the feature set is small, so I think you could afford the wear-leveling overhead.
There are many different ways to manage EEPROM writes. Since only flipping bits causes wear, a simple way to do a non-volatile count is to reserve an EEPROM block to mark 0s for every 10Wh and update the binary total when the mark block is full. If you have 128 bytes of EEPROM and set aside 512 bits (half) for marks, then the count only needs to be updated once every 5kWh, the mark block only gets reset once every 5kWh as well and you have 58 bytes left for calibration data, parity checks, bad bits table and other necessities.
Writing to eeprom seems like a bad design. A Lithium backup battery can actually last longer than this chip when it's constantly written to. Otherwise it seems to be rather well made actually. Except for that chunky capacitor which is flapping in he wind.
@@teardowndan5364 There are also things like gray encoding that could be used here, since we know it is only counting up. If you spread the writes out over the complete EEPROM, there shouldn't be any issues with the EEPROM wearing out.
@@fkiesel9442 Gray coding would only halve wear only as long as you only do +1 increments. For increments greater than +1, wear on LSBs would remain largely unchanged.
not sure how it's in PIC, but in Atmel the EEPROM life is 100 000 writes, the flash life is only 10 000 writes. But of course, in both cases you can use wear leveling. I've already done a similar thing in couple of my Atmel programs years ago, but now I forgot it exists :).
Thows are useful if u whant to know how mutch like rooms take power. I use them in most of my projects to measure power use. Thows are awesom, and kinda cheep but usefull.
The component tester video would be VERY interesting there is even a 100+ page document about it sadly the code is way to complex for me to understand or follow along
Firstly, if you want to use a MOV, you would put it parallel to the mains, not the capacitor. They often fail short-circuit, which would destroy the circuitry otherwise. MOVs should also have a fuse in series somewhere because of this. Also, it probably wont protect the capacitor much since it's only rated to 275V. You would be much better off with a higher voltage rated capacitor, like 400V or more. Then it wouldn't be damaged nearly as much to begin with.
@@jstro-hobbytech Warning: You cannot use a variac as an isolation transformer, most if not all of them have the "neutrals" of primary and secondary connected. Also, there is no variac in this video, perhaps you mean something else?
@@vaclavtrpisovsky I have both my friend. I thank you for saying that as some people do not know the difference. The isolated transformer I have just isn't as powerful as I thought it would be and I hoped there was a cheap way to maybe diy another one from another being that dgw knows everything there is to know about this stuff haha I get ya though, I've corrected people before as well. Thank you again my friend
@@jstro-hobbytech You might have some luck cascading two identical transformers but what you probably want to do is wind your own. I would suggest using an iron core transformer with separate bobbins and the VA rating you need, removing the secondary and replacing it with a winding identical to the primary. Otherwise, you will probably need to study a lot about magnetic hysteresis, which likely entails reading yellowed books from back when capacitors were called condensers. Engineering mains voltage transformers is a lost art; most people don't bother and simply copy earlier designs for their application. Very few people need new transformers that do black magic never done before, like the ferroresonant mains regulator; you might as well find a well-documented isolation transformer and recreating it.
There is another version on market which has two terminals for rs485 Which can show other parameters. I was wondering is it possible to add 485 to this one 🤔
I'm wondering how much power the electricity meter consumes itself. Capacitive droppers aren’t the most efficient things in the world, so it would be interesting if modern ones use less energy and if they are any different.
For billing meters in your home "big-ones" they are taking power before power current transformer to run itself. That one in video is just counting one appliance or sub feed. We had those kind of meters, only in three phases in production facility for mobile operators/antennas. One operator used about 40 000 kWh/a, it had only three 4G antennas (I think 800+1800+2100+2600Mhz per 1 antenna) and cabinet to run them. Mobile data uses huge amount of power.
hello, could you please explain the wirediagram of the electric toothbrush Oral B Vitality Plus. It doesn`t seems to have any smart chip, but yet it has a timer. How is this possible?
The capacitor's voltage rating should be 400V power film capacitor, if this unit is for 230V use. Although this is also a film capacitor, 275V is not enough headroom and there is no inductor to absorb voltage spikes. I bet this is a common problem with this model.
@@michvod Nope. Everything I said is for AC. DC ratings are ALWAYS less than AC ratings, Check any relay. Your calculation is also wrong. Even the peak to peak (P2P) of an RMS voltage is 275 * 1.414 = 388.9 not 630
@@piconano Wrong. I was talking about the cap specs, not the actual operating conditions. An X cap with 275VAC rating is usually specified also to handle 630V DC. X caps are meant to be used in AC applications, so their ratings are always specified in VAC, not in DC. I have seen non X rated film caps in capacitor dropper applications like those, and they were almost always 630V rated
I'm not an expert on regulations, but it only powers the internals, nothing exposed, so it should be fine. The interface is isolated using an optocoupler.
Software engineer here. The value is probably a 32 bit unsigned integer (4 bytes, range 0-4'294'967'296) accurate to a single watthour. You write this number to the EEPROM in the first position, then when you want to write it again, you write it 4 bytes offset, then 8 bytes, 12 bytes and so on. Once you reach the end of the EEPROM, you overwrite the first value again. The EEPROM for this chip is 256 bytes, and thus will fit 64 values, and it claims 1 million write cycles. This means you can under ideal conditions write 64 million times to it. When deciding which value to read when the device is powered up, simply read all values starting at position 0 and stop once a value is lower or equal to what you've read before. You then know the latest value as well as the position where you should continue to write. In the case of this specific meter, the largest value to ever write with the given display digit count would be 99'999'999, which exceeds the 64 million writes if you were to write down every single watthour change. But we should also remember that the EEPROM is not used up after the write cycles provided in the datasheet. Those are merely guaranteed writes. You can very likely write more than that for a while. Or you can decide to only write even watthours and you land comfortable within the allowed limits.
Very nice trick!
There are more advanced wear leveling mechanisms for this kind of stuff.
For example in this case it is known, that the value is counting and it only goes up. It depends what kind of memory you have, to find the optimal wear leveling mechanism.
For sure it is not necessary to write the full 32bit when the counter increments by 1. There are also other encoding methods than binary, for example like gray-code.
I'm pretty sure eltako made extra sure there won't be issues with couter value and the EEPROM.
Yep. It probably uses big EEPROM (maybe even few kilo-words), and only writes to it when it deem necessary, i.e. something like total changed, and enough time passed, or total advanced by enough. This is how I would code it. If the total did not change, do not write. If total changed, but by less than 0.1kWh, do not write until 10 seconds passed from previous write. and then each write you do to a next word in EEPROM. Once you reach the end, you write to the first cell, and zero out all the other cells. A checksum could also be used, but might not be needed in practice. This way one restart you know where is the last value (it is either the last one, or the one just before last 0), and where to store new values (at first 0, or at first position, if all are non-zero, this would only happen if there was a power loss when doing erase cycle).
Doing delta encoding (basically a form of compression), is a possibility too, at the expense of slightly more complex algorithm.
What I'd do - write every XX seconds (ensures worst case for data loss) and write when the sensed voltage has not reached high enough (200V) for 1/50s. Ensure enough capacitance to operate for like 0.2sec.
You don't even need to have a counter for the wear index, even writing to a random position would do it. While reading - use the highest value. There could be an option to pack the deltas of energy change, or have a full encoded energy use. Delta encoding is quite common when transmitting time series.
EEPROM storage wear reduction: Increasing numbers are easy to store in an EEPROM without exceeding the limits. As an example you can use 32 byte to count the lower 5 bits by using the lower 5 bits as address for said table. You will have to clear all the bits of the "old" byte (address -1) and set all the bits for the current byte. That would give you 16 times the endurance. (16 milltion for that PIC16F690). Upon power loss you just need to search for the one byte that is not 0. If it's byte 12 then your last 5 bits are 0xC. I have seen that exact thing in car odometers where the milage is stored in an I2C 24C02 EEPROM.
yes i also think the 100k writes is per memory address, so if you have 10 addrs. to store your number, you can do 1M cycles, just change de memory address, ive done something similar to you once using some bits from the number as address, other methode, that ive used to store water consumption measured in some caudalimeters, is to write on the next memory cell available, after a power up, you just look for the biggest number (done on a 32 bit int, wont ever happen a rollover during the device life, otherwise RIP)
With your explanation, you make every design looks easy and doable.
Thanks a lot.
Very interesting, especially the capacitance loss, thanks.
With this schematic (5:01), I would expect the in-circuit reading to be quite accurate. Nothing is connected to the "top side" of the capacitor except a 2MΩ resistor across it, and the voltage sensing divider network of perhaps tens of MΩ (via the now-insignificant 120Ω resistor).
I just fixed a radar-based motion-detecting light timer switch thanks to this info! Its relay did not get enough voltage (7 V instead of 12) to turn on. I was expecting the Zener to be bad but it works after replacing the 560nF dropper capacitor, which fell to around 410 nF, with a 470nF one (closest I have, and another 100nF in parallel won't fit).
A known trick in the home appliances trade is to bump the relay with the handle of a screwdriver and if the relay clicks, it's the capacitor too degraded to provide enough voltage.
Great video and interesting watt meter... Also I'm happy to have seen you for the first time, reflected on the oscilloscope display! :D
I love those repair videos, thanks a lot !
Did you test it against your own power meter to check its accuracy?
The data sheet says 1% accuracy. It said 93w on the display for a 100w rated bulb. He has it going through his isolation transformer so there will be a voltage drop, but that much? www.eltako.com/fileadmin/downloads/nl/_flyer/1-fase_32A_kWh_meter_WSZ12DE-32A_nl.pdf
You're the smartest Diode I know and the coolest, May your salt forever flow freely and your anti-caking agent keep you free from clumping...cheers.
I look forward to your component tester video.
It's fascinating how the code works.
Thanks to Markus Seidl for making it open source.
That made it possible for the Chinese to copy without paying him a penny.
4:40 Had many a pleasant CW QSO on that frequency.
Thankyou so much for the insight into these kinds of Mains fed dropper caps. It explains why i have had so many failures in various SMPS etc when the devices are still quite young! The Mains in my location can become unreliable so i guess this is when the self healing by these kinds of caps sees them become damaged!
I just watched your video on the small 12v power supply ( wall wart), and I really like how you re engineered the schematic . Cheap dangerous supply. I joined your channel and a thumbs up. Have a great Father's Day. Stop in and visit, I would like to have you as a knowledge base for my electronic projects. 21 i South Carolina, Old Radio Night
Great video on the electricity meter and totally agree that the dropper caps are the usual culprit if many mains-powered devices stop working properly. I have seen that mainly in electronic timer switches ...BTW, those transistor testers are neat. I just made a video about mine which seems to be the same type and now I am working on one on how to update the firmware because there are many new tests it can do with different firmware
your definitely in my top favorite youtubers list keep up the amazing work! really enjoy the content you put out! teaches me a lot!
Love your work mate! I'm going mad crazy over these devices for all the power measurements!
Really want to see inside of such energy meter.
Thabk You, Diode
Ha ha, that's a nice looking cat. From the angle you shot from, your cat has a maniacal look in the eyes.
It's the cat that actually buys all the dodgy power adapters.
@@nikkopt True that's what keeps the cat's owner on his toes.
Glad to see another troubleshooting and repair video. Your psu repair videos are some of the best troubleshooting videos on RUclips…
If you could make that a regular feature on your channel…. it would be awesome and really helpful.
I hope you and your sweet animal friends are doing well. That little gray cat with the smooshed face is the cutest little fella
will be nice to see if these one's have a reed switch inside to stop people using magnets to give a lower reading. here Ireland 90% of all meter's were changed to the "pay as you go" type, were you buy credit in a shop just like phone credit and type it into your meter for electricity . if your running low but it goes past 6 pm on a Friday it will not knock off until after 10am Monday morning. but it's more expensive than normal. so folk's were using magnet's on the meter's that would slow the power reading down inside them... but the "ESB" BOARD (the main company here in Ireland) realized and added protection inside them in the form of a reed switch. signalling them that a magnet is been placed on the meter.
im sure other countries has has the same type of meters installed in their countries too...
The 5% tolerance error is easily possible to adjust away during manufacturing/testing, as-long as it is only an absolute error and not indicative of other flaws like temperature/age drift. The meter looks like it's a 2% accuracy meter within its intended measurement rage. (range = 250mA to 32A)
It will ofcoz measure lower currents, but are allowed additional error (probably it is pretty accurate down to around 50-100mA).
Measurement standard is pretty relaxed below 20mA (-100% to +10%), yes it does not even have to measure at all below 20mA.
All current ranges mentioned here are subject to the stated base current of this meter of 5A. If a meter has another base current these ranges will move accordingly. Higher base current = worse for precision (allowed) at low currents.
Yay, I got a component tester like this one as a kit - with the acrylic case. It has only one sot3-6 SMT component (below the ZIF socket) which I experienced no difficulties soldering in (if you do - just add more rooowseeeeen!), everything else is THT.
Works pretty well, but doesn't want to work with ds18b20 digital thermometers (and I don't know the reason why, they are functional).
Regarding writes to EEPROM, perhaps disconnecting the capacitor during operation would help determine if it writes on power-off? My e-bike's computer only writes during power-off (pulling out the main battery will cause total loss of all trip data since last power-off).
Nicely presented. Thanks!
I would like to see a video where we can try to fool a meter and possible methods applied in modern meter design to overcome that or is there flaws in our modern power meters as well....
*Very good video 👍🏻❤️*
👏👏👏
(EU / MID standards/rules) The register is saved to eeprom upon detecting a power fail situation, however the standards does give manufacturers some slack, a minimum of 1/10th of kWh must have advanced for it to be mandatory to store the new energy register status. So, if you have a situation with alot of rapid on/off/brown outs it will not "wear out" the silicon.
(I'm pulling this from memory, possibly it could be 1/100th kWh, one of them)
You will ofcoz only save when the electronics are about to quit.
Manufacturers may incorporate alot of tricks to avoid a needless save, and it is typically only done as a last resort before uC hits a critical low voltage that threatens normal operation.
As such; a massive under voltage for a period or two does typically not trigger a register save scenario, the software senses "yep, Phase voltage are out... no big problem, my reservoir cap is full, I can wait for it to back to normal levels". As I mentioned, there are tricks to resort to, you may cut back on non-essential calculations and functions during extreme prolonged voltage drops and spend more time in uC sleep-modes to conserve energy.
lol i can only imagine living life and every thought in my head and words i spoke sounded just like you...its like at the end of every sentence is drawn out for surprise...but good wooooorrrrkkkkkkkkkkk, i really like itttttttttttttt lol
The datasheet of the meter states more than 15 years of life at maximum load. The PIC16F690 microcontroller has an EEPROM endurance of 1 milion cycles. Dividing 1 milion cycles to 15 years results in about 7.6 writes per hour so it probably writes every 10 minutes to EEPROM if the count has changed and possibly also at power loss.
I would not rely only on the power loss writes on a metering/logging application because software can hang, capacitors age over time and might not provide the supply for enough time and so on. With a 10 minute timed write and a watchdog inaccuracy can be limited to around 16% or better. At a maximum load of 32A*230V=7.36kW * an accuracy of 1%=73.6W*2000imp/kW=147200 maximum counts at which data must be written to keep the 1% accuracy no matter what the life of EEPROM.
It's possible that this uses wear-leveling to dramatically increase the endurance. This chip has only 4KB of Flash, but the feature set is small, so I think you could afford the wear-leveling overhead.
There are many different ways to manage EEPROM writes. Since only flipping bits causes wear, a simple way to do a non-volatile count is to reserve an EEPROM block to mark 0s for every 10Wh and update the binary total when the mark block is full. If you have 128 bytes of EEPROM and set aside 512 bits (half) for marks, then the count only needs to be updated once every 5kWh, the mark block only gets reset once every 5kWh as well and you have 58 bytes left for calibration data, parity checks, bad bits table and other necessities.
Writing to eeprom seems like a bad design. A Lithium backup battery can actually last longer than this chip when it's constantly written to.
Otherwise it seems to be rather well made actually. Except for that chunky capacitor which is flapping in he wind.
@@teardowndan5364 There are also things like gray encoding that could be used here, since we know it is only counting up. If you spread the writes out over the complete EEPROM, there shouldn't be any issues with the EEPROM wearing out.
@@fkiesel9442 Gray coding would only halve wear only as long as you only do +1 increments. For increments greater than +1, wear on LSBs would remain largely unchanged.
PIC16F690 has 256 byte of EEPROM but no one stores frequently changing events in EEPROM when there is chunks of 7k of flash to be had.
not sure how it's in PIC, but in Atmel the EEPROM life is 100 000 writes, the flash life is only 10 000 writes. But of course, in both cases you can use wear leveling. I've already done a similar thing in couple of my Atmel programs years ago, but now I forgot it exists :).
Thows are useful if u whant to know how mutch like rooms take power. I use them in most of my projects to measure power use. Thows are awesom, and kinda cheep but usefull.
The component tester video would be VERY interesting there is even a 100+ page document about it
sadly the code is way to complex for me to understand or follow along
I was wondering if a MOV in parallel with the capacitor would extend its working life by absorbing some spikes from the power mains.
Firstly, if you want to use a MOV, you would put it parallel to the mains, not the capacitor. They often fail short-circuit, which would destroy the circuitry otherwise. MOVs should also have a fuse in series somewhere because of this.
Also, it probably wont protect the capacitor much since it's only rated to 275V. You would be much better off with a higher voltage rated capacitor, like 400V or more. Then it wouldn't be damaged nearly as much to begin with.
So could this sort of device be made to work with DC?
It seems to be mainly DC anyway with some AC rectification .
yeap that ups supports cold start :)
Uses Mcp3905 energy meter chip and 3.5795mhz crystal. What microcontroller is it? Never knew if this chip is very accurate.
I like your cat.
Nice!
I'm wondering if you have a video where you built the isolation transformer? I have one but it's not powerful enough
The isolation transformer is factory built, not DIY
@@DiodeGoneWild cool thanks. I was referring to the whole setup with the bulb and variac. I should have said. Sorry bro
@@jstro-hobbytech Warning: You cannot use a variac as an isolation transformer, most if not all of them have the "neutrals" of primary and secondary connected. Also, there is no variac in this video, perhaps you mean something else?
@@vaclavtrpisovsky I have both my friend. I thank you for saying that as some people do not know the difference. The isolated transformer I have just isn't as powerful as I thought it would be and I hoped there was a cheap way to maybe diy another one from another being that dgw knows everything there is to know about this stuff haha I get ya though, I've corrected people before as well. Thank you again my friend
@@jstro-hobbytech You might have some luck cascading two identical transformers but what you probably want to do is wind your own. I would suggest using an iron core transformer with separate bobbins and the VA rating you need, removing the secondary and replacing it with a winding identical to the primary. Otherwise, you will probably need to study a lot about magnetic hysteresis, which likely entails reading yellowed books from back when capacitors were called condensers. Engineering mains voltage transformers is a lost art; most people don't bother and simply copy earlier designs for their application. Very few people need new transformers that do black magic never done before, like the ferroresonant mains regulator; you might as well find a well-documented isolation transformer and recreating it.
Can some explain ac current sensing with out isolation
There is another version on market which has two terminals for rs485
Which can show other parameters.
I was wondering is it possible to add 485 to this one 🤔
I'm wondering how much power the electricity meter consumes itself.
Capacitive droppers aren’t the most efficient things in the world, so it would be interesting if modern ones use less energy and if they are any different.
For billing meters in your home "big-ones" they are taking power before power current transformer to run itself. That one in video is just counting one appliance or sub feed. We had those kind of meters, only in three phases in production facility for mobile operators/antennas. One operator used about 40 000 kWh/a, it had only three 4G antennas (I think 800+1800+2100+2600Mhz per 1 antenna) and cabinet to run them. Mobile data uses huge amount of power.
Hey from your video seeing shunt resistor it bugs me to make current meter using shunt to measure high current
hello, could you please explain the wirediagram of the electric toothbrush Oral B Vitality Plus. It doesn`t seems to have any smart chip, but yet it has a timer. How is this possible?
then you can make a video about the timer unit and temperature control
Thanx man
Diodegonewild, try to use a hashtag in your videos so you get more viewers/subscribers
# ElectronicsCreators
# powermeter
The capacitor's voltage rating should be 400V power film capacitor, if this unit is for 230V use.
Although this is also a film capacitor, 275V is not enough headroom and there is no inductor to absorb voltage spikes.
I bet this is a common problem with this model.
275V is an AC voltage rating. It is about the same as 630V DC rating.
@@michvod Nope. Everything I said is for AC.
DC ratings are ALWAYS less than AC ratings, Check any relay.
Your calculation is also wrong. Even the peak to peak (P2P) of an RMS voltage is 275 * 1.414 = 388.9 not 630
its holy-war question. X1 rating and Y2 rating is different for one cap!
@@piconano Wrong. I was talking about the cap specs, not the actual operating conditions. An X cap with 275VAC rating is usually specified also to handle 630V DC. X caps are meant to be used in AC applications, so their ratings are always specified in VAC, not in DC. I have seen non X rated film caps in capacitor dropper applications like those, and they were almost always 630V rated
I think the non isolated PSU inside the meter doesn't stick to industrial standards that requires isolated PSU
I'm not an expert on regulations, but it only powers the internals, nothing exposed, so it should be fine. The interface is isolated using an optocoupler.
It's enclosed in a box and you are not supposed to put your fingers into it while it's working so it's totally fine.
Your cat knows more than you 😂🤣
Top very good!.
👍👍
Can sir explain UHF microphone circut please
Why is there a symbol of (seemingly) a ratchet mechanism on it?
It won't go backwads (can't measure generated electricity)
Niiiiiiicee!
Dam capacitors causing problems again!.
Hmm dodgy reactive power supply
I'm here to steal your loverly cat, and any good capacitors :-D
jtag connections?
It’s probably using flash memory vs a eeprom
That ic doesn't have flash. Also, eeprom has 10x higher write endurance than flash
02:59 lol 😂
For real power measurement it calculates the Power Factor as well otherwise it will not be real power
I really enjoyed your video, please can I engage you specially for a training?
I think your cat would say its very doughy bloody hell🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣
Cat pic... priceless!
To think that a cap was going wild in this one... other than that, electronics here are meh, nothing to see here, move along.
Ayo
the dodgy engineer.
I love your videos! Also can I have a shoutout please/plz?