
Eight MOSFETS 8-Layer Stackable HAT for Raspberry Pi
FEATURES The latest version of the card (V5.0), now in stock, has several major improvements: On board processor permits proportional load control using PWM at 1kHz RS485 port connected to the local processor permits operation as MODBUS RTU slave, replacing the Raspberry Pi with any PLC Heavy duty, 5mm pluggable connectors can control loads up to 12A High current channels are galvanically separated from the High Voltage channels TVS diode protection on high current outputs, diode protection on high voltage All jumpers replaced with DIP Switches Software compatible with previous version Eight Level Stackable Works with any Raspberry Pi from ZERO to 5 Four High Current Loads, 12A/24VDC Four High Voltage Loads, 4A/240VDC PWM at 1kHz on all outputs 5V power supply provides power to Raspberry Pi General purpose/reset pushbutton TVS protection on high current Outputs DIP-Switch selection - no jumpers Pluggable Connectors 24-12 AWG wires Status LEDs on all Outputs RS485/MODBUS Port Uses only I2C port (address 0x20..0x27 or 0x38..0x3f ), all GPIO pins available ECCN Code EAR99 MOSFETS Raspberry Pi All mounting hardware included: stand-offs, screws and nuts Open source hardware and schematics Command Line Python Drivers Node Red Nodes CODESYS Driver OpenPLC module Home Assistant Integration Arduino Library DESCRIPTION The Eight MOSFETS card is a stackable expansion card for Raspberry Pi. It has four high current channels which can drive 12A/24V loads and four high voltage channels which can drive loads of 4A/240V. Stackable to 8 layers, the card can provide up to 64 solid state outputs to each Raspberry Pi. Pluggable connectors make the card easy to use when multiple cards are stacked up. Status LEDs show when MOSFETs are on or off. COMPATIBILITYThe Eight MOSFETS card is compatible with all Raspberry Pi versions from Zero to 5. All stacked cards share the I2C bus using only two of the Raspberry Pi’s GPIO pins to manage all eight cards. This feature leaves the remaining 24 GPIOs available for the user. POWER REQUIREMENTSThe card needs 5V to operate and can be powered from Raspberry Pi or from it's own pluggable connector. The card draws about 50mA. If power is applied to the card, no other power supply is needed for the Raspberry Pi. DIP SWITCH CONFIGURATION A six position DIP switch is used to select the source of the RS485 port and the position of the card in the stack, if multiple cards are used. STACKING MULTIPLE CARDS Up to eight cards can be stacked on your Raspberry Pi. Three positions of the configuration DIP Switch labeled ID0, ID1, ID2 are used to select the stack level. Cards can be stacked in any order. RS485/MODBUS PORT The card has an RS485 port which can be driven from the Raspberry Pi, or from the local processor. Leave the TX and RX switches in the OFF position to connect the port to the local processor. Set both to ON to connect to USART1 of the Raspberry Pi. When DIP Switches are ON, Raspberry Pi can communicate with any device with an RS485 interface. In this configuration the card is a passive bridge which implements only the hardware levels required by the RS485 protocol. To use this configuration, you need to tell the local processor to release control of the RS485 bus: ~$ 8mosind [0] rs485wr 0 0 0 0 0 When DIP Switches are OFF, the card operates as MODBUS slave and implements the MODBUS RTU protocol. Any MODBUS master can access all the card's inputs, and set all the outputs using standard MODBUS commands. A detailed list of commands implemented and parameters addresses can be found on GitHub: In both configurations the local processor needs to be programmed to release (jumpers installed) or control (jumpers removed) the RS485 signals. See the command line online help for further information. RS485 TERMINATOR The last position on the DIP switch is the RS485 line terminator. Set it to ON if the card is last on the RS485 chain. RESET PUSHBUTTON Shutting down the Raspberry Pi by turning off the power can result in SD Card failure. To prevent this, a shutdown command needs to be used before power cut-off. But this requires a monitor, keyboard and mouse connected to the Pi. A momentary on push button installed at the edge of the card provides a convenient way to shut down the Raspberry Pi. The button is routed to pin 37 (GPIO 26). You need to write a script which monitors this pin, and if pressed for more than a desired time, issues the shut-down command. CARD LAYOUT ELECTRICAL SPECIFICATIONS Power supply: Pluggable connector Power consumption: 10mA On board resettable fuse: 3A MOSFETS 1-4: 240V, 220 mOhm MOSFETS 5-8: 24V, 6.2 mOhm Connector ratings: 250V/8A MOSFETS gate voltage: 12V MECHANICAL SPECIFICATIONS APPLICATION: USING THE 8-MOSFET HAT TO DRIVE DC MOTORS DC Motors from 5V up to 240V, and up to 8A can be driven by using this HAT in combination with the 4-RELAYS 4-INPUTS HAT ( for motors up to 240V DC) or the 8-RELAY HAT for motors up to 120V DC. DOWNLOADS EIGHT MOSFETS DOWNLOADS SOFTWARE SOFTWARE INTERFACES You can write your own application using the Command Line or Python Libraries provided. No programming is required if you use the Node-Red nodes provided. You can drag-and-drop the functional blocks to design your application. Examples are provided at GitHub. SELF TEST The card can be tested before installation by running a simple command from the command line. The card will cycle each MOSFET on and off at 0.5 seconds interval. The lighting of the LEDs will assure that all MOSFETS are functioning. Optional loads on each channel can extend the user's confidence in the hardware. ACCESSORIES DIN-RAIL MOUNTING The card can be installed parallel on a DIN-Rail using the DIN-Rail Kit Type 1, or perpendicular using the DIN-Rail Kit Type 2. SMART FAN The Smart Fan provides a stackable cooling solution for Raspberry Pi. Its on-board processor powers the fan just enough to maintain the preset temperature of the Pi. If the 8-MOSFETS card is used to drive multiple high current loads, a secondary Smart Fan can be installed on top of the card to provide adequate cooling. YOUR KIT When you purchase the card you will receive the following items: 1. Eight MOSFETS HAT for Raspberry Pi 2. MOUNTING HARDWARE Four M2.5x18mm male-female brass standoffs Four M2.5x5mm brass screws Four M2.5 brass nuts 4. All connector plugs required QUICK START Plug your card on top of your Raspberry Pi and power up the system using only one 5V/3A power supply. Enable I2C communication on Raspberry Pi using raspi-config. Install the 8-MOSFETS software from github.com: ~$ git clone https://github.com/SequentMicrosystems/8mosind-rpi.git ~$ cd /home/pi/8mosind-rpi ~/8mosind-rpi$ sudo make install ~/8mosind-rpi$ 8mosind -h The program will respond with a list of available commands. Connect your load between pin 2 of any of the load connectors and the positive side of your external power supply. Connect the negative side of your external power supply to pin 1 of the output connectors. Turn on and off the load using the corresponding command.