Pi-Plates DAQC2plate Manuel utilisateur

DAQC2plate Reference Guide
Version 1.04

Introduction 4
Board Layout 5
Address Selection Header 6
Digital Outputs (DOUT) 6
Connector 7
Specifications 7
Functions 7
Examples 8
Simple External LED 8
A Short String of White LEDs 9
Driving an Inductive Load 10
Analog Inputs (ADC) 11
Connector 11
Specifications 11
Functions 11
Examples 12
Using a Potentiometer to Generate a Variable Voltage 12
Measure Temperature Using an LM35 Sensor 13
Digital Inputs (DIN) 13
Connector 13
Specifications 13
Functions 14
Example: Monitor an External Button 14
Extended Functions 15
Connector 15
Analog Outputs (DAC) 15
Specifications 15
Functions 16
Auxiliary Power Supply 16
PWM 16
Specifications 16
Functions 16
Example - Speed Control of a DC Motor 17
Frequency Counter 18
Specifications 18
Functions 18
RGB LED 18
Functions 18
Interrupts 19

Functions 19
General 19
Digital Input 20
Special Modes 20
Installing the Applications 20
Motor Controller 22
Connections 22
Commands 24
Function Generator 25
Specifications 25
Connections 25
Commands 26
Oscilloscope 26
Specifications 27
Connections 27
Commands 27

Introduction
This document describes all of the features and functions of the Pi-Plates DAQC2plate. New to this design is a
feature that allows the DAQC2plate to operate in four different functional modes. These are:
● Legacy Mode - the DAQC2plate will operate and use the same instruction set as the original
DAQCplate
● Function Generator - in this mode, the DAQC2plate outputs two adjustable analog signals on DAC
outputs 1 and 2
● Stepper Motor Controller - in this mode the DAQC2plate can independently drive two, unipolar stepper
motors using the DOUT connectors
● Oscilloscope - in this mode the the DAQC2plate can be used as a two channel oscilloscope with a
sample rate of 1 million samples / second. Analog inputs 0 and 4 are used in this mode.
Although the examples below have been written for Python 2.7, there are also modules available for Python 3.
Finally, all of the code examples below assume that the DAQC2plate module was imported with the following
statement:
import piplates.DAQC2plate as DAQC2

Board Layout
The terminal blocks and their functions are shown below. For convenience, the name of each terminal is
printed on the bottom of the board. If you are familiar with the original DAQCplate, note that Digital Inputs
Header and the Analog Inputs Header have been swapped. This was done to provide better signal to noise
performance on the analog inputs.

Address Selection Header
Up to eight DAQC2plates can be used in a single stack of Pi-Plates. To do this, each board has to be set to a
unique address. When shipped, the DAQC2plate is set to address zero. The address is set by positioning
jumpers on the small, six pin header in the lower area of board as shown in the image above. Use the diagram
below to set the address:
Note that Pi-Plates only read their address when they are powered up. So, you will have to cycle power to your
stack after you change the board address.
Digital Outputs (DOUT)
The digital output connector provides eight open drain outputs, a 5VDC output for driving loads, and a flyback
protection terminal for inductive loads. Use these outputs to drive LED strings, DC motors, relays, solenoids,
buzzers, unipolar stepper motors, resistive heating elements, ultrasonic rangefinders, and incandescent
automotive light bulbs. Each digital output also has a green LED connected to it. Whenever a digital output is
turned on the corresponding green LED will come on. You do not need to connect anything to the digital
outputs to control these LEDs. Conversely, these LEDs will not affect anything that you attach to the digital
outputs. To obtain a simple digital signal with a DOUT pin, attach a 4.7K resistor between 5VDC and the output
pin.

Connector
Refer to the diagram at the top of this page as well as the one below to locate the Digital Output terminals:
Specifications
● Each of the 8 Digital Outputs is an open drain transistor
● Maximum sink current is 3A
● Maximum load voltage is 30VDC
● On voltage is typically less than 50mV with a load current of 1A
● When using a relay or solenoid, the high side power supply should be connected to the "Flyback
Protection" terminal
● If necessary, the on-board 5VDC is available on pin 10. If you choose to use it, then make sure your
power supply can provide enough current for your Raspberry Pi (~700mA), your Pi-Plates (~100mA for
each DAQC2plate with all LEDs on) and any components you connect to a DOUT terminal.
● To generate a simple digital signal output, connect a 4.7K resistor between 5VDC and the DOUT pin
you wish to use. Note that the output will be inverted i.e. setting the pin will make the output zero volts
while clearing it will make it 5VDC.
Functions
addr must be in the range of 0 through 7
bit must be in the range of 0 through 7
● setDOUTbit(addr, bit) - set single bit. Note that this turn ON the transistor and any device attached to it.
● clrDOUTbit(addr, bit) - clear single bit. Note that this turn OFF the transistor and any device attached to
it.
● toggleDOUTbit(addr, bit) - toggle a single bit
● setDOUTall(addr,byte) - control all eight bits at once. The byte value must be in the range of 0 through
255.

Examples
Simple External LED
Use a simple breadboard to build up this LED circuit. Connect the anode of the LED (the long wire) to one end
of a 220 ohm resistor. Route a red wire from the other side of the resistor to the 5VDC terminal on the
DAQC2plate digital output terminal block. Route a black wire from the cathode of the LED to Output 0 of the

terminal block. Assuming the DAQC2plate board is at address 0, type DAQC2.setDOUTbit(0,0) to turn the LED
on. Type DAQC2.clrDOUTbit(0,0) to turn off the LED.
A Short String of White LEDs
Control some under-counter lighting with this circuit. Connect three, high-bright white LEDs in series as shown
and then attach a 12VDC power supply with a center-positive connector. Then put a 100 ohm resistor between
the LEDs and the power supply. Attach the cathode of the rightmost LED to DOUT0 of the terminal block (pin

1) and the ground of the power supply to pin 9 or 10 on the DIN terminal block. Again, assuming the
DAQC2plate board is at address 0, type DAQC2.setDOUTbit(0,0) to turn the LED string on. Type
DAQC2.clrDOUTbit(0,0) to turn off the LED string.
Driving an Inductive Load
1. Use a simple breadboard to build up this 5V solenoid circuit.
2. Connect the red wire from the solenoid to a pair of red wires that route from the breadboard.
Table des matières
Manuels Carte mère populaires d'autres marques

Telit Wireless Solutions
Telit Wireless Solutions SL869-3DR Manuel utilisateur

Gigabyte
Gigabyte GA-9IVDT Manuel utilisateur

Texas Instruments
Texas Instruments ADS8372EVM Manuel utilisateur

Commell
Commell MS-C73 Manuel utilisateur

IBT Technologies
IBT Technologies MB860 Manuel utilisateur

Nvidia
Nvidia TEGRA DG-04927-001_V01 Manuel utilisateur











