## ADC and NTC question ??

12 posts / 0 new
Author
Message

Guys,

Why is my temperature decreasing ( doing the reverse way) ?
Actually it should go up,

Here's the circuit...
http://i129.photobucket.com/albums/p231/picture_77/NTCinput_zps605909f4.jpg
it because I'm doing the reverse pull down resistor ?
thanks

Have you done Ohms Law in Science class yet ?

David.

Quote:

Why is my temperature decreasing ( doing the reverse way) ?

Perhaps re-word that statement. Why is your temperature decreasing? Because it is getting colder?!?

I think you mean "When the temperature is increasing, I get decreasing A/D counts when read by my microcontroller. Why does this happen?"

Start here: What does "NTC" mean?
http://en.wikipedia.org/wiki/The...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

NTC stands for Negative Temperature Coefficient.

Regards,
Steve A.

The Board helps those that help themselves.

Quote:

NTC stands for Negative Temperature Coefficient.

I was trying to teach fishing...

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Your response wasn't there when I entered mine.

Regards,
Steve A.

The Board helps those that help themselves.

I got it, I reverse the NTC to ground...and done...thanks folks...

Do I need a driver for FT232 and crystal on it ?
I saw on datasheet, it doesn't need crystal...

Do you need to transmit some data to your PC?

Quote:
Do I need a driver for FT232 and crystal on it ?
I saw on datasheet, it doesn't need crystal...

Yes, No, Maybe. In that order.

Yes, FTDI needs a "driver" for the PC's OS to interface with the chip when you plug in the USB cable.

If your PC doesn't already know how to talk to a FTDI chip there are drivers on the FTDI web site.

No, the FTDI chip doesn't require its own external crystal.

Maybe you don't need a crystal on the PCB? The issue is this:

The micro has to use its USART to talk to the FTDI chip. The internal RC osc on the micro could be way off the stated frequency, in which case the baud rate for the serial transmission of data to the FTDI chip could be way off, and the FTDI chip might or might not recognize the incoming serial data. Likewise, if the PC is sending commands to the micro, they might or might not be read correctly by the micro if its clock is way off the desired clock rate.

I haven't looked that the % error in baud rate tolerated by the FTDI chip, you can look that up.

One can tweak the micro's internal RC osc frequency to make it more accurate, or just use a crystal for the micro.

If you are building 1000's of units the cost of the crystal and its two associated caps might be an issue, and one would look at the other options. Only building a few? If so it is sooooo much easier just to put a crystal on the board and move on, eliminating several sources of potential problems.

I haven't looked it up lately, but IIRC one can also "program" the FTDI chip to output a 10 MHz clock (or whatever it was), on one of its pins, replacing the crystal on the micro.

Lots of options.

JC

Yes, FTDI needs a "driver" for the PC's OS to interface with the chip when you plug in the USB cable.
It is true for Windows , but GNUlinux distributions are most likely to have a FTDI driver already installed and ready to use (I am sure with FC17; no Ubuntu user asked where the FTDI driver was).

I have the driver here on my windows, it's just talked with terminal software directly ?

Last Edited: Wed. Sep 4, 2013 - 10:33 PM

Yes, I used 16Mhz Crystal on my AVR, is it the same with baud rate setting when I used RS232 ?
The circuit from datasheet

The code on AVR :
// Define baud rate

```#define USART_BAUDRATE 9600
#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) - 1)
void usart_init( unsigned int ubrr )
{
/* Set baud rate */

UBRR0H = (unsigned char)(ubrr>>8);
UBRR0L = (unsigned char)ubrr;
/* Enable receiver and transmitter */
UCSR0B = (1<<RXEN)|(1<<TXEN);
/* Set frame format: 8data, 2stop bit */
UCSR0C = (1<<USBS)|(3<<UCSZ0);
}```