Multiple flowmeters read through mic port of an Android device

In summary, I am attempting to read two hall-effect flowmeters through the audio-in (mic) port of an Android device. I want to be able to read both flowmeters independently. The audio-in port is a standard headset port so it only has one channel for the mic.So far I have been testing with my desktop PC. I wrote a Java app that can detect pulses (interrupts?) from the audio-in (mic) port. I am able to hook up a single flowmeter by connecting the +5v from the audio-in port to the +5v of the flowmeter and the ground from the audio-in port to the pulse line of the flowmeter.
  • #1
yo1dog
4
0
I am attempting to read two hall-effect flowmeters through the audio-in (mic) port of an Android device. I want to be able to read both flowmeters independently. The audio-in port is a standard headset port so it only has one channel for the mic.

So far I have been testing with my desktop PC. I wrote a Java app that can detect pulses (interrupts?) from the audio-in (mic) port. I am able to hook up a single flowmeter by connecting the +5v from the audio-in port to the +5v of the flowmeter and the ground from the audio-in port to the pulse line of the flowmeter. I don't know if this is the proper way, but it works in that I get a signal from the flowmeter and I can see the pulses like so:

AudioInterruptDetectorSC.png

The first problem is the +5v provided from the audio-in port does not have enough amperage (I think?) to run both flowmeters. I figured I could splice into the USB cable that would be powering/charging the android device and use its +5v and ground to power the flowmeters.

The second problem is knowing which pulse came from which flowmeter. I was suggested using an R-2R to mix the pulses into one signal but with voltages (and thus amplitudes) at 25% and 50%. That way, when I read a pulse with my app I know if the pulse has an amplitude of 25% it was from flowmeter A, 50% is flowmeter B, 75% is both.

I tried to put together a circuit that used both of these but I was unable to figure it out. It looks like what I need is for the voltage output from the R-2R to control the voltage from the audio-in port's +5v to ground. But how?

Here is what I put together on my own. I am very new to all of this.
http://www.digikey.com/schemeit/#1fwi

Thanks,
- Mike
 
Engineering news on Phys.org
  • #2
Some more information:

Here are the flowmermeters I have:
http://www.adafruit.com/products/828

I used my multimeter and the current from the audio-in port is 5.15v and 2.17mA.
 
  • #3
OK, did some more research and I think I need to implement a "voltage follower". I have updated my circuit to use an op-amp so I can control the voltage to the audio-in with the pulses from the flowmeters.

http://www.digikey.com/schemeit/#1fwi

Are there any specifications I should look for when choosing an op-amp? Can anyone recommend one?

Thanks,
- Mike
 
  • #4
Well, I got all my parts in and my circuit does not work.

I discovered my flow meters change between an "on" and "off" state depending on the location of the wheel and do not send out a single pulse like I thought. When they are "on" +5v can be read from the pulse pin to the ground. When they are "off" it is 0v.

The R-2R seems to work. When neither of the flow meters are "on" I read +0.02v from the output of the R-2R (combined pulses) to ground. When only flow meter 1 is "on" I read +0.95v. When only flow meter 2 is "on" I read +1.95v. When both are "on" I read +3.24v. While this will work, I expected to get +1.25v (25%), 2.5v (50%), and 3.75 (75%) respectively. Why don't I?

The op-amp does not do what I want at all. When the op-amp's VCC is +3.24v (both flow meters are on) reading between the op-amp's OUT and the mic's ground gives me -1.2v. Why this negative voltage? I thought that the op-amp would change the voltage from IN+ (mic's +5v) to OUT (mic's ground) to match the voltage from VCC to GND. What am I missing here?
 

1. How do I use multiple flowmeters with an Android device through the mic port?

The first step is to ensure that your Android device has a mic port. Then, you will need to purchase a compatible adapter that connects the flowmeters to the mic port. Next, you will need to download a flowmeter app from the Google Play Store. Finally, connect the flowmeters to the adapter and the adapter to the mic port, and open the app to start using the flowmeters.

2. Can I use any type of flowmeter with an Android device through the mic port?

No, not all flowmeters are compatible with the mic port on an Android device. You will need to do some research or consult with the manufacturer to find a flowmeter that is specifically designed to work with an Android device through the mic port.

3. Is there a limit to the number of flowmeters that can be used with an Android device through the mic port?

This will depend on the app and adapter that you are using. Some apps and adapters may only support a certain number of flowmeters, while others may allow for more. It is important to check the specifications of the app and adapter before attempting to connect multiple flowmeters.

4. Can I use the data from the flowmeters with other apps on my Android device?

This will depend on the app that you are using. Some flowmeter apps may allow you to export the data to other apps or platforms, while others may only allow you to view the data within the app itself. It is important to check the features of the app before relying on it for data collection.

5. Are there any special considerations for using flowmeters with an Android device through the mic port?

Yes, there are a few things to keep in mind. Firstly, the mic port on an Android device is designed for audio input, not data input. Therefore, the accuracy and reliability of the data collected may not be as high as using a dedicated data input port. Additionally, using multiple flowmeters simultaneously may put a strain on the mic port, potentially affecting the overall performance of the device. It is important to use caution and monitor the performance of your device when using multiple flowmeters through the mic port.

Similar threads

  • Electrical Engineering
Replies
3
Views
801
Replies
7
Views
2K
  • DIY Projects
Replies
4
Views
3K
  • Electrical Engineering
Replies
20
Views
2K
  • Electromagnetism
Replies
2
Views
1K
Replies
3
Views
6K
Replies
8
Views
2K
  • Quantum Physics
Replies
5
Views
769
  • Electrical Engineering
Replies
3
Views
1K
  • Electrical Engineering
Replies
13
Views
6K
Back
Top