PaxInstruments / t400-electronics

Electronics for the Pax Instruments T400 temperature datalogger
20 stars 9 forks source link

SW_PWR cannot detect button action #116

Closed samchoy88 closed 9 years ago

samchoy88 commented 9 years ago

image

I found the voltage at SW_PWR pin as below: Button pressed: above 4V Button released: above 1.2V

Arduino - digitalRead(SW_PWR) cannot detect the button released at 1.2V I changed the R6 (10K) becomes 2K that can solve the issue.

charlespax commented 9 years ago

Good catch. Is there anything to think about interns of pull-up resistors on the SW_PWR pin?

samchoy88 commented 9 years ago

I found the voltage come from MCU internal pull-up.

charlespax commented 9 years ago

On Electronics version 0.9 hardware I changed R6 from whatever value it was to 2k. With a 2k resistor in place I measured the voltage between GND and the point indicated below. With the button unpressed I get 3.269 V. With the button pressed I get 3.287 V. screen shot 2015-01-06 at 10 49 15

Note that SW_PWR pin is Arduino digital 17, which is normally RXLED. I think our problem may be come from here. Perhaps the bootloader defines this as an output and sets it to HIGH. In the Blinkytape bootloader @cibomahto disables RXLED and TXLED. Which bootloader did you flash onto these boards, the LilyPad Arduino USB in the Arduino IDE?

charlespax commented 9 years ago

Problem should be solved int he new soft power circuit.

screen shot 2015-01-25 at 22 33 09