Author Topic: How does this weight scale power on? (step-on)  (Read 4780 times)

0 Members and 1 Guest are viewing this topic.

Offline CharlesKTopic starter

  • Contributor
  • Posts: 12
  • Country: nl
How does this weight scale power on? (step-on)
« on: April 05, 2020, 08:02:58 pm »
Hello,

I've been puzzling about how to get one of my projects to power up. I've made a weight measurement scale using a load cell, hx711 module and an arduino. This scale is powered using a 9 volt battery. It is powered on by using a soft latch power switch circuit.
()
The scale powers off after 2 minutes of inactivity.

On some digital scales, the scale powers on by putting a small load on the load cell. Here is an example of such a scale ()
The scale in the example video uses a button cell battery. How does this scale measure changes and power on without draining its battery? I thought it might be using a comparator, however I do not see anything similar in the simple circuit shown in the video.  :-//

Regards,
« Last Edit: April 05, 2020, 08:09:12 pm by CharlesK »
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12539
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #1 on: April 05, 2020, 09:59:41 pm »
One guess would be to have the sense circuit AC coupled with a capacitor. Combining this with a MOSFET as the switching element it would draw next to no current in standby because the capacitor blocks DC. Placing a load on the load cell could send a pulse through the capacitor and trigger the MOSFET which would latch on.

As a side note, I have a cheap digital caliper powered by a button cell. It also turns on automatically when you operate it. However, if you leave the button cell installed it drains to empty within a few months or less. Do you know for sure your example scale doesn't in fact drain its battery while in standby?
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #2 on: April 05, 2020, 10:05:52 pm »
I have one of those calipers too and it drives me nuts. It would have been far better to just have a conventional switch, or at least a button to apply power that could latch on.
 

Offline mc172

  • Frequent Contributor
  • **
  • Posts: 490
  • Country: gb
Re: How does this weight scale power on? (step-on)
« Reply #3 on: April 05, 2020, 11:05:40 pm »
As a side note, I have a cheap digital caliper powered by a button cell. It also turns on automatically when you operate it. However, if you leave the button cell installed it drains to empty within a few months or less. Do you know for sure your example scale doesn't in fact drain its battery while in standby?

They don't turn on when you operate them as they were never "off", they just turn off the display after a set amount of time and leave it off until there is any activity. They still do the measurement activities in the background - you can see this as some of the really cheap ones have about a 1 second delay before the display turns on. If you open them from fully closed really fast, you can see that the measurement is reproduced faithfully, despite having been "off".
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #4 on: April 05, 2020, 11:16:49 pm »
Isn't the sensor on those absolute using capacitance?
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8526
Re: How does this weight scale power on? (step-on)
« Reply #5 on: April 05, 2020, 11:21:01 pm »
The ones that "power on" when loaded are actually on all the time, the microcontroller just turns the display off and reduces the measuring frequency in "off" mode, maybe once a second or less. Then when a change is detected it increases the frequency and turns on the display.
 

Offline CharlesKTopic starter

  • Contributor
  • Posts: 12
  • Country: nl
Re: How does this weight scale power on? (step-on)
« Reply #6 on: April 06, 2020, 06:58:12 am »
Thanks for all the replies. There are 2 ways of measuring a change in load;

Through the load cell, value between 0mV and 20mV

Through the hx711 module, 24 bit value

Pin 11 on the hx711 is for power down, I assume the load can be pulsed every second or so using this?

(11 PD_SCK Digital Input Power down control (high active) and serial clock input)

Would I use the existing arduino microcontroller to check for changes or would I be better off having a seperate microcontroller that uses less power?
 

Offline CharlesKTopic starter

  • Contributor
  • Posts: 12
  • Country: nl
Re: How does this weight scale power on? (step-on)
« Reply #7 on: April 06, 2020, 11:09:54 am »
Ok, I have a possible solution. If I put the arduino in a loop where the arduino sleeps for 0.5 seconds, then wakes itself and the HX711 module. Then checks the current load cell value compared tot the stored value in the eeprom.

