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.

Not sure if this is possible but...

Status
Not open for further replies.

hackableFM

New Member
I am trying to put together a PIC & LCD project which is capable of reading the output voltage and current of two seperate P.S.U's.

I have no problem in making a device for one P.S.U. (I have built such a gadget in the past) so the hardware & program for the PIC aren't a major issue here, What I need to know is how do I manage to measure the two seperate P.S.U. Without commoning their 'Gnd' terminals. I would like to keep these seperate if at all possible.

I have considered using 2 x 16F877 or 16F690 PIC's (Just because I have them) and two seperate LCD units but this I feel would just look untidy, costly and it's not the way I would like it done.

I have in the past used a 16F877 using code snippets from other sample programs with...

ADCON1 = %10000000 ' Set analogue input, Vref is Vdd

This I understand sets the analogue inputs up so that any voltage fed into the analogue inputs are reference to gnd.

I have had a look at the Datasheet and I simply cannot make sense of how to setup the ADCON register, The datasheet whilst extremely useful for certain things just completely baffles me on other things, this is one of them. I believe from what I have read that you can use two pins as reference points but I have no idea how to go about this. Can anyone help? Or is there a hardware way to accomplish what I need?

Many thanks.

hackableFM...
 
Check my tutorials for more helpful data on using the analogue inputs, it's a lot simpler than the datasheet.

As for ground connections, you need to join them together, or provide some isolated communication between the two - a LOT more complicated.
 
Last edited:
Cheers Nigel, I thought it was gonna be difficult, I thought you could set up the PIC to accept analogue inputs with 2 reference points/pins to which I would have connected one 'PSU gnd' to each.

Never mind, I'll definitely check out your tuts though.

Thanks.

HackableFM.
:)
 
Cheers Nigel, I thought it was gonna be difficult, I thought you could set up the PIC to accept analogue inputs with 2 reference points/pins to which I would have connected one 'PSU gnd' to each.

I would suggest using a second PIC to read the second supply, and transfer the reading via an optocoupler to the other PIC and LCD.
 
There are several ways to measure analog voltages between two circuits with isolated grounds. The method used depends upon the possible potential difference between the two grounds.

If it is less than a few volts you can use a standard instrumentation amplifier with differential inputs.

For ground voltage differences up to near 200V you may be able to use this.

For higher voltages you need an amplifier designed for that purpose such as from TI or Analog Devices. If you can connect the PIC ground to one of the voltages being measured then you just need one amplifier, otherwise you need two. Note that the TI amps require a separate ±15 power supply on both input and output, although there is a way to operate off a single supply as shown in the data sheet. The AD unit is more expensive but requires only one +15V supply.
 
OK, Thanks for the info, I like the sound of 2 pics and an opto coupler, I might just look into that.

Cheers
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top