Double Micro (nano) Ampere meter
-
@mfalkvidd said in Double Micro (nano) Ampere meter:
@NeverDie the sketch uses the internal pullup:
Button myBtn(buttonPin, true, true, 40); // Declare the button( pin, pullup, invert, debounce ms)Right. So that's one leg of the button. Is the other leg connected to GND through a 330ohm resistor? Or....?
-
Thanks. I'll do that then.
Regardless, I must be doing something wrong, because I'm feeding it 9.9mv (see photo)

across A+ and A- from a voltage divider powered by 2xAA batteries, but it's showing zero current. Shouldn't it be showing 9900ua instead?[I alsoi tried sending it 99uv instead, but it still reads zero]
-
Thanks. I'll do that then.
Regardless, I must be doing something wrong, because I'm feeding it 9.9mv (see photo)

across A+ and A- from a voltage divider powered by 2xAA batteries, but it's showing zero current. Shouldn't it be showing 9900ua instead?[I alsoi tried sending it 99uv instead, but it still reads zero]
So, here it is with the button and with 99uv applied.

Button mechanics works fine, but it keeps registering zero as the uA. Isn't it 1uv=1ua? So, shouldn't it be reading 99ua? Or am I (quite probably) misunderstanding something?The HX711 I'm using is a clone of the Sparkfun one.
-
I added in the 0.1uF cap across A+ and A-, but that made no difference.
What's odd is that if I run the sparkfun scale code, it does in fact detect voltage (and converts it to pounds). Hmm.. Sounds like maybe it's not reading the right datapins. I'll check that next.
-
Yup. That was my error. I had initially wired it using the sparkfun directions for the initial test. Sparkfun wired the DAT and CLK pins to different arduino pins. When I made the change to AWI's selections, it now works. :)
-
By the way, there was a similar project posted on the eevblog by a guy named quantumvolt:
https://www.eevblog.com/forum/projects/ppmgeek!-5-5-digit-dvm-volt-ref-cal-(for-arduino-or-any-uc-w-spi)/
One of the things that they eventually noticed and talked about was that quite a bit of noise came in over the usb. Not sure if that applies only to usb's connected to computers for power, or whether it may apply to other sources as well. Anyhow, just thought I'd mention it in case anyone here is using that and wants to drop their noise level.Also, although I'm no expert, I would guess this project might (?) benefit from a PCB implementation, because, in general, it seems like the shorter the connections, the lower the noise. Of course, please just take that as constructive feedback. No criticism intended. I think it may also be why Dave Jones chose to power his uCurrent from a button cell directly attached to his PCB: he wanted the power lines to be as short as possible.
Thanks again for posting the project!
-
@AWI do you think that logging reading to SD card could be a useful addition? (in case you want to monitor something for a longer time)
@gohan said in Double Micro (nano) Ampere meter:
@AWI do you think that logging reading to SD card could be a useful addition? (in case you want to monitor something for a longer time)
Yeah, but then you'd probably also want an RTC to go with it. There are already shields for both of those, though, so it's probably better to keep the project simple. Since I'm interested in solar charging current, I'll probably monitor wirelessly and do my logging that way. It's more fun to see stuff graphed in real time. :)
-
The refresh rate is really slow: a lot slower than 100ms described in
https://www.openhardware.io/view/380/Micro-nano-ampere-meter-double
where in the introduction it says, "~100ms update rate to be able to 'see' power fluctuations (like radio communication)". What do I need to change to get that?It matters less, but response to button pushes is also very slow. Has anyone devised a fix for that?
Rather than re-invent the wheel, I thought I'd ask first.
I did try increasing the sample rate by solder bridging the "RATE" solder pads on the back:

