Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Hardware
  3. Current Sensing?

Current Sensing?

Scheduled Pinned Locked Moved Hardware
111 Posts 12 Posters 30.7k Views 10 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mwalker
    wrote on last edited by
    #83

    It looks good @Samuel235, having the detector recessed in a cavity in order to reduce the impact of ambient light isn't something that I had considered, I guess because I was mainly thinking about an off the shelf enclosure, or repurposing some other type of container, i.e. this, but I like these designs a lot better.

    I was able to use a cheap logic analyser with sigrok to work out the pulse time on my meter, and I am in the midst of designing a test rig using WS2812 led strip and a separate microcontroller in order to be able to test my pulse detection code when more of the LM393 modules arrive. One location I need to use this system has ten meters, and another has nine meters, so I need to have a good test rig to make sure that my system won't be dropping pulses.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Samuel235
      Hardware Contributor
      wrote on last edited by Samuel235
      #84

      1_1489229977213_IMG_9148.JPG 0_1489229977212_IMG_9147.JPG

      This is the bottom @scalz, the previous post was of the top part.

      Yes, having the diode resessed was big importance in my eyes. Where do you live as if its not that bad we could print some for you and send to you if you wanted it after it was finished.

      I have a few little tweeks to do but i'm pretty pleased with how the details have turned out.

      Things to ammend:

      1. Change cable specs if i decide on using 4 core into a rj11 connector.
      2. Sort out screw holes as they need some more plastic inside to be more substantial to receive my self-tapping screws.
      3. Make walls slightly thicker to allow for another skin.

      MySensors 2.1.1
      Controller - OpenHAB (Virtual Machine)
      Gateway - Arduino Mega MQTT Gateway W5100

      1 Reply Last reply
      0
      • gohanG Offline
        gohanG Offline
        gohan
        Mod
        wrote on last edited by
        #85

        rj11 connector would be very nice to have :)

        S 1 Reply Last reply
        0
        • gohanG gohan

          rj11 connector would be very nice to have :)

          S Offline
          S Offline
          Samuel235
          Hardware Contributor
          wrote on last edited by
          #86

          @gohan - I'm thinking either a 4p4c variant or some other board connector. If you could choose any board connector for this use then what would you prefer? Molex JST, dupont, RJ45/RJ11, 3.5mm headphone, 2.5mm headphone, USB mini/micro, anything. What would your preference be? I was only thinking RJ because it locks into place and is hard to pull out if knocked or anything.

          MySensors 2.1.1
          Controller - OpenHAB (Virtual Machine)
          Gateway - Arduino Mega MQTT Gateway W5100

          gohanG 1 Reply Last reply
          0
          • scalzS Offline
            scalzS Offline
            scalz
            Hardware Contributor
            wrote on last edited by scalz
            #87

            @Samuel235 yep screw holes are a bit tight but it looks good ;) I did a mini tunnel too on mine for isolating a bit the sensor, i think this can help, but not sure as it also increases the distance between the blinking led, but should work.
            For the connector on my side i don't really care :) or rj11/45 maybe..

            1 Reply Last reply
            0
            • S Samuel235

              @gohan - I'm thinking either a 4p4c variant or some other board connector. If you could choose any board connector for this use then what would you prefer? Molex JST, dupont, RJ45/RJ11, 3.5mm headphone, 2.5mm headphone, USB mini/micro, anything. What would your preference be? I was only thinking RJ because it locks into place and is hard to pull out if knocked or anything.

              gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #88

              @Samuel235
              IMHO rj11 is good because as you said it locks in place, it is not easily mistaken for whatever use, you can make a cable with rj11 plug very quickly (if you have the tool ofc). On the other hand I don't know how hard it would be to make the female socket fit in the 3D printed housing or in any sensor box where the arduino will be placed.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Samuel235
                Hardware Contributor
                wrote on last edited by
                #89

                As i would be making the arduino side as a custom board, then i will be able to just put a footprint onto the PCB, not an issue in that respect :)

                MySensors 2.1.1
                Controller - OpenHAB (Virtual Machine)
                Gateway - Arduino Mega MQTT Gateway W5100

                1 Reply Last reply
                0
                • gohanG Offline
                  gohanG Offline
                  gohan
                  Mod
                  wrote on last edited by
                  #90

                  I am more into IT stuff, 3D modeling/printing and PCB design are still unknown subjects for me :D

                  1 Reply Last reply
                  1
                  • M Offline
                    M Offline
                    mwalker
                    wrote on last edited by
                    #91

                    @Samuel235 I'm a fair way away from anywhere in Australia, so it may not be worth it, but thank you.

                    For connectors I have been leaning towards them being captive on the sensor end, I was looking at RJ45 for the other end, if only because I thought I could repurpose the connector bank and case from a cheap or surplus hub/switch/router.

                    S 1 Reply Last reply
                    0
                    • M mwalker

                      @Samuel235 I'm a fair way away from anywhere in Australia, so it may not be worth it, but thank you.

                      For connectors I have been leaning towards them being captive on the sensor end, I was looking at RJ45 for the other end, if only because I thought I could repurpose the connector bank and case from a cheap or surplus hub/switch/router.

                      S Offline
                      S Offline
                      Samuel235
                      Hardware Contributor
                      wrote on last edited by
                      #92

                      @mwalker - Ahh okay, no worries.

                      Thats makes sense for a one off for yourself, if it is just a one off then i would just wait for us to finished the pcb design and get them made up then you could just cut the connector off the end and add dupont connectors or something and push onto arduino. Unless you're waiting for the finished product with the custom arduino board too.

                      MySensors 2.1.1
                      Controller - OpenHAB (Virtual Machine)
                      Gateway - Arduino Mega MQTT Gateway W5100

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mwalker
                        wrote on last edited by
                        #93

                        Yes, I imagine a requirement to monitor 9 or 10 separate meters at a single location is a bit of a one off, but I'll be definitely interested in what you come up with to see if I can utilise it. I expect I will be using an ESP8266 based board for the micro controller part as power supply is not an issue, and I have wifi available.

                        While researching bits and pieces across the internet I came across:

                        https://openenergymonitor.org/forum-archive/node/10707.html

                        which I thought may be of interest. It seems they are flashing the LED from a microcontroller output, which is an interesting way of proving that the overall system is working.

                        S 1 Reply Last reply
                        0
                        • M mwalker

                          Yes, I imagine a requirement to monitor 9 or 10 separate meters at a single location is a bit of a one off, but I'll be definitely interested in what you come up with to see if I can utilise it. I expect I will be using an ESP8266 based board for the micro controller part as power supply is not an issue, and I have wifi available.

                          While researching bits and pieces across the internet I came across:

                          https://openenergymonitor.org/forum-archive/node/10707.html

                          which I thought may be of interest. It seems they are flashing the LED from a microcontroller output, which is an interesting way of proving that the overall system is working.

                          S Offline
                          S Offline
                          Samuel235
                          Hardware Contributor
                          wrote on last edited by
                          #94

                          @mwalker - Okay, well at that quantity you may find it useful to get some PCBs ordered that i design and then put it in a enclosure that you can come up with (saving shipping costs from me to you). Unless you just directly copy my circuitry to your own solution, up to you! So yeah, if you wanted to use my circuitry you would just wire the three wires into the arduino rather than using a RJ11 connector, would be easier than making a enclosure with panel mounted jacks and stuff. Its much easier for me to use RJ11 connectors as i'm making the arduino side as a custom board too.

                          That is what i would call a backward solution. I do agree that it would allow you to see that the arduino is running, but its just not really the way i'm doing this. The LED that i will be blinking on the front of the module is being triggered by the Photodiode and comparator itself, nothing to do with the arduino (this way if someone needed to come to your meter, they can see the LED even if the arduino has failed, as long as its still getting its power. This is not really a design feature though, just a bi-product of how i've made it).

                          MySensors 2.1.1
                          Controller - OpenHAB (Virtual Machine)
                          Gateway - Arduino Mega MQTT Gateway W5100

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            mwalker
                            wrote on last edited by
                            #95

                            @Samuel235 sounds good.

                            More digging identified the openenergymonitor sensor is a rebadged unit manufactured in China:

                            https://community.openenergymonitor.org/t/directly-connecting-to-optical-pulse-counter-with-rpi/1294/2

                            The link doesn't work but it is in the Internet archive, they have a (fuzzy) photo of the internals at right at the bottom:

                            http://web.archive.org/web/20160819224835/https://openenergymonitor.org/emon/opticalpulsesensor

                            S 1 Reply Last reply
                            0
                            • M mwalker

                              @Samuel235 sounds good.

                              More digging identified the openenergymonitor sensor is a rebadged unit manufactured in China:

                              https://community.openenergymonitor.org/t/directly-connecting-to-optical-pulse-counter-with-rpi/1294/2

                              The link doesn't work but it is in the Internet archive, they have a (fuzzy) photo of the internals at right at the bottom:

                              http://web.archive.org/web/20160819224835/https://openenergymonitor.org/emon/opticalpulsesensor

                              S Offline
                              S Offline
                              Samuel235
                              Hardware Contributor
                              wrote on last edited by
                              #96

                              @mwalker - Same image as i found on one of the links above. They are not choosing to go the comparator method either. I will be interested to see how fast mine could detect pulses. I might take one into University/school and get the pulse/wave generator on it.

                              MySensors 2.1.1
                              Controller - OpenHAB (Virtual Machine)
                              Gateway - Arduino Mega MQTT Gateway W5100

                              1 Reply Last reply
                              0
                              • scalzS Offline
                                scalzS Offline
                                scalz
                                Hardware Contributor
                                wrote on last edited by scalz
                                #97

                                @Samuel235
                                i don't think you need to go very high freq though, even with 50hz i think you can cover almost all meters you would need.

                                Because 50hz would allow 50*3600= 180000 pulses/hour so if you say you go up to 20kw/h which is a lot! that would be 9000pulses/kw/h. So 100hz with a photores is a lot..

                                but sure photodiode could be useful maybe for some other usecase, i don't know..or for some data transmission lol but here it's more something like "dark or light" at "slow rate".

                                in case you have parts in stock and want to play, you still can use 3,4 resistors, cheap bs250 mosfet and photoresistor, very easy to use. My files are now uploaded at openhardware if you need https://forum.mysensors.org/topic/6430/mypulse-sensor

                                Another nice article about photoresistor and blinking led detection i've just discovered. Looks like i've decided to use a mosfet for switching and perhaps a better digital level.., thus saving the footprint size + cost of the potentiometer.
                                http://jeelabs.org/2012/03/18/detecting-a-blinking-led/

                                S 1 Reply Last reply
                                1
                                • scalzS scalz

                                  @Samuel235
                                  i don't think you need to go very high freq though, even with 50hz i think you can cover almost all meters you would need.

                                  Because 50hz would allow 50*3600= 180000 pulses/hour so if you say you go up to 20kw/h which is a lot! that would be 9000pulses/kw/h. So 100hz with a photores is a lot..

                                  but sure photodiode could be useful maybe for some other usecase, i don't know..or for some data transmission lol but here it's more something like "dark or light" at "slow rate".

                                  in case you have parts in stock and want to play, you still can use 3,4 resistors, cheap bs250 mosfet and photoresistor, very easy to use. My files are now uploaded at openhardware if you need https://forum.mysensors.org/topic/6430/mypulse-sensor

                                  Another nice article about photoresistor and blinking led detection i've just discovered. Looks like i've decided to use a mosfet for switching and perhaps a better digital level.., thus saving the footprint size + cost of the potentiometer.
                                  http://jeelabs.org/2012/03/18/detecting-a-blinking-led/

                                  S Offline
                                  S Offline
                                  Samuel235
                                  Hardware Contributor
                                  wrote on last edited by
                                  #98

                                  @scalz - I made it with a comparator for two main reasons:

                                  1. I wasn't sure how much the frequency fluctuated from country to country and instead of spending days on end doing research for that, I just chose to go safe rather than sorry.
                                  2. If there is another application that we're not thinking of that would take advantage of a fast/high frequency light detector, this would fit perfectly.

                                  Thanks for uploading the files, will check them out today, although i pretty much have mine done now, just not got the design penalised onto the PCB to get 4 out of the 50x50 prototype order.

                                  I will get it made at University to test the board too.

                                  MySensors 2.1.1
                                  Controller - OpenHAB (Virtual Machine)
                                  Gateway - Arduino Mega MQTT Gateway W5100

                                  1 Reply Last reply
                                  1
                                  • M Offline
                                    M Offline
                                    mwalker
                                    wrote on last edited by
                                    #99

                                    @scalz the jeelabs post is interesting. When I was using an LM393 module with a LDR I was unable to detect the pulses coming from my meter (later established as 15ms). Reading that article it seems that was because of inadequate light proofing (the meter is shaded, but outdoors), but lacking any sort of test equipment, it's interesting to see his oscilloscope tracings of the response of the LDR to a pulse. Thanks for linking it.

                                    1 Reply Last reply
                                    1
                                    • F Offline
                                      F Offline
                                      fabiancrg
                                      wrote on last edited by
                                      #100

                                      I have a Smappee energy monitor, it's connected to the main input and "detect" the different equipments. It's good to monitor the overall energy consumption and production if you have solar pannels but it's not able to detect everything.
                                      In summary, it can tell you the consumption of anything with a resistor (electric oven, motor, cofee machine) or a motor (roller shutter, pump,...) but for electronic, PC and other things for which the power consumption is not regular it won't help you much. For this, I think monitoring individual component will be the best.

                                      But as you probably plus a pwoer meter on each plug, maybe a combintation of both will be a good choice.

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        sspence65
                                        wrote on last edited by
                                        #101

                                        I use main line snap on current sensors for whole house monitoring, and snap on or hall effect sensors for specific device monitoring when necessary. I use current shunts for high current, low voltage dc monitoring like battery backup or off grid solar power systems.

                                        gohanG 1 Reply Last reply
                                        0
                                        • S sspence65

                                          I use main line snap on current sensors for whole house monitoring, and snap on or hall effect sensors for specific device monitoring when necessary. I use current shunts for high current, low voltage dc monitoring like battery backup or off grid solar power systems.

                                          gohanG Offline
                                          gohanG Offline
                                          gohan
                                          Mod
                                          wrote on last edited by
                                          #102

                                          @sspence65
                                          but that way you can only monitor current, not actual power used

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          14

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          Posts


                                          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular