Hello!
I am trying out the Picaxe for a energy meter project that I have been working on for a couple of years. My last version
was based on an Atmel Mega32, but I wanted to test the Picaxe to see if I could speed up my very limited development time.
So far I am pretty impressed with the Picaxe and I found it extremely easy to get started. So, for simple, small microcontroller projects I
will absolutely use Picaxe in the future, but for my energy meter project I am a bit uncertain if I have to roll back to my Atmel since I am
planning to do a lot of additional features to the logger.
I am now using a 28x2 and counting pulses with a hardware interrupt which is working great up to at least 50Hz (I tested it by pulsing thousands of series of
100 pulses @ 50Hz and it worked for hours without missing a pulse). The only thing to look out for is not to use any commands that takes longer
than 1/frequency seconds, so for example, I have to send serial data one byte at a time.
I am now displaying total logged Watt*hour and instant power consumption in Watt.
The instant power consumption I calculate by counting pulses for 10 seconds and multiplying it with 36 (my meter gives 10000 pulses / kWh).
It is OK, I tested it by shutting down all electricity in my house and turned 60W lightbulbs on to check. It seems like it is accurate.
This method gives me +-36watt accuracy (depending on missed pulses within the 10 second window) and it is quite slow so
I tested to measure the distance between pulses with pulsin.
This worked very well and I am able to get a instant power consumption reading for every pulse.
However, I did not get the Picaxe to calculate the result so I had to use a PC to calculate and display the Watt-reading.
My question is:
Is there any way of calculating 1/x*3600 where x is the measured pulselength (0-65535) * 10us (without using a math processor).
Best Regards,
Andreas
I am trying out the Picaxe for a energy meter project that I have been working on for a couple of years. My last version
was based on an Atmel Mega32, but I wanted to test the Picaxe to see if I could speed up my very limited development time.
So far I am pretty impressed with the Picaxe and I found it extremely easy to get started. So, for simple, small microcontroller projects I
will absolutely use Picaxe in the future, but for my energy meter project I am a bit uncertain if I have to roll back to my Atmel since I am
planning to do a lot of additional features to the logger.
I am now using a 28x2 and counting pulses with a hardware interrupt which is working great up to at least 50Hz (I tested it by pulsing thousands of series of
100 pulses @ 50Hz and it worked for hours without missing a pulse). The only thing to look out for is not to use any commands that takes longer
than 1/frequency seconds, so for example, I have to send serial data one byte at a time.
I am now displaying total logged Watt*hour and instant power consumption in Watt.
The instant power consumption I calculate by counting pulses for 10 seconds and multiplying it with 36 (my meter gives 10000 pulses / kWh).
It is OK, I tested it by shutting down all electricity in my house and turned 60W lightbulbs on to check. It seems like it is accurate.
This method gives me +-36watt accuracy (depending on missed pulses within the 10 second window) and it is quite slow so
I tested to measure the distance between pulses with pulsin.
This worked very well and I am able to get a instant power consumption reading for every pulse.
However, I did not get the Picaxe to calculate the result so I had to use a PC to calculate and display the Watt-reading.
My question is:
Is there any way of calculating 1/x*3600 where x is the measured pulselength (0-65535) * 10us (without using a math processor).
Best Regards,
Andreas