I want to do simple data logging of an A/C 220V well pump. The end goal is to determine how frequently it runs and how long its cycle times are. Power usage estimation would be an added benefit, but it’s not necessary. That means I can sacrifice on accuracy.
The Gadgeteer module available in the store ([url]https://www.ghielectronics.com/catalog/product/390[/url]) seems ill suited to the task because I’ll probably exceed 10A. There were 3rd party solutions to this problem, but they seem to have been taken off the market. What 4.3 compatible high current options are out there?
I’m also not sure how to deal with the A/C 220V problem. There are two A/C 110V legs. If the sensor has to be inline, can I get away with one sensor attached to one leg and just multiplying its readings by two? Alternatively, if the sensor is non-intrusive, can I run both legs through one sensor?
If you’re not worried about high accuracy, I think I’d give one of the non-invasive current sensor a try. They’re cheap and you don’t have to make any contact with the high voltage. You would put it around one of your hot 110V wires and then double the number for 220V. I have one of these but haven’t tried it out yet. So, I can’t speak to the quality or any problems you may run into with the data but others claim them to be easy to use in the reviews I’ve read.
I was aware of these products; however, with the exception of the discontinued Seeed Studio item, none of them seem to have Gadgeteer compatible boards. I’m not a hardware guy, so I’m less comfortable with the breadboard option. If there were a way to obtain the discontinued Seeed Studio Gadgeteer board and @ Duke Nukem’s 4.3 driver, I’d be in business.
It’s just an analog sensor. So, you can solder it directly to a G-Plug or Extender module and you’re Gadgeteer ready. If you solder it to exactly the same pins that Seeed did in their module (pin #4), then you should be able to use Duke’s driver w/o any problems.
I seem to be hearing that there is no longer an out-of-the-box solution for this on the market - as I suspected. Since I’m not a hardware guy, picking up a soldering iron makes me uncomfortable without more complete instructions.
If I were to go @ ianlee74’s route, I have some questions.
The non-invasive sensors all have 3.55mm connectors with 3 contacts. Do I only need one of those contacts? If so, which one? If not, where do they all go?
I admit I don’t understand most of what’s being said in the following article ([url]Learn: Electricity Monitoring — OpenEnergyMonitor 0.0.1 documentation), but my reading suggests that the 100A non-invasive sensor seems to be able to fully drive a 5V input. Section 8.4. (Analog Inputs/Outputs) of the G400 (FEZ Raptor) manual states that analog inputs can range from 0V to 3.3V. That sounds like a problem. Am I missing something?
I’m assuming GHI’s own legacy Current ACS712 Module uses an ACS712 chip. That chip seems to do integration. If I’m doing a direct solder, connection, won’t I be missing that? Is that a problem?
If I go with @ Cowboy Senior’s route, I have a different question. I have used the GHI Relay X1 2.0 module. I imagine that I couldn’t use that device in the scenario you suggest. Correct me if I am wrong. Otherwise, what equipment would I need, and how I would need to wire it? Just so we’re clear, I don’t want my electronics to govern whether the well pump is on or off. I only want it to observe the well pump’s state.
If you look at the schematic for the Seeed module (attached), you will see that there are only two wires. One is the analog signal (SIG), it goes to Gadgeteer pin #4. The other is ground (GND), it goes to Gadgeteer pin #10.
I’m not sure exactly what that is saying… The Seeed module didn’t use any other components. So, my assumption is that you will probably only see a low voltage. You might want to do some tests with a meter before plugging it into your microcontroller. If you do need to drop it down, then a simple voltage divider (one extra resistor) should do the trick.
You are replacing that chip with the non-invasive clamp.
Good find. It looks like @ Duke was able to get it working, though. Like I said, I haven’t used this module. I’m not sure I follow you on the diode vs resistor question, though.
If I understand what he’s suggesting then, no, I don’t think that relay would work for you. You’d need to get a relay with an input rated for the input voltage of your pump. Then you would let the pump state trigger the relay’s state. The relay would in turn act as a switch of a low voltage signal from your micro. Essentially, it would act like a button that would be automatically pressed. You would need to use a standard button circuit with current limiting and pull-down resistors in this scenario.
Remember that the output from the non-invasive sensor is -v to +V with 0 as the mid point because of the fact it will be measuring AC current.
The open energy monitor design supplies one side with 2.5V effectively shifting the ground up by 2.5V and the other connection is the signal input to the ADC. This then means the output swing is 0 to 5V with 2.5 being the mid point. 5V was chosen as this the input range of the ADC on the Arduino.
You could use 3.3V / 2 and then the input would be 0 to 3.3 with 1.65 being the mid point and this would ensure your input remains within the ADC range. This is how I use it with a Spark Core to read the main power to my apartment.
Could you put that on the bottom shelf for me? The -V to +V issue with AC current seems logical (for the non-invasive clamps with an internal shunt resistor [0 to 1V as per the datasheet]; however, the diode kind seem to return some kind of current [33mA as per the datasheet under the Seeed Current Sensor Module found here https://gadgeteer.codeplex.com/SourceControl/latest]), but I’m not sure how to implement what you’re describing.
Use 2 resistors to create a potential divider. Two 470K in series will do. Join them so they are in series and then attach one end to 3.3V and the other end to 0V. The point were they join is now connected to one of the the current sensor leads (the one that normally goes to ground). The other end of the current sensor goes to your analog input.
The swing on the input to your ADC is now centered around 1.65 volts.
If you need a schematic to understand this then someone might be able to oblige or look at the Open Energy monitor schematic. Just change the 5V to 3.3V in your design. I am busy packing for a trip so don’t have time to draw one up but it is quite simple. Sorry.
@ ethicalhacker - My 4.3 driver for the Seeed Current Sensor is just a straight upgrade to cover 4.1, 4.2 and 4.3. If you private message me your email address I’ll send you the driver install for testing and when I get some time I’ll post it here http://wegadgeteer.codeplex.com/
So you want count each time the motor gets power on/off and the duration of each on/off cycle?
First theres no need to put anything in series with the motor, thats a bad idea - period.
Second it may be better to find the electronics that is causing the motor to get switched on and exploit that.
If you must rely on the 220v AC itself, then connect a small step down transformer (in this scenario termed an isolation transformer) across the motor, then you just need to rectify and detect the small output AC which could be something convenient like 5 or so volts, consider using an opto isolator here too, nice n safe.
Just dont have any direct connection between your system and the dangerous AC supply. Also avoid relays, not your friend at all when striving to provide input to digital systems.
@ Dave McLaughlin - I ended up building what you described. It doesn’t work very well because the board’s 3.3V source varies widely based upon the USB power supply. The “zero point” moves too much. In theory, it should be about 1.65V, but in practice, I’ve seen it as far away as 0.385V. That has a profound impact on accuracy. I was calculating anywhere from 0A to 7A+ for a known current of 0A depending on the USB power supply. My well seems to draw around 8-10A on both 110V legs (a guess from readings taken with a USB power supply that gave me a known zero reading close to 0A). Thus, the threshold to consider the well “on” is too close to the zero.
Is there a reason that I couldn’t just average power from the positive voltage coming from the sensor - thus eliminating the ground shift (essentially sampling only the top half of the sine wave)? What would happen if I connected the sensor (which is essentially a low A/C voltage) to the analog input without chopping off the negative voltages first? Is there something (perhaps a diode) that I could use to ignore negative voltages, or does this require a full A/C to D/C converter? Would the losses on such a converter have an significant impact upon accuracy?
Is there something I need to do to wash the 3.3V power? I doubt the current sensor puts a load on the 3.3V supply. The CPU isn’t doing anything particularly taxing here because this is all the app does.
Which processor module are you using. I’ve found that the ADC on a number of them are not very good for anything other than basic analog input for demoing sliders etc and this is likely where you are seeing this variation.
Better to use an external ADC with a nice clean supply and stable reference. I like the MCP3428 as it is I2C and so easy to use but is not very fast in terms of thousands of samples per second type capture.
I would need to take quite a few samples per reading to deal with the sine wave issue. The typical number seems to be around 400 (looking at various drivers). Performance isn’t paramount, but it’s something to consider.