I have been using the microphone port of an android phone to read AC voltages (as it is capacatively coupled).

What if I want to read DC voltages?

I have considered...

  1. turning DC into AC via an oscillator

  2. using a PIC microcontroller to read an analogue voltage and send a high/low bitstream to the microphone input containing this information

I think (2) is the best way to go. What is the easiest/quickest/cheapest way to get a PIC to read an analogue voltage and output a bitstream in this way?

  • \$\begingroup\$ Have you researched programming microcontrollers at all, or are you expecting us to tell you how it's done? \$\endgroup\$ – Phil Frost Feb 5 '14 at 12:27
  • \$\begingroup\$ I'm just asking for comments on the approach, including whether PIC programming is the right one. If it is, then a suggestion of the best PIC or PIC programming resource would be helpful. \$\endgroup\$ – user2633388 Feb 5 '14 at 16:19

Another alternative is this: -

Feed the unknown DC voltage into an integrator. The integrator output voltage will ramp up at a rate determined by: -

  • A fixed value resistor
  • A fixed value capacitor
  • The DC input voltage

Use a comparator on the output of the integrator - when the integrator output voltage reaches a certain level, the integrator is zeroed by shorting the capacitor with a FET or BJT. Then the whole cycle repeats.

What you get is a voltage to frequency converter. Feeding this into your android and calculating the frequency should be do-able.

Here's a circuit I got off the internet that looks like it should work - it uses a 555 instead of a comparator but essentially it's doing the same thing: -

enter image description here

You should be able to replace the 741 with a RRIO op-amp and get it working from a single supply voltage.

|improve this answer|||||
  • \$\begingroup\$ I haven't worked with Android, but I imagine a quick two-point calibration using a known DC reference would be plan and simple. Nice solution. \$\endgroup\$ – scld Feb 5 '14 at 13:03
  • \$\begingroup\$ Thanks, really interesting idea. The phone sees changes in voltage really nicely so if I can just read these blips I can find input voltage. \$\endgroup\$ – user2633388 Feb 5 '14 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.