Arduino flow meter with encoder-based UI

preview_player
Показать описание

This is a little project I'm working on with Arduino. My goal is to create a fertilizer rate controller that will drive an electric fertilizer pump to achieve a particular volume per area, based on the current flow rate, the speed, and the width. This video is demonstrating my simple UI that consists of a two-line screen and a rotary encoder knob with push button built in. The rotation lets you select UI elements, and the click can activate things or a press and hold can activate optional things like clearing a value, or changing a mode of some kind. In case anyone watches this and wonders how I did it, the code is not available yet, but the secret is state machines. The main loop essentially dispatches events and the UI classes to handle things like rotation, clicking, etc. When a particular object is finished it returns a flag to the main loop notifying it to maybe switch to a new element, or clear a value, or something else. Each UI class consists of a simple state machine. I can provide more detailed info if needed. Source code maybe available later, but at the moment it's kind of closely coupled to other code I'm working with. I hope to get it all abstracted out and make it tight and modular.

The flow meter is being read by an Interrupt. Everything else is polled at the moment. I had to modify the SoftwareSerial class's ISRs to not clobber the one I'm using for the flow meter. Right now the flow meter is on Port D, and the SoftwareSerial link to the LCD is on Port B. I think I'll develop try to build something like ooPinChangeInt that has the license and flexibility I need and base SoftwareSerial on top of it. And also probably the encoder pins. There ought to be a better interrupt facility in the standard library that everything can plug into . Yes only 2 and 3 can trigger on edges, but all other pins can trigger on change and edge triggering should be able to be emulated.

Eventually I will have two arduinos. One that does the actual work, and the other that is a remote UI, that communicates back to the controller arduino over RS-485. Will likely use a MAX488 for full duplex serial communication (2 twisted pairs plus ground).
Рекомендации по теме
Комментарии
Автор

Is it possible to program a set point for the volume that would trigger an output to switch an SSR? I'm a home brewer and would like to do something like this to precisely measure my Mash volumes. Right now I just use a sight glass but I control my water running into my HLT with a solenoid controlled water valve. It would be really cool if this could send an output voltage to an SSR when it hits a pre-programmed volume.

AtomicGeckoBrewing
Автор

What's up with all the private emails asking for code? I'd think if the author wants to share code he will have it on Github and share link in video description. No?

discoveryellow
Автор

I 'm trying to do something like that . you mind helping me?

tiaguinrosa
Автор

can you send me all the info to make this

romantirent
join shbcf.ru