Max 1270 Help
gunstarg10
Posts: 4
Hi everyone,
I am trying to measure the power consumption of a light 60watt incandescent lightbulb. So far I have a the max 1270 connected to the propeller and a current transformer output connected to the first channel of the ADC. I have modified the code from the obex to get the readings and calculate power. However, I have two issues one is that I am not getting the correct results because it usually reads close to 60watts the first time I run the code but then anytime after that it reads around 70watt. My calculations are to compute the rms since the output of the CT is ac voltage. Second I am having trouble setting a specific number of samples so that if I turn off the light it reads zero. my code should be attached, if anyone can give me any assistance on getting better results I'd appreciate it.
I am trying to measure the power consumption of a light 60watt incandescent lightbulb. So far I have a the max 1270 connected to the propeller and a current transformer output connected to the first channel of the ADC. I have modified the code from the obex to get the readings and calculate power. However, I have two issues one is that I am not getting the correct results because it usually reads close to 60watts the first time I run the code but then anytime after that it reads around 70watt. My calculations are to compute the rms since the output of the CT is ac voltage. Second I am having trouble setting a specific number of samples so that if I turn off the light it reads zero. my code should be attached, if anyone can give me any assistance on getting better results I'd appreciate it.
spin
11K
Comments
I would simplify the ADC object to limit what it does, though I do like the idea of letting it update a hub variable on a schedule of your choice. If you do that, then you can launch a Spin cog like the one shown below that will take that value and automatically update another hub variable. Just an idea: