Reading milliVolts in Android for pH tester

I am looking to install a pH tester for my Android phone. I found a pH electrode that will send a millivolt signal, which I can then use to convert to a pH reading (59.2 mV per pH unit at 25 Β° C). The question that arises for me is whether it is possible to connect the electrode to the headphone jack and directly read the millivolt reading, or do I need to first convert the analog signal to digital, and then connect it via USB? I am not a big electronics guy, but I am doing this project on the side and hope to learn from it.

I thought it might be possible to get mV readings from the headphone jack using the GetMaxAmplitude function, for example from this topic: Value range for GetMaxAmplitude . Although, based on what I understand, the smallest reading, possibly with this function, is 0, and there are negative mV values ​​that can be read when testing for pH.

Any help is much appreciated, thanks!

+4
source share
3 answers

This should be asked on the electrical site . But the best way is to use a Bluetooth serial port converter ($ 5 with ebay) and a PIC microcontroller with USART and an analog-to-digital converter ($ 1), you can easily program the PIC in C using "MPLAB", IDE and the HI-TECH compiler . The tools you need are a PIC programmer ($ 20) and something with a serial port if you want to configure a Bluetooth serial converter, such as a desktop PC or a USB serial converter. You may need an op-amp circuit to amplify the signal so that it is read by the PIC. Then you used the code from the Google BluetoothChat example to connect your phone to your bluetooth system and receive data from it.

Using a microphone for input would be difficult, for one reason, because it would be filtered to accept only alternating current. One way around this is to modulate the oscillator output so that its amplitude is proportional to the measured DC signal, then you could measure the value by analyzing the data from the microphone.

Interacting with USB is harder than it sounds, it would be harder to create something that interacts with it and measure millivolts than using bluetooth, because the PIC processor that you use for analog digital sampling and a USB client is actually They must either act as a USB host or USB-OTG on the phone, which is much more complicated than USB peripherals.

+1
source

I think that you will have the most consistent operation on a number of Android devices if you build a circuit that uses the voltage from the sensor to control the frequency of the sound generator and measures the frequency using the software on the phone.

It is possible that working with a direct connection and reading the amplitude will work, but two problems are that the signal path may not be very good up to direct current - there may be a minimum frequency that can pass, which makes it unsuitable for measuring constants stresses. And secondly, the gain of the input channel may be incompatible from device to device, or even over time, temperature, etc. Workarounds are possible, such as circuits that alternately send voltage vertically and invert, effectively modulating it to overcome the minimum frequency limit or even alternate the actual readout with the reference voltage to help simulate the input gain.

But I would probably recommend either a frequency modulated approach, or use the built-in bluetooth module for $ 20 and go wireless. In any case, the sensor system will require a small battery.

+1
source

You can extract some power from the headphone jack by pointing to the Android player to make a sound (and, I suppose, we rectify the output and store it in the capacitor). I saw a bunch of battery powered things. I wonder if two ideas can go together? What if you modulated some audio outputs through the headphone jacks, through the sensor, and then back into the microphone? Should a pH reading get messed up with the received sound in some measurable way I would expect?

0
source

All Articles