Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Newbie/Numpty questions re PICish issues!

Status
Not open for further replies.
Hi

i have a digibee+ that i am using to automate a home brewery...it is based around a PIC microcontroler. It has 16 digital outputs and 16 digital inputs and 4 analog inputs.

You can see it here- Analogue and Digital I/O Using a Simple USB Adaptor Module

Now my problem is to do with the analog inputs. I am using them to measure the temperatures of various vessels using LM35s. The problem with LM35s is that the voltage at below 100c is less than a volt and the digibees analog inputs require a range of 0v-5v in order to report 0 to 255 to my vb.net program i have written. So i have LM10 opamps ramping that 1v up to 5v giving me better resolution.
Ok...now the problem....the values being reported by the digibee are floating all over the place! I think it has something to do with the legnth of my wires to the LM35s. The wires range in length from 3' to 9'. At first i thought i would benefit from using screened wires to the LM35s, but this has made things worse. Help!
Am i wiring this in corectly? I have 6" of screened 2core wire going from the digibee boards analog inputs to strip board with 4 LM10s on, then i have the aforementioned 3' to 9' screened wires going to the LM35s on the brewing vessels. I have the 0ve wire to the screen of the cable and the 5v and output wires inside the screen.

Not sure i have explained very well...but any help at all will be fab...this is driving me mad!!

Cheers all!

Steve
 
Are the voltages after the op-amps floating around?

It would also be a good idea to put a capacitor between the output and inverting input of each op-amp, to make sure that there are no high-frequency signals.

I would use DS1802 temperature sensors. You can actually connect many in parallel and still read each temperature separately if you have the right firmware.
 
Hi Diver, the voltage into the digibee from the opamp is rock solid. The makers of the digibee said to try putting a resistor across the inputs to lower impedance but i have no idea what value to use,, they also sugest a capacitor but again dont sugest what value to use.

can you sugest anything to try?

I like the look of the one wire stuff (that is what the DS1802 is isnt it?) but have not yet ventured into that world yet...if i can get this working and some beer brewed then maybe i can use one wire to monitor the heat pump and solar panels!

Cheers

Steve
 
Last edited:
If you just want a quick fix then a little project I posted may help. clicky. You will require a USB-Serial cable but it should be very straight forward to use in VB.

Mike.
 
If you don't have an oscilloscope, you can't tell if the voltages have a large oscillation on top of the DC voltage. This could be mains voltage, or some other signal, being picked up and amplified or the amplifiers could be oscillating.

The idea of the capacitor between the output an the inverting input is to reduce the gain at high frequencies. When reading temperatures, you want to filter anything above about 0.1 Hz so large resistors and capacitors can be used to give a large time constant and a very low cut-off frequency.

A capacitor between the analogue input and ground can help, but you also need a resistor in series, as many op-amps will go unstable if you have a capacitor directly on the output.

Post your circuit if you can.
 
Here is an opamp circuit that amplifies the output of a LM35 over a narrow temperature range to utilize the full 0 to 5V range of the PIC's A/D.

Anticipating your next question: What temperature range do you want?
 
Last edited:
this is the LM10 LM35 opamp circuit i am using. i want to use the whole 0c to 100c range or be able to focus in on one particular part of the temperatur range for even more acuracy ie the 60c to 80c range...thats a nice option but not essential.

will look at the other options just now....

thanks all for the help...owe you a pint or two!

Steve
 

Attachments

  • LM35 & LM10 amp.jpg
    LM35 & LM10 amp.jpg
    19.3 KB · Views: 184
Last edited:
Here is the previous circuit revamped for 60 to 80deg C, and compared to yours.
 

Attachments

  • LM35amp1.png
    LM35amp1.png
    33.2 KB · Views: 160
Thanks Mike, can i re use my LM10 for that? also, what changes do i make to get the full resolution?

Diver, can you sugest cap and resister values to try to stablise my readings?

i have updated the diagram to show actual values i am using now. the wires to the LM35 are 2 core shieled cable with the shield being -v and about 6 foot long.

cheers!

steve
 

Attachments

  • LM10 LM35.jpeg
    LM10 LM35.jpeg
    12.5 KB · Views: 148
Last edited:
Ok more info... I have just unplugged a jumper on the digibee board that supplies the 5v I am using to power the 4 lm10s and the 4 lm35s and the oscillation disappears. Could I be picking up small spikes from that supply and amplifying them with the LM10s? If so how can I filter them out? Incidentally, I measured the current drain across the jumper as 2.9ma.

Cheers

Steve
 
The 5V is dirty, and not suitable for powering low-level analog circuitry. Look on the main board. Find out how the 5V that powers the PIC (and serves as the reference voltage for the PIC's A/D converter) is derived. Tap that, if you can.
 
Thanks Mike. I have traced the pic v+ to the usb in socket and it also seems to be suppling my tap off to drive the LM10s and LM35s....so surly it cant be dirty can it? If it is the supply, how can i filter it clean? Can i use 3 AA cells for the supply to the LM10 and LM35s to check see if that resolves things? just as a fault finding option?

For the LM35/LM10 circuits i have tried fitting a 1k resistor in paralel with the LM35s output (near to the LM35s) and also with a 1k resistor on the lines from the LM10 strip board to the digibee. I have noticed no change. :confused: the PIC on the digibee is a 16c745 for reference.

I need to try adding some caps now....any sugestions what value they should be and where they should be located idealy?

Thanks all for your help...really apreciate it!:)

Steve
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top