Close
0%
0%

16 Channel 24vac detection over i2c

This PCB monitors irrigation controller 24vac outputs. It uses LTV-844 optocouplers and an MCP23017 port expander to output status over i2c

Similar projects worth following
This is a test fixture for Orbit Irrigation designed to monitor irrigation timer/controllers and log their behavior, in order to test their programming/timing logic.

This takes input from ~24vac irrigation controllers with up to 16 channels and outputs the state (on/off) over i2c via the port expander. Up to 8 unique addresses can be used, and the boards are designed to be daisy chained to each other for a total of 128 channels.

In addition, each board has an 5 optocoupler outputs that can be read directly from the board. The AC voltage input will result in a 120hz output on the optocoupler's output side, so some software averaging/cleverness should be used to determine on/off.

This is to be used in conjunction with a Raspberry Pi to log and host the data on a webserver. The webserver serves as both a UI, monitoring status indicator, and data log host.


**Python code and HTML/PHP code to be uploaded

PCB Schematic and PCB layout in KiCad. BOM is attached.

PCB box 3D print on my Thingiverse:

https://www.thingiverse.com/thing:2463367

PCBExpanded.zip

KiCad files

x-zip-compressed - 801.93 kB - 08/01/2017 at 20:54

Download

BOM.xlsx

BOM from Mouser

sheet - 12.65 kB - 08/01/2017 at 20:54

Download

  • 1
    EQUIPMENT

    1.1         Raspberry Pi 3

    A standard Raspberry Pi 3 is used as the data processor, data logger, webserver to host the data, and interface. Setting up and running the Pi will require:

    • A suitable power supply (official kit power supply recommended)
    • A fast microSD card with capacity (minimum 8GB class 12 or as recommended in official kit)
    • HDMI capable monitor
    • USB/Bluetooth keyboard and mouse

    1.2         Timer logging PCB

    A PCB should be fabricated (recommend OSHPark) and the components soldered on.

    • The BOM attached is for a batch of 9 (orders come in 3 packs, but only 8 can be used at once.
    • It’s recommended that extra resistors be purchased because they are easy to lose
    • SMD soldering is required at SOIC-28 size
    • The fixture is setup to run one timer per PCB but can be reconfigured as need to utilize all channels.

    1.3         Timer Logging PCB case

    It’s recommended but not necessary to use a case for the PCB. Below are some recommended print parameters:

    • Esun PLA+, PLA-PH, high-temperature PLA, or augmented PLA is recommended, as long as there is some flexibility
    • The hinges and their snap-fit is designed for Esun PLA+, but the fit can be changed with the variable claspCut = claspDiam/4.5;
    • claspCut can be set between = claspDiam/2.5 to claspDiam/6 as needed
    • A layer height between .15mm and .2mm is recommended
    • Minimal supports only for the clasp and hinge
    • .15mm layer height
    • .6mm bottom/top layer height
    • 15% infill rectilinear
    • 2 horizontal layers (.8mm wall thickness)
    • 17% support from bed only
    • 200°C extruder temperature
    • 50°C bed temperature
    • Esun PLA+

    Originals were printed on a Lulzbot Taz6 with a .4mm nozzle and sliced with Cura:

    1.4         Misc. Wires or CAT6 cabling, screwdriver, wire stripper/knife.

  • 2
    2 SOFTWARE

    2.1         Raspbian with latest updates

    • Install onto SD card using Win32DiskImager or as preferred
    • Connect to Orbit Externet and run sudo apt-get update
    • Change the timezone using sudo raspi-config and navigating to the appropriate selections
    • Enable i2C using sudo raspi-config and navigating to the appropriate selections
    • Make sure the i2C package is installed with sudo apt-get install -y i2c-tools
    • Check that the i2C bus is working by wiring a test PCB (see setup) and running sudo i2cdetect -y 1

    2.2         Apache2 with PHP

    • Install with sudo apt-get install apache2 –y
    • Install PHP with sudo apt-get install php5 libapache2-mod-php5 –y
    • Check if it works by navigating to the Pi’s IP address, which can be found with sudo ifconfig

    2.3         Webserver Scripts

    • Allow all permissions to webserver directory using sudo chmod –R 777 /var/www
    • Replace default webserver files in /var/www/html with the attached files
    • Allow all permissions AGAIN to webserver directory using sudo chmod –R 777 /var/www
    • ALLOW SUDOLESS COMMANDS

    After setting up webserver as described in the Software section, boot up the Raspberry Pi, connect to Externet, and confirm that the IP address brings you to the Orbit QE test homepage.

View all instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

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