This should loop if no (signigicant) change is detected. If a change is detected, it will continue with the existing program. When the scale shuts off after 2 minutes of inactivity, it will store the last value in the eeprom. This wil be the value it compares to during the stand-by loop.

Power consumption can be greatly reduced this way depending on how much current the arduino and HX711 draw combined. I also have to check how long it takes to initialize the HX711. The quicker it wakes and checks, the more power it should save.

I'm trying to get this to work. Is there a way I can check how many ms the arduino wakes while checking the values? this way I could calculate average current draw per second of stand-by.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 14117
  • Country: gb
    • Mike's Electric Stuff
Re: How does this weight scale power on? (step-on)
« Reply #8 on: April 06, 2020, 11:18:42 am »
Ok, I have a possible solution. If I put the arduino in a loop where the arduino sleeps for 0.5 seconds, then wakes itself and the HX711 module. Then checks the current load cell value compared tot the stored value in the eeprom.

This should loop if no (signigicant) change is detected. If a change is detected, it will continue with the existing program. When the scale shuts off after 2 minutes of inactivity, it will store the last value in the eeprom. This wil be the value it compares to during the stand-by loop.

Power consumption can be greatly reduced this way depending on how much current the arduino and HX711 draw combined. I also have to check how long it takes to initialize the HX711. The quicker it wakes and checks, the more power it should save.

I'm trying to get this to work. Is there a way I can check how many ms the arduino wakes while checking the values? this way I could calculate average current draw per second of stand-by.
Just set a pin high when awake and look on a scope.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline CharlesKTopic starter

  • Contributor
  • Posts: 12
  • Country: nl
Re: How does this weight scale power on? (step-on)
« Reply #9 on: April 06, 2020, 02:49:38 pm »
I'll get one digital input pin to check the current value against the stored EEPROM value.

The data sheet for the HX711 (https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf) shows the output settling time to be 50ms.

(1)Settling time refers to the time from power up, reset, input channel change and gain change to valid stable output data.

as stated by the datasheet.

If pin 11 (PD_SCK) is high for longer than 60µs, it will power down the HX711 and use approximately 0.2 to 0.3 µA. Will powering down/up the HX711 make it skip the 50ms settling phase?
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: How does this weight scale power on? (step-on)
« Reply #10 on: April 06, 2020, 03:24:38 pm »
Isn't the sensor on those absolute using capacitance?

some yes some have an absolute encoder, but I think most just never turn off, if on with the display off uses a fraction of the battery's self
leakage I doub't it makes much of a difference
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 12539
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #11 on: April 06, 2020, 03:35:47 pm »
some yes some have an absolute encoder, but I think most just never turn off, if on with the display off uses a fraction of the battery's self
leakage I doub't it makes much of a difference

The make and model of caliper makes a huge difference. The cheap "no brand" calipers drain the battery at a phenomenal rate such that you have to remove the battery after use or it will certainly be dead next time you try to use the caliper. With the expensive brands such as Mitutoyo this is not the case and you can leave the battery installed.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17428
  • Country: us
  • DavidH
Re: How does this weight scale power on? (step-on)
« Reply #12 on: April 06, 2020, 05:33:11 pm »
The ones that "power on" when loaded are actually on all the time, the microcontroller just turns the display off and reduces the measuring frequency in "off" mode, maybe once a second or less. Then when a change is detected it increases the frequency and turns on the display.

That is how I would do it.  Most of the power draw is from excitation to the load cell so periodically apply excitation for a few milliseconds, and make a quick low resolution measurement.
 

Online IDEngineer

  • Super Contributor
  • ***
  • Posts: 1951
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #13 on: April 06, 2020, 05:41:11 pm »
How does this scale measure changes and power on without draining its battery?
An excellent question. We have one of those step-on scales, it's well over 10 years old, and I've NEVER changed the battery. I don't even know what kind of battery it has. When you apply a bit of pressure, it CALibrates for a moment and then is ready to go. I haven't paid attention to see what sort of delay exists between the application of pressure and the display responding. If I get some free time (HA!) this is worthy of investigation because even with an ultra-low-power MCU waking up only every couple of seconds, 10+ years on any kind of cell is pretty impressive.
 

