for calibration of flow measurement

Similar projects worth following
An ATmega324pb is for applications and provides ICP1 (flow pulse), ICP3 (start), ICP4 (stop) to calibrate pulse output flow meters with crystal timing precision. The board has pads for a 40 pin header that a Raspberry Pi Zero can plugin and interface to serial and SPI. The interfaces use IOFF buffers as needed so the R-Pi can power down (or not be present) without disrupting application functions. An ATmega328pb is used to manage a multi-drop serial interface (RPUbus) between a local or remote R-Pi and application controller, as well as the onboard power features.

Flow measurement calibration. A paddle wheel in a ditch can measure flow as it rotates and trips a switch, but the volume that passed through and caused the pulse may need to be calibrated, and the m324pb microcontroller on this board is set up to use its input capture hardware to help do that.

I have some experience in this area, but it is incomplete; my goal is to improve and make something that could be useful for others.

  • ^1 Still going​

    ronald.sutherland07/16/2020 at 23:39 0 comments

    Since the manager (328pb) on this board has ADC to power (V and I) and auxiliary (V and I) inputs, as well as control over the power to the host (R-Pi zero), and the auxiliary input itself I spent a long time sorting out some state machines (I think of them as daemons) that run on the manager alongside the multi-drop bus stuff that I did for the previous shields. At times it felt like I had bitten off too much, but pieces slowly started to fit. I know it is not done, but I need to spin on some other things while I test it. The auxiliary input is for solar power mainly for charging a battery on the main power input, but it may work with other current limited sources.

    The three little daemons include a day-night state machine, a battery manager (bm) state machine, and a host shutdown state machine. The bm keeps the auxiliary disabled unless day-night is in the day state, and can trip the software shutdown state as well. A lot of these ideas were tried on my other boards, but it eats up a lot of programming space and can interfere with the application, so it makes sense to move these tasks to the manager, which was underused.

    I plan to layout ^2 to correct the known bugs, I do not plan to build it. I will then start work on ^3 which will replace the 328pb with an AVR128da32 and the 324pb with a AVR128da48, but I will not finish this new layout. I will fork it to replace my 328p board with a AVR128da28 in PDIP, I will skip all the current sources and level shifting to keep things as simple as possible. These new DA's have very robust electrical specs, and the PDIP is easy to replace.

  • ^1 fix hardware issues and some signal remapping

    ronald.sutherland12/02/2019 at 20:32 0 comments

    After hacking a ^0 to try out an idea for the alternate power input and some hacks to fix other bugs, I did a re-spin of the board. The new revision would also make the manager responsible for enable/disable of power to the SBC, and alternat power. The analog measurements of both alternat and primary power voltage and current are also now in the manager's domain. With luck, the application will not need to concern itself with things like battery charging. The SelfTest got a few changes, but not much, unfortunately, I found another hardware bug that I thought was software, so another spin ^2 is needed.

    I will likely hold off on ^2 for some time while I sort out the manager firmware and then spin some other boards (RPUlux, Irrigate7, RPUno) based on this new design.

  • ^0 init

    ronald.sutherland12/02/2019 at 20:02 0 comments

    I was trying to get an outfit I know interested in this board, but that did not happen. I combined my RPUpi shield and an ATmega324pb for the application program. The combination worked, but I had a few hardware bugs to sort out, so another revision was needed. For this board, I started software development with the SelfTest first to help find the problems. I suspect it speeds up hardware development. I only worked on the library (core) parts that were part of testing.

View all 3 project logs

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates