Author Topic: Energymeter Pulse Counting with optic sensor, Moteino, Raspberry Pi & EMONCMS  (Read 1718 times)

Energyreader

  • Newbie
  • *
  • Posts: 1
Some weeks ago I decided to start to realise your Energymeter Pulse-Counting-Project, because I want to read the Pulses from my Energymeter which counts the production of my familys little Solar System.
And because your system seemed to be the best I found in the WorldWideWeb, I ordered some weeks ago 2x Moteino-USB R5 (one with RFM69W 868MHz and one with RFM69HW 868MHz , both with extra flash memory)
 The problem is, I'm just about to start with the whole hardware-connecting-and-programming-thing so I'm a real Newbe and I'm not hundred percent sure, if I understood everything right.
 
I have:
Sensor TSL257 optical pulse sensing kit  ( http://openenergymonitor.org/emon/sites/default/files/TSL257.pdf )
2x USB Moteino R5
1x Raspberry Pi B+
And I want to upload the Datas automatically to my EMONCMS Account.
 
So here are my short questions:
1. Where exactly do I have to connect the 3 pins (GND VDD OUT) from my Sensor, to the Transmitting-Moteino?
2. How exactly do I have to connect the Recieving-Moteino with the Raspberry Pi?
3. What is the right sketch for the transmitting and recieving Moteinos, so that the optical sensor and the Raspberry Pi can communicate
4. What is the right sketch for my Raspberry Pi that it collects the datas and sends it to EMONCMS? My Raspberry Pi has that preloaded EMON Software SD Card inside , so what exactly do I have to do? And where do I have to put that sketch?
 
It would be so great if you could help this little Newbe :)

Best regards
Energyreader

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6403
  • Country: us
    • LowPowerLab
Hi Energyreader,
The sensor will output a pulse every time it detects an optical pulse from your meter. You can probably just hook the OUTPUT up to D3 (GND and VCC to "GND" and "3.3" of the Moteino).
Then you can use or adapt a sketch like the pulseMeter to calculate a volume of water for instance. This is just an example sketch. This you would load on the pulse meter Moteino. The receiver Moteino would be loaded with the Gateway sketch.

You would plug in the MoteinoUSB directly into the Pi and a new serial device will show up (like ttyAMAx). You can then use that to read messages from the remote Moteino.
I posted a python script example which posts to EmonCMS here.

Again, all are just examples, you will need to adapt them to your project accordingly.