Online IDEngineer

  • Super Contributor
  • ***
  • Posts: 1951
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #14 on: April 06, 2020, 05:43:38 pm »
I'm trying to get this to work. Is there a way I can check how many ms the arduino wakes while checking the values? this way I could calculate average current draw per second of stand-by.
Just set a pin high when awake and look on a scope.
Score another win for "debugging firmware with an oscilloscope".  :)  One of my favorite questions to ask newbies is to name the most useful tools for firmware debugging. I give a lot more weight to those who include "oscilloscope".
 

Online IDEngineer

  • Super Contributor
  • ***
  • Posts: 1951
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #15 on: April 06, 2020, 05:54:57 pm »
I have one of those calipers too and it drives me nuts. It would have been far better to just have a conventional switch, or at least a button to apply power that could latch on.
This covers two of my pet peeves in one post.

1) Digital calipers are "cool" and all that, but I have and use "old-school" dial calipers. I have one set that has two indicators and two scales on the dial, one in inches and the other in millimeters. You can instantly read in either unit, don't even need a finger to push a button to "convert" from one unit to the other, and calibration is guaranteed by confirming zero before opening them. I'm all for advanced technology (it pays my bills!) but sometimes simpler is better.

2) What is the obsession with "soft" power switches? In systems where some subsystem must be continuously powered, sure. But for something like calipers? And if they're determined to not have a conventional power switch, why not just sense movement? That would be even cheaper and more reliable.
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: How does this weight scale power on? (step-on)
« Reply #16 on: April 06, 2020, 07:11:50 pm »
I have one of those calipers too and it drives me nuts. It would have been far better to just have a conventional switch, or at least a button to apply power that could latch on.
This covers two of my pet peeves in one post.

1) Digital calipers are "cool" and all that, but I have and use "old-school" dial calipers. I have one set that has two indicators and two scales on the dial, one in inches and the other in millimeters. You can instantly read in either unit, don't even need a finger to push a button to "convert" from one unit to the other, and calibration is guaranteed by confirming zero before opening them. I'm all for advanced technology (it pays my bills!) but sometimes simpler is better.

https://youtu.be/CGZeaAamD0k
 

Online IDEngineer

  • Super Contributor
  • ***
  • Posts: 1951
  • Country: us
Re: How does this weight scale power on? (step-on)
« Reply #17 on: April 06, 2020, 07:19:18 pm »
https://youtu.be/CGZeaAamD0k
Yep, which is why I said "sometimes simpler is better". Other times, more complex gives you more features. Just depends on the task at hand. In short, use the best tool for each job.
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: How does this weight scale power on? (step-on)
« Reply #18 on: April 06, 2020, 07:56:30 pm »
Isn't the sensor on those absolute using capacitance?
Nope. Try pulling the strip from a broken one, if you ever have the chance. The metal pattern is uniform along the whole thing, no variation whatsoever.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: How does this weight scale power on? (step-on)
« Reply #19 on: April 06, 2020, 08:14:47 pm »
Isn't the sensor on those absolute using capacitance?
Nope. Try pulling the strip from a broken one, if you ever have the chance. The metal pattern is uniform along the whole thing, no variation whatsoever.

https://shop.mitutoyo.eu/web/mitutoyo/en/mitutoyo/01.03.05a/Digital%20ABS%20AOS%20Caliper/$catalogue/mitutoyoData/PR/500-203-30/index.xhtml
 

Offline CharlesKTopic starter

  • Contributor
  • Posts: 12
  • Country: nl
Re: How does this weight scale power on? (step-on)
« Reply #20 on: April 07, 2020, 08:31:55 am »
I'm trying to get this to work. Is there a way I can check how many ms the arduino wakes while checking the values? this way I could calculate average current draw per second of stand-by.
Just set a pin high when awake and look on a scope.
Score another win for "debugging firmware with an oscilloscope".  :)  One of my favorite questions to ask newbies is to name the most useful tools for firmware debugging. I give a lot more weight to those who include "oscilloscope".

I bought one of those very cheap ebay oscilloscopes a couple of years ago. This will be the first time I'll be able to use it for something practical. I'll see how low I can get the ms and report back!
 

Offline CharlesKTopic starter

  • Contributor
  • Posts: 12
  • Country: nl
Re: How does this weight scale power on? (step-on)
« Reply #21 on: April 08, 2020, 09:43:35 am »
I'm averaging around 50ms for a reading from the load cell with a cycle of around 1100ms

What remains now is to actually measure consumption in both states. I don't currently have a way to measure mA/uA.

my multimeter reads 0.03A in normal operation, 0.02A when checking the load cell (without LED_PIN) and 0.01A during sleep mode. I have yet to try powering down the HX711 during sleep.

Below is the code I'm using to check the load cell value and then put the arduino back to sleep.

Code: [Select]
void loop(){
  ADCSRA |= (1 << 7);

  digitalWrite(LED_PIN, HIGH);  //for oscilloscope reading pin 13

  if (readCount()-(val2/2) < memp && memp < readCount()+(val2/2)){

    digitalWrite(LED_PIN, LOW);

   //BOD DISABLE - this must be called right before the __asm__ sleep instruction
  MCUCR |= (3 << 5); //set both BODS and BODSE at the same time
  MCUCR = (MCUCR & ~(1 << 5)) | (1 << 6); //then set the BODS bit and clear the BODSE bit at the same time
  __asm__  __volatile__("sleep");//in line assembler to go to sleep

  loop();

  }
  digitalWrite(LED_PIN, LOW);
  Serial.println("timer reset1");
  timer_reset();
}
« Last Edit: April 08, 2020, 10:12:10 am by CharlesK »
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: How does this weight scale power on? (step-on)
« Reply #22 on: April 08, 2020, 10:30:44 am »
Isn't the sensor on those absolute using capacitance?
Nope. Try pulling the strip from a broken one, if you ever have the chance. The metal pattern is uniform along the whole thing, no variation whatsoever.

https://shop.mitutoyo.eu/web/mitutoyo/en/mitutoyo/01.03.05a/Digital%20ABS%20AOS%20Caliper/$catalogue/mitutoyoData/PR/500-203-30/index.xhtml
Nope, still not an absolute position sensor.

The on/off button toggles the display, the thing is still registering the position when you turn it "off". Replacing the battery requires the user to recalibrate its home position.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4857
  • Country: dk
Re: How does this weight scale power on? (step-on)
« Reply #23 on: April 08, 2020, 11:31:14 am »
Isn't the sensor on those absolute using capacitance?
Nope. Try pulling the strip from a broken one, if you ever have the chance. The metal pattern is uniform along the whole thing, no variation whatsoever.

https://shop.mitutoyo.eu/web/mitutoyo/en/mitutoyo/01.03.05a/Digital%20ABS%20AOS%20Caliper/$catalogue/mitutoyoData/PR/500-203-30/index.xhtml
Nope, still not an absolute position sensor.

The on/off button toggles the display, the thing is still registering the position when you turn it "off". Replacing the battery requires the user to recalibrate its home position.

having to reset the home position could just be because it doesn't have non-volatile storage of exactly where the sensor was mounted
in the factory

It claims unlimited speed




 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1356
  • Country: si
  • I like to measure things.
Re: How does this weight scale power on? (step-on)
« Reply #24 on: April 08, 2020, 04:51:48 pm »
How hard do you really think one can move the caliper jaws? You can only move it so fast before the 150-300mm of travel has passed.

They advertise them as "absolute", because they made it function in a way that would make a layman think they are. Unlike the commonly found digital caliper, you don't have to zero them out every time you turn them "on" (enable the display). That's it. That's all there is to it.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf