Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TMP36 output voltage steady in the presence of reference voltage sags.... #306

Open
RobertLRead opened this issue Aug 11, 2024 · 3 comments

Comments

@RobertLRead
Copy link
Contributor

When the MoonratII is power by a USB cable but connected to a 12V battery with a switch, switching the battery on and OFF does NOT change the output of the TMP36 voltage as measured by an oscilloscope on an Arduino R3.

However, using both a voltmeter and an oscilloscope, the 5V pin of the Arduino R3 voltage changes from 4.66 V to 4.99 volts. This has an immediate effect on the digitally measured temperatre, as evidenced by the screen shot below, which shows the voltage being switch off.
Screenshot 2024-08-11 at 1 47 43 PM
Note the ratios 4.99/4.66 and 166/156 are the same (1.070) to the third decimal place, confirming @ForrestErickson 's statement that the ADC converted measures a ratio.

We may futhermore conclude that this is only correct if the 5V voltage does not sag due to a load; however, when the system is powered at 12V, this is approximately correct.

Although this fragility is distressing, it may not matter if we power the incubator with a 12V power supply.

@ForrestErickson
Copy link
Collaborator

While I assume you are using the R3 Arduino you should state so.
Please also state the exact firmware used.

Then, the first think I am going to do is look at the voltage on the reference to be set for 1.1V.
From the documentation

INTERNAL: a built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328P and 2.56 volts on the ATmega32U4 and ATmega8 (not available on the Arduino Mega)

This will require a gain change for calculating the temperature.

@ForrestErickson
Copy link
Collaborator

By the way I see no firmware in the folder where I think it is supposed to be:
https://github.com/PubInv/moonrat/tree/main/moonratII/firmware_moonratII/production_R4/MoonTestV5
image

@RobertLRead
Copy link
Contributor Author

My new R3 work is (and will be) here:

https://github.com/PubInv/moonrat/tree/main/moonratII/firmware_moonratII/production/moonratIIR3Rob

Being uncertain of myself, I put my latest R4 code here:

https://github.com/PubInv/moonrat/blob/main/moonratII/firmware_moonratII/production_R4/MoonRatRob6/MoonRatRob6.ino

However, I am now focuing on the R3, as it gives me some hope of building a system that I can take to Tanzania.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants