Munts MUNTS-0018 User manual

Co te ts
Introduction.............................................................................................................3
Button......................................................................................................................4
LED..........................................................................................................................4
Analog Inputs..........................................................................................................4
Pin Mapping.........................................................................................................4
Pulse Width Modulated DC Motor Driver Outputs....................................................
Pin Mapping.........................................................................................................
Alternate PWM Device Tree Overlay Command for Cytron MD13S......................
Pin Mapping.........................................................................................................
Servo Headers.........................................................................................................6
Pin Mapping.........................................................................................................6
Serial Port................................................................................................................7
Raspberry Pi 4 Extra Serial Port...........................................................................7
I2C Bus Controller.....................................................................................................8
Pin Mapping.........................................................................................................8
Raspberry Pi 4 Extra I2C Bus Controller................................................................8
Pin Mapping.........................................................................................................8
Additional Online Documentation............................................................................9
Schematic Diagram...............................................................................................10
Revision History.....................................................................................................11
Board.................................................................................................................11
User Guide.........................................................................................................11
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 2 of 11

I troductio
The MUNTS-0018 Raspberry Pi Tutorial I/O Board is a breakout board for the
40-pin Raspberry Pi GPIO expansion bus.
It contains an on-board A/D converter, an LED, a momentary switch, two 3-pin V
servo headers, and 8 Grove System connectors:
●2 Grove GPIO connectors (providing four 3.3V GPIO pins).
●2 Grove PWM output connectors (for controlling two DC motors).
●1 Grove Serial Port connector.
●1 Grove I 2
C Bus connector.
●2 Grove ADC input connectors (providing four 12-bit 3.3V analog inputs).
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 3 of 11

Butto
The momentary switch button SW1 is connected to Raspberry Pi GPIO6. When the
button is pressed, reading GPIO6 yields a 1/High/True value. When the button is
released, reading GPIO6 yields a 0/Low/False value.
LED
Light Emitting Diode (LED) D1 is connected to Raspberry Pi GPIO26. Writing a
1/High/True value to GPIO26 turns on the LED and writing a 0/Low/False value to
GPIO26 turns o= the LED.
A alog I puts
An MCP3204 Analog to Digital Converter provides 4 analog inputs that are
connected to Grove Connectors J10 and J11. Each analog input channel has a
resolution of 12 bits (values 0 to 409 inclusive) and a full scale range of 0.0 to
3.3V. The absolute accuracy of the analog inputs will depend on the accuracy of
the Raspberry Pi 3.3V regulator, which is connected to the MCP3204 voltage
reference input.
The following device tree overlay command must be appended to
/boot/config.txt to enable Linux kernel support for the MCP3204:
dtoverlay=any pi, pi0-1,dev="microchip,mcp3204", peed=1000000
Pin Mapping
J10 Pin 1 AIN2 / y /bu /iio/device /iio:device0/in_voltage2_raw
J10 Pin 2 AIN3 / y /bu /iio/device /iio:device0/in_voltage3_raw
J11 Pin 1 AIN0 / y /bu /iio/device /iio:device0/in_voltage0_raw
J11 Pin 2 AIN1 / y /bu /iio/device /iio:device0/in_voltage1_raw
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 4 of 11

Pulse Width Modulated DC Motor Driver Outputs
Grove connectors J6 and J7 are con>gured for controlling DC motors.
The Raspberry Pi microcomputer supports two hardware PWM outputs: PWM0 and
PWM1, each of which can be mapped to several GPIO pins. The following device
tree overlay command must be appended to /boot/config.txt to con>gure the
Raspberry Pi PWM subsystem for the MUNTS-0018 Tutorial I/O Board:
dtoverlay=pwm-2chan,pin=12,func=4,pin2=19,func2=2
Pin Mapping
J6 Pin 1 PWM0 PWM Duty Cycle
J6 Pin 2 GPIO13 Direction
J7 Pin 1 PWM1 PWM Duty Cycle
J7 Pin 2 GPIO18 Direction
Other PWM pin con>gurations are possible. With no PWM device tree overlay at
all, J2, J3, J6, and J7 are just mapped to GPIO pins. It is also possible to map
both PWM outputs to one Grove Connector, for motor driver circuits that require
clockwise and counterclockwise speed signals instead of speed and direction.
See the Raspberry Pi device tree overlay documentation for more information
about the possible PWM output con>gurations.
Alternate PWM Device Tree Overlay Command for Cytron MD13S
The Grove Connector on the Cytron MD13S motor driver has the speed and
direction signals swapped: DIR is connected to pin 1 (yellow) and PWM is
connected to pin 2 (white).
The following device overlay command con>gures J6 and J7 for compatibility with
the MD13S:
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
Pin Mapping
J6 Pin 1 GPIO12 Direction
J6 Pin 2 PWM1 PWM Duty Cycle
J7 Pin 1 GPIO19 Direction
J7 Pin 2 PWM0 PWM Duty Cycle
Note: This overlay command makes the servo headers unusable for servos.
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 5 of 11

Servo Headers
Headers J2 and J3 are con>gured for controlling V RC servos . They share the
Raspberry Pi PWM0 and PWM1 outputs with Grove Connectors J1 and J7.
Both the PWM pulse frequency and duty cycle must be constrained to limited
ranges when driving a servo. Standard RC servos require a PWM pulse frequency
of 0 Hz and a PWM pulse width from 1.0 to 2.0 milliseconds.
When J2 is used for a servo, J6 cannot be used for a motor driver, and J2 cannot
be used for a servo when J6 is used for a motor driver.
Likewise, when J3 is used for a servo, J7 cannot be used for a motor driver, and
J3 cannot be used for a servo when J7 is used for a motor driver.
Pin Mapping
J2 Pin 1 PWM0 PWM Duty Cycle
J3 Pin 1 PWM1 PWM Duty Cycle
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 6 of 11

Serial Port
The Raspberry Pi GPIO expansion bus serial port is connected to Grove Connector
J8.
The processor chip on the Raspberry Pi board has two di=erent hardware serial
ports, either of which can be mapped to the GPIO expansion bus. The default
serial port device tree overlay command appended to /boot/config.txt is:
dtoverlay=di able-bt
This maps Linux serial port device /dev/ttyAMA0 to Grove Connector J8.
Raspberry Pi Extra Serial Port
Unlike any of its predecessors, the Raspberry Pi 4 has additional hardware serial
ports available on the GPIO expansion bus. One of these extra hardware serial
ports, UART3, can be mapped to Grove Connector J5 by appending the following
device tree overlay command to /boot/config.txt:
dtoverlay=uart3
This maps Linux serial port device /dev/ttyAMA1 to Grove Connector J5.
Note: All serial port connectors on this board provide 3.3V TTL line level signals.
They are not R -232, R -422, or R -423 compatible.
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 7 of 11

I2C Bus Co troller
The Raspberry Pi GPIO expansion bus I2C bus controller device /dev/i2c-1 is
connected to Grove Connector J9.
The I2C bus controller is con>gured for the standard 100 kHz clock rate. It can be
con>gured for a di=erent clock rate with a device tree overlay command:
dtparam=i2c_baudrate=400000
The MUNTS-0018 board has 10 kilohm I2C bus pullup resistors R3 and R4 already
installed.
Pin Mapping
J9 Pin 1 SCL1 I2C Clock Signal
J9 Pin 2 SDA1 I2C Data Signal
Raspberry Pi 4 Extra I 2
C Bus Co troller
Unlike any of its predecessors, the Raspberry Pi 4 has additional I2C bus
controllers available on the GPIO expansion bus. One of these extra hardware I2C
bus controllers, I2C3, can be mapped to Grove Connector J5 by appending the
following device tree overlay command to /boot/config.txt:
dtoverlay=i2c3
This maps Linux I2C bus controller device /dev/i2c-3 to Grove Connector J5.
You may need to install 10 kilohm I2C bus pullup resistors at positions R5 and R6.
If at least one I2C slave device on the bus has pullup resistors, you will not need
R5 and R6.
Pin Mapping
J5 Pin 1 SCL3 I2C Clock Signal
J5 Pin 2 SDA3 I2C Data Signal
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 8 of 11

Additio al O li e Docume tatio
Cytron MD13S 13 Amp 6V-30V DC Motor Driver:
https://www.cytron.io/p-13amp-6v-30v-dc-motor-driver
Grove System:
https://wiki.seeedstudio.com/Grove_System
MCP3204 Analog to Digital Converter:
https://www.microchip.com/wwwproducts/en/MCP3204
Raspberry Pi device tree overlays:
https://github.com/raspberrypi/>rmware/blob/master/boot/overlays/README
Raspberry Pi GPIO:
https://www.raspberrypi.org/documentation/usage/gpio
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 9 of 11

Schematic Diagram
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 10 of 11

Revisio History
Board
Revision 1 6 March 2021– First revision.
User Guide
Revision 1 23 December 2021 – First revision.
Revision 2 Fixed some minor formatting errors.
MUNTS-0018 Raspberry Pi Tutorial I/O Board User Guide Page 11 of 11
Table of contents
Popular I/O System manuals by other brands

Stahl
Stahl 9482/32 Series operating instructions

DAUDIN
DAUDIN iO-GRID M GFDO-RM01N user manual

National Instruments
National Instruments NI PXI-1042 Series quick start guide

Omron
Omron C200H-DA002 Operation manual

National Instruments
National Instruments 9225 Operating instructions and specifications

IFM
IFM SmartModule CR2520 Device manual