Applying alternating current to Microcontroller.

Thread Starter

sachin inamadar

Joined May 19, 2016
5
I have designed a VCCS circuit. The output of the vccs is alternating current in milli amps and the voltage is 2.9V. from this vccs circuit I have to connect to the microcontroller. Is it possible to apply AC to the microcontroller or I should convert AC to DC and then apply to the microcontroller?
 

AlbertHall

Joined Jun 4, 2014
12,345
Microcontrollers generally have protection diodes to prevent inputs going above the supply or below ground and if such voltages are applied the current must be limited - below what depends on the micro. Some pins may not have such protection and you must consult the data sheet. Even if the current through the protection diodes in below the maximum specified the operation of the micro may be disrupted.

In general, it is best to avoid applying voltages outside the supply voltages.

You can connect AC to a microcontroller pin as long as the positive and negative peak voltages are within the supply voltage.
 

jpanhalt

Joined Jan 18, 2008
11,087
The datasheet for your microcontroller will show the maximum negative voltage you can apply to a pin. For the chips with which I am familiar, the max negative with respect to Vss is 0.3V:

upload_2016-6-15_8-47-18.png

Do you need both halves of the cycle? If so, you can shift its voltage to stay positive.

John
 

mcgyvr

Joined Oct 15, 2009
5,394
Can you try to explain exactly what you are doing and why?
These guys may be able to suggest the "proper" way to do what you want but thats hard when we have to guess what you are tying to do..
 

Thread Starter

sachin inamadar

Joined May 19, 2016
5
Can you try to explain exactly what you are doing and why?
These guys may be able to suggest the "proper" way to do what you want but thats hard when we have to guess what you are tying to do..
I have to connect multiplexer to microcontroller. from the output pins of mux
i am getting AC and this AC i need to apply to microcontroller to read the values
from mux pin.
my question is it possible to read values from microcontroller by applying AC signal to micro pins?
 

AlbertHall

Joined Jun 4, 2014
12,345
The source is a current source so, within limits, the output current does not depend on the voltage. If that is so then maybe this circuit would suit. R1 & R2 set the centre line for the AC voltage while R3 (and C1) takes the AC current and generates a suitable voltage for the micro.
upload_2016-6-15_14-51-6.png
 

WBahn

Joined Mar 31, 2012
29,976
You REALLY need to give us more information to get any kind of a useful response. What kind of mux is this? Digital mux? Analog mux? What?

What is it that you are trying to do with the microcontroller? Read the voltage? Read the current?

You say that the output is 2.9 V but with a controlled-current. Well, if you control the current to be half as much as before into the same load, how can the voltage stay at 2.9 V? Are you saying that the maximum possible output voltage is 2.9 V?

Could you provide some kind of schematic or block diagram for what you have in mind?
 

jpanhalt

Joined Jan 18, 2008
11,087
I have to connect multiplexer to microcontroller. from the output pins of mux
i am getting AC and this AC i need to apply to microcontroller to read the values
from mux pin.
my question is it possible to read values from microcontroller by applying AC signal to micro pins?
That question has been answered. Yes, you can read an AC signal, so long as all of the voltages are positive relative to VSS of the microcontroller. No, you cannot apply a negative voltage (more negative than 0.3V relative to VSS) to any pin of a PIC microcontroller ( or any others I am aware of).

John
 

WBahn

Joined Mar 31, 2012
29,976
That question has been answered. Yes, you can read an AC signal, so long as all of the voltages are positive relative to VSS of the microcontroller. No, you cannot apply a negative voltage (more negative than 0.3V relative to VSS) to any pin of a PIC microcontroller ( or any others I am aware of).

John
And even if you are willing to rely on the protection circuits to keep from damaging things and even if it worked, you would not get a meaningful result.
 

AlbertHall

Joined Jun 4, 2014
12,345
And even if you are willing to rely on the protection circuits to keep from damaging things and even if it worked, you would not get a meaningful result.
In the PIC I know from bitter experience that relying on the input protection can cause some strange malfunctions in things apparently completely unrelated. In my case it caused the internal oscillator to jitter about and it took bloomin' ages to find out why.
 
Top