PDA

View Full Version : alternative Pin for vref



ruijc
- 11th January 2008, 11:10
Hi all,

I have a project envolving a 12F675 pic reading a LM35 sensor.
The problem is that i'm using 5V as power and it's too much for the ADC resolution.

Also, i dont have any pin left that i can use for a lower voltage input for vref.

I have as inputs:
One pin for the sensor and one for a button
For outputs i have one pin for 2 leds and one for the serial out.

Also have 2 extra for the external eeprom data ( SCL and SDA ).

Is there a way i can get a better resolution with this setup or do i need more pins ?

The only thing i thought of was to lower the source power to 3V using a voltage divider after the 5V regulator and try to power all ( pic + leds + eeprom ) with 3V.

EDIT: I'm guessing that this way it will not work because it will not have the 5v needed to serial out the data to rs232 :(
.

mackrackit
- 11th January 2008, 11:15
The 12F675 will run on 2.5 volts at 4 MHz.
If 4MHz is not a problem for you app, then it should work.

KVLV
- 11th January 2008, 13:09
this is only suggestion, if the lm35 is for reading temperature, then i suggest using 1-wire device like ds18b20. the ds18b20 only require 1 pin from the pic12f675.

skimask
- 11th January 2008, 13:52
And before the original posters asks...
Do a search when you have problems with displaying negative temperatures. Plenty of working code examples around here for dealing with the DS1820.

ruijc
- 11th January 2008, 17:42
Thanks guys,

the ds18b20 is a good idea.
The problem is the temperature range. I need a sensor that can measure up to 150ºC at least ( no negative readings required ).

The LM35 can go that far. But not the ds18b20 :(

.

paul borgmeier
- 15th January 2008, 07:39
Hi all,

I have a project envolving a 12F675 pic reading a LM35 sensor.
The problem is that i'm using 5V as power and it's too much for the ADC resolution.

Also, i dont have any pin left that i can use for a lower voltage input for vref.

I have as inputs:
One pin for the sensor and one for a button
For outputs i have one pin for 2 leds and one for the serial out.

Also have 2 extra for the external eeprom data ( SCL and SDA ).

Is there a way i can get a better resolution with this setup or do i need more pins ?

The only thing i thought of was to lower the source power to 3V using a voltage divider after the 5V regulator and try to power all ( pic + leds + eeprom ) with 3V.

EDIT: I'm guessing that this way it will not work because it will not have the 5v needed to serial out the data to rs232 :(
.


You mentioned SCL and SDA for the eeprom? Many EEPROMS of this type can run at lower voltages like 1.8V or higher. Check your datasheet (see for example 24LC08 from microchip). Also, these pin names imply Synchronous Serial Data exchange, not RS232.

you should be fine at the lower voltage (provided your EEPEOM can run that low). However the LM35 needs 4 VDC so run the PIC, the LEDs and the EEPROM at 2.5-3V and the LM35 at 5 V. ... I agree with Dave in post #2

ruijc
- 15th January 2008, 10:46
Hi Paul,

you miss understood my post.

When i mention RS232 i really do mean RS232 as i have on pin from the pic to send data out through the serial port to my computer.

The issue about using lower voltages is that it will interfer with the TTL 5v required to send data via RS232 to the PC.

I have tryed lower the voltage. The pic, eeprom and leds work but i get no comunication from the serial port.

.