Does anyone work with arduino or similar?

This forum is for discussion about anything else.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Does anyone work with arduino or similar?

Post Post #0 (ISO) » Wed Dec 30, 2015 10:35 am

Post by aphix »

Hi, playing around with an arduino project that I want to do, and I'm running into problems with it. Something similar to http://www.instructables.com/id/TfCD-Cl ... ermometer/.


First step I'm working on is just reading the temperature. I got a basic Uno R3 with a starter kit. Trying to use the thermistor in it.

http://www.sunfounder.com/index.php?c=c ... o&zsid=148

Is the lesson from the kit. Also includes the code I'm using.

http://imgur.com/Z6of4LA

Is how it's wired. It seems to be getting the correct temperature give or take four or so degrees off my house thermostat, but applying heat decreases the temperature it's reading as. So I'm not sure if I have it set up for the wrong thermistor type(IE the kit thinks it provided one type and it provided the other type) or there is an issue with my wiring or something.

I think if I can get the temp right, the rest of the project is basic programming with the led ring, which is pretty straight forward. And then of course producing a case and what not, but whatever on that front.

So if anyone knows anything that could help that'd be great. I'm thinking I might try just getting a different temperature sensor.
User avatar
IceGuy
IceGuy
Mafia Scum
User avatar
User avatar
IceGuy
Mafia Scum
Mafia Scum
Posts: 3390
Joined: January 29, 2011

Post Post #1 (ISO) » Thu Dec 31, 2015 5:31 am

Post by IceGuy »

You made a wiring mistake. Swap the positions of the red and black jumper cables on the board (but keep them as they are on the Arduino). The 10k resistor is supposed to be a pull-down resistor, the way you wired it it's a pull-up resistor.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #2 (ISO) » Thu Dec 31, 2015 7:40 am

Post by aphix »

Huh. Now that I look at the website that is what they are showing. Which is weird because https://learn.adafruit.com/thermistor/u ... thermistor has the power going to the resistor.

And by following that I got it working. Having power going to the thermistor produces numbers WAY WAY off.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #3 (ISO) » Thu Dec 31, 2015 7:46 am

Post by aphix »

But now that I try it at least in the house it's pulling similar numbers to what it should be.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #4 (ISO) » Thu Dec 31, 2015 7:50 am

Post by aphix »

But it was working the other way as well. I don't know any more.

The both use the same code to figure out the temperature so how could both ways be correct? They seem to both be using the NPT thermistor. Which I've confirmed I have by testing with a multimeter.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #5 (ISO) » Thu Dec 31, 2015 7:57 am

Post by aphix »

And it seems odd. Maybe it was an issue with a wrong resistor ... because now following the adafruit instructions or the sundfounder instructions they are both producing the same numbers.
User avatar
IceGuy
IceGuy
Mafia Scum
User avatar
User avatar
IceGuy
Mafia Scum
Mafia Scum
Posts: 3390
Joined: January 29, 2011

Post Post #6 (ISO) » Thu Dec 31, 2015 8:33 am

Post by IceGuy »

Do you mean with the same circuitry, or using the respective circuitries?
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #7 (ISO) » Thu Dec 31, 2015 8:52 am

Post by aphix »

Well they both are using 10k thermistors and resistors. Same type of thermistor ... I wonder if it's in the math that they are doing something slightly different to account for the decrease when it should be increasing thing ...
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #8 (ISO) » Thu Dec 31, 2015 8:52 am

Post by aphix »

So the adafruit instructions power goes to the resistor, and the sunfounder instructions as you point out goes to the thermistor.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #9 (ISO) » Thu Dec 31, 2015 8:58 am

Post by aphix »

I'm just trying to figure out how they both produce the same results if one way is supposed to be wrong.
User avatar
IceGuy
IceGuy
Mafia Scum
User avatar
User avatar
IceGuy
Mafia Scum
Mafia Scum
Posts: 3390
Joined: January 29, 2011

Post Post #10 (ISO) » Thu Dec 31, 2015 11:07 am

Post by IceGuy »

It isn't wrong, you just need to write your program (calculate the temperature) differently, and the two programs seem to be different.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #11 (ISO) » Thu Dec 31, 2015 11:18 am

Post by aphix »

Well, they seem very similar in terms of using the exact same numbers and although one does everything on one equation and the other one breaks it up they seem the same but I don't really care to break down the make and figure it out I guess. I'm sure that's the difference in there some how.

Anyways, I'm just excited to get it to work consistantly. Now it's just settling down for a temp range for the sensor, from cold to hot and then the hard part in making a case for it.
User avatar
Thestatusquo
Thestatusquo
He/Him
Shea

User avatar
User avatar
Thestatusquo
He/Him
Shea

Shea

Posts: 14371
Joined: July 27, 2006
Pronoun: He/Him
Location: Chicago!

Post Post #12 (ISO) » Thu Dec 31, 2015 12:53 pm

Post by Thestatusquo »

This is quietly one of the best ms threads ever.
tout comprendre c'est tout pardonner
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #13 (ISO) » Thu Dec 31, 2015 7:27 pm

Post by aphix »

There was no arduino threads! I mean I don't technically have an arduino. But it's seems to be a solid clone.

Microcontrollers are quickly becoming my favorite thing.
User avatar
IceGuy
IceGuy
Mafia Scum
User avatar
User avatar
IceGuy
Mafia Scum
Mafia Scum
Posts: 3390
Joined: January 29, 2011

Post Post #14 (ISO) » Thu Dec 31, 2015 9:00 pm

Post by IceGuy »

If you need something more precise, get a DS18B20 digital temperature sensor. They're cheap ($5 for 10 off AliExpress), exact (down to an eighth of a degree) and can easily be read with a library. However, if you wire them up wrong you might break them.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #15 (ISO) » Fri Jan 01, 2016 4:00 pm

Post by aphix »

So far it doesn't seem to be too far off. More then likely I'm just going to stick with a thermistor as I need to run it out a window or so for an outside temp.

I'm mostly glad that I got the rest of the project up and running in terms of using the temp to control a Neopixel Ring, as a gauge for the temp, but that was all pretty basic coding and a bit of math. So not really too hard.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #16 (ISO) » Fri Feb 26, 2016 4:33 am

Post by aphix »

Well, I got my thermistor with a long wire a while ago, just now ordered and recieved some prototype board so I can solder the circuit into place and attach it to the bit I had made with my library's 3D printer. So I'll actually have a project shield all set up. Pretty exciting stuff. Sometime in the next few weeks i'm going to break a bunch of things with soldering.
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #17 (ISO) » Sun Feb 28, 2016 4:36 am

Post by aphix »

I also have just picked up some cheapo steppers going to try building a plotter.

EDIT: Well a tiny plotter.
User avatar
Davsto
Davsto
He/Him
Farce of Habit
User avatar
User avatar
Davsto
He/Him
Farce of Habit
Farce of Habit
Posts: 5279
Joined: June 29, 2015
Pronoun: He/Him

Post Post #18 (ISO) » Sun Feb 28, 2016 4:10 pm

Post by Davsto »

My uino is very ard

(I'm sorry for this joke)
User avatar
aphix
aphix
Mafia Scum
User avatar
User avatar
aphix
Mafia Scum
Mafia Scum
Posts: 1350
Joined: September 2, 2013

Post Post #19 (ISO) » Mon Feb 29, 2016 3:08 pm

Post by aphix »

You should be.
Post Reply

Return to “General Discussion”