Applying alternating current to Microcontroller.

Discussion in 'General Electronics Chat' started by sachin inamadar, Jun 15, 2016.

  1. sachin inamadar

    Thread Starter New Member

    May 19, 2016
    5
    0
    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?
     
  2. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    387
    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.
     
  3. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,698
    904
    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
     
  4. dannyf

    Well-Known Member

    Sep 13, 2015
    1,819
    363
    Don't know about vccs circuits but I have designed plenty of xgfq circuits and AC current is definitely a no go.
     
  5. sachin inamadar

    Thread Starter New Member

    May 19, 2016
    5
    0
    Ya i need both halves of the cycle.
     
  6. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
    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..
     
  7. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,698
    904
  8. sachin inamadar

    Thread Starter New Member

    May 19, 2016
    5
    0
    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?
     
  9. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    387
    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
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,751
    4,799
    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?
     
  11. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,698
    904
    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
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,751
    4,799
    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.
     
  13. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,951
    387
    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.
     
Loading...