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

use stored board type for each cell to decide how to interpret voltage #19

Closed
williamcodes opened this issue Dec 28, 2015 · 9 comments
Closed
Labels

Comments

@williamcodes
Copy link
Member

This should allow us to use v0.5 cells.

@williamcodes
Copy link
Member Author

We have 50 of the v0.5 cells ready to go. They're on the second tab of the XBee ID spreadsheet. @hrldcpr when do you think we'll be able to start deploying them?

@williamcodes
Copy link
Member Author

As promised in firmware/#18, I took a v0.5 cell and put it in a box with an extech 39240 air probe (same model HPD uses, accurate to ±2ºF) and got 71.4ºF from the extech and this from the cell within five minutes of the reading being taken:

Taken At                   Hub ID            Temperature  Sleep Period  Received At                       Relayed At
2016-01-06 03:50:47+00:00  0013a20040b9e379  110.97°      359000        2016-01-06 03:50:50.647402+00:00   

If you want a v0.5 cell to play with, we have plenty, feel free to come grab one whenever.

@williamcodes
Copy link
Member Author

Looks like we actually can't start deploying v0.5 cells until the relay server is updated even though we're saving the raw voltage. Without the update, readings get passed through to the app as >100ºF, which users would then see. We'd have to hold off on setting up accounts for those users, and the advocates want to see data within a day or so of the install. We're down to our last 17 v0.3 cells and will probably run out within the next 4 or 5 days. Do you have time to set up the ability to interpret both voltages?

@hrldcpr
Copy link
Contributor

hrldcpr commented Jan 7, 2016

Cool, I will make it work on Saturday.

@williamcodes
Copy link
Member Author

Yay! Thank you!

@hrldcpr
Copy link
Contributor

hrldcpr commented Jan 10, 2016

In the snippet you pasted earlier it says "Hub ID" is 0013a20040b9e379, which doesn't seem possible to me from the data… is that actually the Cell ID?

@hrldcpr
Copy link
Contributor

hrldcpr commented Jan 10, 2016

Hmmm, that voltage reading doesn't seem to agree with the datasheet.

The stored ADC value is 291, which corresponds to 291 / 1023 * 3.3V = 939mV, which according to the datasheet is 32°C, or 89°F…

For now I'll try calibrating it to the known value, but it's possible something fishy is going on, or that the XBee's ADC just isn't accurate enough for this chip.

@hrldcpr
Copy link
Contributor

hrldcpr commented Jan 10, 2016

Whoops forgot to close this yesterday. The different-cell-versions code is live now, using a new database table called cells, and based on the calibration you did above.

However you should do some testing before installing the new cells, because I think it's possible there is too much noise in the circuit or something like that, since every ±5mV corresponds to ±1°C, it's twice as susceptible to noise and ADC inaccuracies as the previous sensors (which use 10mV per 1°C).

So it's possible they end up being less accurate instead of more accurate, hopefully not but anyway you should try them out a bit. The fact that the reading you gave above was off by 50mV from what the datasheet implied we should expect is sketchy.

Alternatively I might be misreading the datasheet, which would be nice! It sometimes mentions VDD=2.7V whereas we are using VDD=3.3V, which maybe makes their charts useless? But that would be surprising since in that case they give no formula for converting voltage to temperature.

While you're testing, you should calibrate the sensors at multiple different temperatures, because then we can actually make a linear regression of our own which will maybe apply better to our supply voltage. I'll open an issue for that.

@hrldcpr hrldcpr closed this as completed Jan 10, 2016
@hrldcpr
Copy link
Contributor

hrldcpr commented Jan 10, 2016

See heatseeknyc/hardware#7

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

No branches or pull requests

2 participants