0

On my circuit I have a voltage detected (TC54) to detect when the level of the battery gets low. The output of this ic is high when there is enough battery, but it will be at battery voltage (12 or 15 volts). I am using a LM7805 to supply power for the microcontroller. Will feeding this high voltage level into the microcontroller cause damage? ( I would say yes to that). How can I read the signal out from the TC54? Would putting a large resistor in series with it solve the problem (1-5Meg)? Here is the schematic for the design. The RB0 goes to the microcontroller. J2 is the input terminal on the board. Circuit Schematic

Liam Mills
  • 11
  • 5
  • Why use the TC54 if you have a PIC? Just use the PIC's ADC with a voltage divider. – Leon Heller Mar 15 '17 at 08:23
  • Just use a voltage divider? – C K Mar 15 '17 at 09:09
  • 1
    Suggest that you use the TC54VN variant that provides an open-collector output. The output will be high-impedance unless driven low by the TC54. You can then connect it to a 4.7K resistor to the PIC's Vcc. This will directly drive RB0. – DoxyLover Mar 15 '17 at 09:48

2 Answers2

2

Use Voltage Divider Circuit to read the battery level

  1. Firstly convert 12V to 5V (or 3.3V depending on the micro controller)
  2. Use ADC to read the input voltage level.

If your PIC ADC support 3.3V then circuit will look like this one enter image description here

If support 5V then use this enter image description here

Note: If you want high accuracy choose right resistors for circuit, resistance value should be small as possible but same time it should not draw enough current that will effect battery. For more detail see this Link

1

How to read a high voltage logic signal with pic microcontroller

Will feeding this high voltage level into the microcontroller cause damage?

those are two totally different questions. to read a HV analog signal, you can divided it down with a resistive divider (generally). to read a HV logic signal, the same can be employed or a high value resistor is all needed, depending on your application.

dannyf
  • 4,342
  • 1
  • 8
  • 9