I'm not sure, but that may have helped speed things up a bit. It's still very slow updating though: nearly 7 seconds between screen updates.Anyhow, current consumption during normal operation is something < 1.5mA, according to the datasheet. So, for my purposes (admittedly a bit different than the OP's), I need to get it powered up, take a reading, and then power down again as quickly as possible. The datasheet says the powerdown drain for the HX711 is <1ua.
-
I have the same problem, I don't have a jumper on my HX711 board so I soldered directly the pin of the IC with a small wire.
It has clearly improved things, but it's still slow so I will try to reduce number of samples and if it's not enough switch to TTP223 touch buttons in toggle mode, one to reset, one to change screen, so I will never miss a press. -
The refresh rate is really slow: a lot slower than 100ms described in
https://www.openhardware.io/view/380/Micro-nano-ampere-meter-double
where in the introduction it says, "~100ms update rate to be able to 'see' power fluctuations (like radio communication)". What do I need to change to get that?It matters less, but response to button pushes is also very slow. Has anyone devised a fix for that?
Rather than re-invent the wheel, I thought I'd ask first.
I did try increasing the sample rate by solder bridging the "RATE" solder pads on the back:

I'm not sure, but that may have helped speed things up a bit. It's still very slow updating though: nearly 7 seconds between screen updates.Anyhow, current consumption during normal operation is something < 1.5mA, according to the datasheet. So, for my purposes (admittedly a bit different than the OP's), I need to get it powered up, take a reading, and then power down again as quickly as possible. The datasheet says the powerdown drain for the HX711 is <1ua.
@NeverDie @Nca78 a lot going on here :grinning: Nice to see that my afternoon project sparked creativity.
I started this to be a datalogger for remote monitoring of MySensors node power consumption. During the run changed my mind and it turned out to be this which fits my needs. But all options are still open..
The converter has a max sample rate of 80Hz which was default on the board I used. I balanced accuracy and readability by applying sample averaging. This averages out much of the noise from USB source etc.
The sparkfun boards are probably designed a little different and don't have the shield which helps to keep out noise.
To increase speed you can change the amount of averaging (number of readings per sample)
To get a better response for the button the way is to go for non blocking (averaging) readings of the Adc. The library is very basic so that would be the best place to start. -
Seems like adding a larger cap on the ADC input would be an alternate way to average the readings, and require fewer ADC cycles. I'll give that a try.
I have the HX711 with the metal can on order, but only China had it, so it will take a while to get here. If anyone gets desperate, I suppose they could make their own metal enclosure and connect it to the "yellow" pin, which is there for that purpose. Unfortunately, noise will still leak in over the wiring, so I don't have high hopes it will make much difference.
-
I've concluded that the ADS1220 is, for now, a better fit for my needs. If I have it sample at 20SPS and throw out the first sample, then all subsequent samples are within less than 1ua of the final number. That's from a sloppy dupont wiring on a breadboard, so more proper and shorter connections on a PCB might be even better. Regardless, for my immediate purposes, repeat-ability at <1ua is good enough. The current consumption is less, and I get my answer much faster than with the HX711.
Just to be clear, I'm not here to rain on the HX711's parade. I'm mentioning the above only in case anyone else has needs similar to mine. I may revisit the HX711 later, after I receive the metal can version from China. Meanwhile, I look forward to following whatever progress people make with it.
-
I received the red HX711 board with the metal can. What does the J1 solder jumper on the back do?

Also, any mods I should make before attaching the metal lid (to, for example, speed up the sample rate?)

-
I threw together this wireless node for measuring and reporting sub-milliamp currents using an ADS1220. I hope to do the same now with the HX711. Since it's auxillary to the circuit being tested, the extra measurement time of the HX711 won't matter so much.

-
I received the red HX711 board with the metal can. What does the J1 solder jumper on the back do?

Also, any mods I should make before attaching the metal lid (to, for example, speed up the sample rate?)

The reference PCB in the HX711 datasheet (https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf) does not show a J1. Whatever it is, AWI did not solder bridge his J1, at least not in the photographed version he posted.
-
Hi guyes!
Finished my device yesterday but to my surprise the display is blank all the time when running the "Double Micro Ampere meter" sketch. I tested the display with the "Hello World!" example from the Lib and it seems to work. What might I be doing wrong?

-
Seems like it cannot communicate with the HX711 so it gets stuck at "scale.begin"
Need to look in to that. I'm using A3 and A6 for the dout and sck this should work right? Or do I have to use A0 and A1? -
Seems I can't use A6 since A6 and A7 are "Analog Exclusively Pins". Darn, need to disassemble and correct...