Puck.js as power meter logger #3983
Replies: 1 comment
-
Posted at 2021-06-19 by Robin Sat 2021.06.19
Although I found this Pixl reference: I never acquired the telepathic skill. Please provide your link so we may follow along. I found the specific answer for Puck by taking a peek at the presentation page: Below the Power Consumption heading are the measured current draw values. See the following section on how to calculate an estimated duration with a brand new battery.
Also understand that advertising interval, transmit power output and sleep durations need to be taken into account, along with number of times polling the LDR sensor is performed. > 'Which one would be the best for battery life?' What additional parts make up the total support circuitry? A schematic would assist here. > 'Is the main power usage during the transmission?' See heading Power Consumption as current draw is displayed in common units. Full running JS with LED's, BLE, and Mag in that order consume the most, shortening battery life. Posted at 2021-06-20 by user130485 Hi and thank you for great links! Apart from the LDR, there are no other components. The idea is that it will wake up to send out a reading every hour (as a baseline) Posted at 2021-06-20 by Robin Sun 2021.06.20 Thank you @user130485 for the link which assists in locating the appropriate datasheets.
As all show a wide range of voltages permissible, we will mainly be concerned with the power rating, which is 100mW max. As there are no other parts in the circuitry, we will mainly be concerned with the resistive value. Since from Ohm's law E = I * R we may deduce the the formula for current,
The lowest resistive component is nearly 100 times worse in power consumption. In conclusion it can be observed that from the values given, the LDR with the highest resistance will consume the least amount of power, but for those characteristics, will most likely be the highest cost. Even the worst case part will only consume 2ma for a fraction of a second, every few seconds. So compared with every thing else going on, is a negligible loss. That said, it must also be known that the internal resistance that the LDR will be in circuit with is around 13K ohm.
Review the datasheets for best characteristics and then compare part cost. Posted at 2021-06-21 by user130485 Love your detailed replies! Posted at 2021-06-21 by @gfwilliams Hi! I think you asked on YouTube as well?
Yes, that's exactly it. In this case, we're not even using the pin as an analog input - we're just using it to detect a digital signal - a 1 or a 0.
Yes, this is just done for ease of wiring - one side is just GND
The resistance of any LDR is less with more light - so really the biggest thing you can do to ensure low power consumption is to make sure that when you fit the Puck over the electrity meter, you try and cut out as much external light as possible. Posted at 2022-03-19 by DanDyse Hi, let me pull this thread up again. I do have another question about the sensor. We have a newly installed electricity meter now and the LEDs are very much less bright as at the meter before. So the GL5537 doesn't seem to recognize the quick flashing anymore. Is there a more sensitive sensor? I see there are couple of others ... GL5539, G5549, GL5637D (spectral peak 560nm?!) - different Ohms but I dont see if they are more sensitive or not. Any help is appreciated. Posted at 2022-03-21 by @gfwilliams Argh, that's a shame. Probably what you could do is use the same LDR but try an external resistor. If you added a variable resistor then you could actually tweak the value until it started recording the value reliably? The other thing you could try is to use the low power comparator built into the chip: https://www.espruino.com/NRF52LL#count-how-many-times-d31-crosses-vcc-2-in-10-seconds That could potentially be a software-only solution (although if you don't have an external pullup resistor, enabling the internal one when using the pin in analog mode could be a bit of a pain involving some register poking). Posted at 2022-03-21 by DanDyse Well, maybe it's just a matter of the spectral ... the blinking LED is red, human visible. The GL5537 "aims" at 550 nm, which is rather green. The GL5637D is sensitive at 560 nm ... as far as I can see, 580-590nm would make sense ... dont you think? Posted at 2022-03-23 by @gfwilliams Good point - it's worth a try. There's no specific reason I chose that LDR other than it being what I had in my desk. However my meter flashes red and it worked for me. Looks like you still get ~60% of the response for a red LED though so while maybe not as good it may be fine. Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2021-06-19 by user130485
Hi everyone
I am trying to follow the puck.js power meter example. Have a question about LDRs and battery life.
I have the below LDRs available at the local store. Which one would be the best for battery life?
Also, how to estimate, how long will the battery last for? Is the main power usage during the transmission?
Light resistance: 450K-1.2M
Dark resistance: 10MΩ
Light resistance: 135K-420K
Dark resistance: 10MΩ
Light resistance: 45kΩ - 140kΩ
Dark resistance: 10MΩ
Light resistance: 5kΩ-10kΩ
Dark resistance: 0.5MΩ
Beta Was this translation helpful? Give feedback.
All reactions