## Re: Moped data acq attack

This single post is part of a larger thread. Start from the top or view this post in context.

Made some good progress last night... Not really forwards but progress.

So I had 3 channels of A in coded and working using the manual SH equation from adafruit, I was actually using the example code from

https://www.circuitbasics.com/arduino-thermistor-temperature-sensor-tutorial/

But after about 150c it would basically stop rising. So i did a bunch of research and figured out that the way I had the voltage divider setup, basically the voltages were so close to 3.3 at those high temps, it basically couldn't read.

So I swapped the resistors around and went to change the "r1" in the code but it was actually set to 10k even though I was using a 100k thermistor. Ok that's weird.

So I changed it and it went totally haywire. After a bit more research I figured out that the circuit basics code is basically ripped off from adafruit and adafruit used a 10k thermistor, then basically the whole of the internet just ripped them off... Go figure. I read though a million comments and didn't see one person mention that it's all wrong. Around room temp the voltage divider is about the same as long as r1~=r2, but as soon as you go 40 deg or so from 70f, the equation doesn't hold true. Or maybe I'm just dumb? Lesson learned don't trust innernet dummies.

So I went back to the drawing board and found the NTC-thermistor library. If you search for a thermistor lib the big one that comes up is some stupid proprietary thing. A big more digging and this one looks good. It lets you put in beta ratio and all that.

Only problem is that it's coded by some big brain computer dude and he uses a very weird (probably more sophisticated) syntax than the kind of crap I write. It took me a bit but I was able to mangle my display code into shape to work with the new library.

So by about 1:30 I had one of the inputs working, the way variables are setup in the function I'm not quite sure how to create another instance for another input, but I was able to measure over 500f from my soldering iron (at God knows what accuracy) so I think this will be a more sustainable path forward.

Maity if u want to set up a GitHub repository that would be cool, I could def use a hand fighting my way through this code. Eventually I might even spin up a little shield that could hold the ballast resistors, a thermocouple amp and the VR conditioner that I'll need to make this show rpm. That's a long ways off.

This single post is part of a larger thread. Start from the top or view this post in context.
Subject Written By Posted
Moped data acq attackTopic by: Graham Motzing 10/01/21 03:31PM
Re: Moped data acq attackRe: Graham Motzing 10/01/21 03:57PM
Re: Moped data acq attackRe: * wormdirt * 10/01/21 05:59PM
Re: Moped data acq attackRe: Graham Motzing 10/01/21 06:54PM
Re: Moped data acq attackRe: daan SJAARLOOS 10/01/21 06:34PM
Re: Moped data acq attackRe: Graham Motzing 10/01/21 09:05PM
Re: Moped data acq attackRe: Poop Wizard 10/01/21 08:29PM
Re: Moped data acq attackRe: Graham Motzing 10/01/21 09:00PM
Re: Moped data acq attackRe: 🇮🇹💦 Of the Loin 10/01/21 09:13PM
Re: Moped data acq attackRe: 🇮🇹💦 Of the Loin 10/01/21 08:53PM
Re: Moped data acq attackRe: Full Tuck 10/02/21 12:15AM
Re: Moped data acq attackRe: Graham Motzing 10/02/21 10:34AM
Re: Moped data acq attackRe: 🇮🇹💦 Of the Loin 10/02/21 01:20PM
Re: Moped data acq attackRe: Jesse Stephenson 10/02/21 01:00PM
Re: Moped data acq attackRe: Graham Motzing 10/02/21 03:02PM
Re: Moped data acq attackRe: Jesse Stephenson 10/02/21 04:28PM
Re: Moped data acq attackRe: b to the eff 10/02/21 03:04PM
Re: Moped data acq attackRe: Graham Motzing 10/02/21 07:40PM
Re: Moped data acq attackRe: b to the eff 10/02/21 09:31PM
Re: Moped data acq attackRe: Graham Motzing 10/03/21 10:56AM
Re: Moped data acq attackRe: Graham Motzing 10/03/21 03:53PM
Re: Moped data acq attackRe: 🇮🇹💦 Of the Loin 10/04/21 10:36AM
Re: Moped data acq attackRe: b to the eff 10/02/21 03:21PM
Re: Moped data acq attackRe: b to the eff 10/02/21 05:39PM
Re: Moped data acq attackRe: Jesse Stephenson 10/02/21 07:16PM
Re: Moped data acq attackRe: b to the eff 10/03/21 11:06AM
Re: Moped data acq attackRe: b to the eff 10/04/21 12:22AM
Re: Moped data acq attackRe: Graham Motzing 10/04/21 09:49AM
Re: Moped data acq attackRe: Graham Motzing 10/04/21 03:01PM
Re: Moped data acq attackRe: Graham Motzing 10/04/21 03:19PM
Re: Moped data acq attackRe: Graham Motzing 10/04/21 03:25PM
Re: Moped data acq attackRe: b to the eff 10/04/21 04:21PM

Want to post in this forum? We'd love to have you join the discussion, but first: