| Electronics > Projects, Designs, and Technical Stuff |
| How does this weight scale power on? (step-on) |
| << < (5/7) > >> |
| CharlesK:
--- Quote from: IDEngineer on April 06, 2020, 05:43:38 pm --- --- Quote from: CharlesK on April 06, 2020, 11:09:54 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. --- End quote --- --- Quote from: mikeselectricstuff on April 06, 2020, 11:18:42 am ---Just set a pin high when awake and look on a scope. --- End quote --- 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". --- End quote --- 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! |
| CharlesK:
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: ---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(); } --- End code --- |
| Dave:
--- Quote from: langwadt on April 06, 2020, 08:14:47 pm --- --- Quote from: Dave on April 06, 2020, 07:56:30 pm --- --- Quote from: james_s on April 05, 2020, 11:16:49 pm ---Isn't the sensor on those absolute using capacitance? --- End quote --- 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. --- End quote --- https://shop.mitutoyo.eu/web/mitutoyo/en/mitutoyo/01.03.05a/Digital%20ABS%20AOS%20Caliper/$catalogue/mitutoyoData/PR/500-203-30/index.xhtml --- End quote --- 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. |
| langwadt:
--- Quote from: Dave on April 08, 2020, 10:30:44 am --- --- Quote from: langwadt on April 06, 2020, 08:14:47 pm --- --- Quote from: Dave on April 06, 2020, 07:56:30 pm --- --- Quote from: james_s on April 05, 2020, 11:16:49 pm ---Isn't the sensor on those absolute using capacitance? --- End quote --- 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. --- End quote --- https://shop.mitutoyo.eu/web/mitutoyo/en/mitutoyo/01.03.05a/Digital%20ABS%20AOS%20Caliper/$catalogue/mitutoyoData/PR/500-203-30/index.xhtml --- End quote --- 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. --- End quote --- 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 |
| Dave:
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. |
| Navigation |
| Message Index |
| Next page |
| Previous page |