openenergymonitor / EmonLib

Electricity monitoring library - install in Arduino IDE's libraries folder then restart the IDE
openenergymonitor.org
GNU Affero General Public License v3.0
589 stars 419 forks source link

Bean support 8Mhz #9

Closed craiglynn85 closed 9 years ago

craiglynn85 commented 9 years ago

Hi, trying to get this working on a Punchthrough Bean with additional 5V regulator, unfortunately the Bean only runs at 8Mhz, any tips on how to get it working?

glynhudson commented 9 years ago

Hi, emonLib should at 8Mhz. I think you will need to compile for 8Mhz using modified optiboot bootloder we use this on the emonPi which has an ATmega328 running at 8Mhz

On 1 December 2014 at 23:43, craiglynn85 notifications@github.com wrote:

Hi, trying to get this working on a Punchthrough Bean with additional 5V regulator, unfortunately the Bean only runs at 8Mhz, any tips on how to get it working?

— Reply to this email directly or view it on GitHub https://github.com/openenergymonitor/EmonLib/issues/9.

Glyn Hudson

Home: +44(0)1286479462 Mobile: +44(0)7769871550 Office: +44(0)1248672607

http://openenergymonitor.org http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

glynhudson commented 9 years ago

what problem are you experiencing?

On 2 December 2014 at 13:51, Glyn Hudson glyn.hudson@gmail.com wrote:

Hi, emonLib should at 8Mhz. I think you will need to compile for 8Mhz using modified optiboot bootloder we use this on the emonPi which has an ATmega328 running at 8Mhz

On 1 December 2014 at 23:43, craiglynn85 notifications@github.com wrote:

Hi, trying to get this working on a Punchthrough Bean with additional 5V regulator, unfortunately the Bean only runs at 8Mhz, any tips on how to get it working?

— Reply to this email directly or view it on GitHub https://github.com/openenergymonitor/EmonLib/issues/9.

Glyn Hudson

Home: +44(0)1286479462 Mobile: +44(0)7769871550 Office: +44(0)1248672607

http://openenergymonitor.org http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

Glyn Hudson

Home: +44(0)1286479462 Mobile: +44(0)7769871550 Office: +44(0)1248672607

http://openenergymonitor.org http://megni.co.uk http://adventuresplusnorthwales.blogspot.com

craiglynn85 commented 9 years ago

Let me look into that, thanks!

craiglynn85 commented 9 years ago

The problem is that Irms is reading up on the 22/23s while on the bean but the exact same circuit on the Uno is down at 0.05. Do you think this is a 8Mhz issue or something else?

glynhudson commented 9 years ago

Yes, sounds like could be issue with adc readings at lower speed. Mm not sure how to solve, try posting on our forums..

The problem is that Irms is reading up on the 22/23s while on the bean but the exact same circuit on the Uno is down at 0.05. Do you think this is a 8Mhz issue or something else?

— Reply to this email directly or view it on GitHub https://github.com/openenergymonitor/EmonLib/issues/9#issuecomment-65251656 .

craiglynn85 commented 9 years ago

Would changing the number of samples have any effect? It seems as if I alter emon1.calcIrms to increase the number of samples the Irms value drops in the serial.

craiglynn85 commented 9 years ago

Worked it out, the analog pins on the Bean are known as "A0" and "A1" so I had to pass "emon1.current(A1,111.1)" instead of just "emon1.current(1,111.1)"