I am using the Texas Instruments TO-92. Whenever incorporate the temperature sensor into my device and code, my other ainput voltage->digitaloutput signals gets VERY noisy and increases by a very large scale. I am confident that I wired and coded it correctly, so I'm not sure why it affect my other signals. I was wondering if any of you have encountered the same problem, if so, how did you fix it. Thanks.
You'll need to provide a lot more information - the TO-92 is not a device, is a package type used for tens of thousands of
different devices.
We really need to know what() you've got wired up and how its wired up(), the power supply details, and the sketch(*) itself ideally
-
- links to datasheets, schematic diagram, post the code in code tags.
Here is the link to the sensor:
I wired it like this:
Vs:-> Vcc of Breadboard Power Supply Stick 5V (https://www.sparkfun.com/products/108040) connected to 12 v AC/DC wall wart
Vin:-> analog input 9 of arduino mega
here is the temp calculation code I used
void temperature() {
if (count%4==0){
analogRead(tempsensorPin);
delay(10);
float temp = (((analogRead(tempsensorPin)* 5)-.6)*100)/1024;
GLCD.print(temp); break;}
}
int count=0;
void loop(){
count++;
temperature();
rest of code that handles the other input signals.
]
Did you connect ground? That device doesn't have Vin, it has Vout.
Did you double-check the correct orientation of the device from the pinout-diagram - its notoriously
easy to get confused and connect back-to-front because the pin diagram is a bottom view.
Yes i forgot to mention that I attached the sensor ground to the ground of the Breadboard Power Supply Stick.
I also meant Vout was connected to the arduino, not Vin.
You need one common ground, so chips ground to power stick ground to Arduino ground.
Mark
Measured the Vout voltage w.r.t. ground with a multimeter? I can't see how such a device can cause problems unless its plugged in
backwards and drain the power supply and getting hot... It shouldn't take more than a tiny current.
So, I switched the analog input pin from ai9 to ai5 and looks like there is no more noisy signal, but I am getting temp readings of ~100Celciuswith the equation i posted earlier.
I also tried all other ai pins and it seems like A0-A7 doesnt interfere but gives me bad readings while A8-15 interferes and gives bad readings.Strange...
So from what I understand by looking at the diagram, that view is with the temp pins facing me correct?