How does this weight scale power on? (step-on) - Page 1
Forum section: electronics / projects

author: CharlesK
author_rank: Contributor
timestamp: April 05, 2020, 08:02:58 pm
content: 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,

author: IanB
author_rank: Super Contributor
timestamp: April 05, 2020, 09:59:41 pm
content: 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?

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2020, 10:05:52 pm
content: 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.

author: mc172
author_rank: Frequent Contributor
timestamp: April 05, 2020, 11:05:40 pm
content: Quote from: IanB on April 05, 2020, 09:59:41 pmThey 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".

author: james_s
author_rank: Super Contributor
timestamp: April 05, 2020, 11:16:49 pm
content: Isn't the sensor on those absolute using capacitance?

author: amyk
author_rank: Super Contributor
timestamp: April 05, 2020, 11:21:01 pm
content: 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.

author: CharlesK
author_rank: Contributor
timestamp: April 06, 2020, 06:58:12 am
content: Thanks for all the replies. There are 2 ways of measuring a change in load;Through the load cell, value between 0mV and 20mVThrough the hx711 module, 24 bit valuePin 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?

author: CharlesK
author_rank: Contributor
timestamp: April 06, 2020, 11:09:54 am
content: 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 06, 2020, 11:18:42 am
content: Quote from: CharlesK on April 06, 2020, 11:09:54 amJust set a pin high when awake and look on a scope.

author: CharlesK
author_rank: Contributor
timestamp: April 06, 2020, 02:49:38 pm
content: 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?

author: langwadt
author_rank: Super Contributor
timestamp: April 06, 2020, 03:24:38 pm
content: Quote from: james_s on April 05, 2020, 11:16:49 pmsome 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 selfleakage I doub't it makes much of a difference

author: IanB
author_rank: Super Contributor
timestamp: April 06, 2020, 03:35:47 pm
content: Quote from: langwadt on April 06, 2020, 03:24:38 pmThe 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.

author: David Hess
author_rank: Super Contributor
timestamp: April 06, 2020, 05:33:11 pm
content: Quote from: amyk on April 05, 2020, 11:21:01 pmThat 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.

author: IDEngineer
author_rank: Super Contributor
timestamp: April 06, 2020, 05:41:11 pm
content: Quote from: CharlesK on April 05, 2020, 08:02:58 pmAn 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.

author: IDEngineer
author_rank: Super Contributor
timestamp: April 06, 2020, 05:43:38 pm
content: Quote from: CharlesK on April 06, 2020, 11:09:54 amQuote from: mikeselectricstuff on April 06, 2020, 11:18:42 amScore 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".

author: IDEngineer
author_rank: Super Contributor
timestamp: April 06, 2020, 05:54:57 pm
content: Quote from: james_s on April 05, 2020, 10:05:52 pmThis 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.

author: langwadt
author_rank: Super Contributor
timestamp: April 06, 2020, 07:11:50 pm
content: Quote from: IDEngineer on April 06, 2020, 05:54:57 pmhttps://youtu.be/CGZeaAamD0k

author: IDEngineer
author_rank: Super Contributor
timestamp: April 06, 2020, 07:19:18 pm
content: Quote from: langwadt on April 06, 2020, 07:11:50 pmYep, 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.

author: Dave
author_rank: Super Contributor
timestamp: April 06, 2020, 07:56:30 pm
content: Quote from: james_s on April 05, 2020, 11:16:49 pmNope. 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.

author: langwadt
author_rank: Super Contributor
timestamp: April 06, 2020, 08:14:47 pm
content: Quote from: Dave on April 06, 2020, 07:56:30 pmhttps://shop.mitutoyo.eu/web/mitutoyo/en/mitutoyo/01.03.05a/Digital%20ABS%20AOS%20Caliper/$catalogue/mitutoyoData/PR/500-203-30/index.xhtml

author: CharlesK
author_rank: Contributor
timestamp: April 07, 2020, 08:31:55 am
content: Quote from: IDEngineer on April 06, 2020, 05:43:38 pmI 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!

author: CharlesK
author_rank: Contributor
timestamp: April 08, 2020, 09:43:35 am
content: I'm averaging around 50ms for a reading from the load cell with a cycle of around 1100msWhat 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:void loop(){ADCSRA |= (1 << 7);digitalWrite(LED_PIN, HIGH); //for oscilloscope reading pin 13if (readCount()-(val2/2) < memp && memp < readCount()+(val2/2)){digitalWrite(LED_PIN, LOW);//BOD DISABLE - this must be called right before the __asm__ sleep instructionMCUCR |= (3 << 5); //set both BODS and BODSE at the same timeMCUCR = (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 sleeploop();}digitalWrite(LED_PIN, LOW);Serial.println("timer reset1");timer_reset();}

author: Dave
author_rank: Super Contributor
timestamp: April 08, 2020, 10:30:44 am
content: Quote from: langwadt on April 06, 2020, 08:14:47 pmNope, 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.

author: langwadt
author_rank: Super Contributor
timestamp: April 08, 2020, 11:31:14 am
content: Quote from: Dave on April 08, 2020, 10:30:44 amhaving to reset the home position could just be because it doesn't have non-volatile storage of exactly where the sensor was mountedin the factoryIt claims unlimited speed

author: Dave
author_rank: Super Contributor
timestamp: April 08, 2020, 04:51:48 pm
content: 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.

author: IDEngineer
author_rank: Super Contributor
timestamp: April 08, 2020, 06:52:41 pm
content: I suppose they could have a magnet and a Hall effect sensor (or a shorting contact in the pattern, etc.) at the fully-closed position. That could yield an absolute zero, at the expense of relative zeroing (where you use the calipers to measuredifferencefrom a reference).

author: CharlesK
author_rank: Contributor
timestamp: April 09, 2020, 06:32:28 pm
content: Quick question, I've managed to initiate power down mode using 5v from the arduino (led pin 13). Only thing is, it only works if going through my multimeter. The multimeter running is in series measuring 5v dc going from pin 13 to the SCK pin on the hx711 module. If I connect pin 13 directly to the SCK pin, sleep mode crashes and the screen shows random characters. I assume this is because pin 13 is messing with the digital signal coming from the module.Could it be that the circuit is missing a resistor? I don't have any close right now so I can't try unfortunately. How many ohm should the resistor be?

author: CharlesK
author_rank: Contributor
timestamp: April 09, 2020, 08:35:11 pm
content: Ok, I couldn't wait and drove to my house to pick up some resistors. I tried a couple between 6k and 30 something k. basically they all worked. Now I need a diode to make the power only go one way (into the hx711 module). I measured the power consumption and its between 10 and 16 mA measured at 9v. The lcd board and the arduino nano have some on board LED lights that I should take off. It will save some power too. About 2mA per LED if I measured it correctly. That should bring down the average current to below 10mA. I also read that the USB chip consumes quite a significant amount of power which stays on during sleep mode. I now have a couple of arduino pro mini's on the way which should further reduce the current consumed. I wonder how low I can make it go and thus how long it will last on a 9v battery.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 10, 2020, 12:08:00 pm
content: Quote from: David Hess on April 06, 2020, 05:33:11 pmThat's likely how most of them work. You can get the average consumption down to a couple µA this way with the appropriate design with not too much effort. Then even a CR2032 cell would last several years this way. With a more involved design, you could get down to a few tens of nA I guess, but I'm sure very few vendors bother with that.

author: xani
author_rank: Frequent Contributor
timestamp: April 10, 2020, 02:54:19 pm
content: Quote from: IanB on April 05, 2020, 09:59:41 pmI also have cheapie but mine have on/off button. "Turning it off" reduces power usage by about 20%. Like, what's the fucking point of "turning off"

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 10, 2020, 03:01:55 pm
content: Quote from: xani on April 10, 2020, 02:54:19 pmAhah, yeah they're not all created equal. I've owned a cheap digital caliper that would just deplete batteries in a few weeks when off.OTOH, I have a Mitutoyo one that I've bought a few years ago. Original battery is still good and I haven't changed it yet.