Flow meters not registering on Particle Photon

I have the server running on a fitpc2 and the client working on a Samsung Galaxy Tab A. I am able to detect the particle photon board in the app when I setup the kegerator, and it correctly show the 4 flow sensor ports flow0-3 when I set up the taps.

When I try a pour I’m not getting anything, either when I have automatically start pours turned on, or when I have it off and select a manual pour.

I suspect I’m having a particle issue now but everything I see on their forums seems to be more code related. When I look in the web IDE at the funtctions resetMeter and meterTicks they are both reading 0. To setup the Particle I used the Desktop IDE, opened the folder I got from the kegbot github, clicked on the main.ino and then clicked compile to cloud and upload code using cloud. I thought this had worked as I was now presented with the resetMeter and meterTicks when I opened the web console. I have no idea on how I to see what’s actually occurring on the board.

I’ve tried 2 flow meters [https://www.adafruit.com/product/828], I’m using a 2.2k resistor as a pull up between Vin and signal. I suspected the Vin wasn’t putting out enough voltage for the flow meter so have tried powering it off a separate supply that’s providing 9VDC whilst the particle is still powered via its USB.

I’ve also tried both the board supplied V and the dedicated supply without a a pull-up resistor and with an 820ohm resistor.

To clarify I’m not actually passing liquid through the flow meter as I want to confirm it works before I plumb it into my keezer, I’ve just been blowing into it to trigger it, enough that I can hear the wheel inside turning at a good pace. Again I’ve tried blowing more and less to see if this is affecting it.

Any help would be appreciated, I feel I’m so close to having this working now.

I am a little confused about your configuration so my suggestion my be off base.

You may want to look what constitutes as a logical high versus logical low for the device. I am not sure about the spec for the pull-up, but 820 ohms seems to be too low by a factor of ten. Try a 10K or program the pin to pull up internally. Does that work?

Mark,

Thanks for the suggestion, I’d come up with the 2.2k value for the resistor and then also asked someone else on this forum what they’d used and that’s what they had. Obviously this will vary depending on the flow meter.

As for the 820ohm resistor, I happened to have that so figured I’d try a lower value to see if it worked. I have gone out this morning and got more resistors and so far tried: no resistor, 440ohm, 820ohm, 2k, 2.2k, 10k, 22k. I’ve also tried each of those with the flower meter being powered by the photon or by an independent supply of 6V, 7.5V, 9V or 12V.

This is how it’s been wired up when using a separate power supply for the flow meter:

I’ve also tried changing breadboards and the leads I’ve been testing with as well as using D0, and D1 inputs on the photon. Additionally I’ve also used both the original kegboard particle software from https://github.com/Kegbot/kegboard-particle and mikeys branch with the thermo support. So far all I’ve had are spurious ticks twice which I’ve been unable to replicate.

I really hope I don’t have a dud board as I bought it brand new for this, and had to wait a couple of weeks for it to arrive. Hate to think I’ve wasted $40 and countless hours because of a faulty board.

I’ve had a reply from someone on the Particle forum who pointed out that in all likelihood I’ve fried my D0 by inputting 9V. I was to convinced my issue was the supply voltage to the flow meter I completely didn’t think about the result of using a higher voltage. Anyway, I’m now using a 5V supply for the flow meter and wired as above but into D3. Still no results.

Try using 3.3V with a 1.5k pullup. Particle is a 3.3v logic board. It will tolerate 5V on digital modes but maybe that will help.

So I was given an easy way to test this from someone on the Particle forum, removing the flow meter I simply shorted the I/P pin to GND to see if it would trigger the ticks. Figured out I had killed two I/P’s using to high a supply voltage for the flow meter.
Remembered I’d previously had issues on an IOIO board with pwm being really sensitive to interference. Decided to remove the USB power from the Photon and have both it and the flow meter running off the same external 5V supply so that they had a common GND and had some success!! When I checked the app it had a heap of messages saying there had been a flow detected but it wasn’t assigned to a tap. I assigned it to a tap and didn’t get anything but since it’s registering on the Particle web console I’m happy to continue with the build and plumb these in and figure out way the information wasn’t passed later.

I’ll need to wait on another Photon board as I have 4 taps and want to use the thermo as well so need all my inputs.

In summary my issue was the Photon being powered by USB wasn’t supplying sufficient power to the Flow meters, I then killed some I/P ports with to high an external supply to the flow meters, and then when they were both using 5V but from different sources it wasn’t happy not having a common GND I think. Thanks for the suggestions everyone.