Pixtend v1 3 Datasheet EN
Pixtend v1 3 Datasheet EN
Pixtend v1 3 Datasheet EN
3
Data sheet: Technical Data and connection hints
Liability exclusion
The content of this publication was tested in accordance with the described hard- and
software. Nevertheless deviations can't be excluded, so that we can't take warranty for full
accordance. The statements in this publication are getting checked regularly, necessary
corrections will be included in the following edition. Improvement suggestions are always
welcome. Technical changes reserved.
Trademark
„Raspberry Pi“ and the related logo are registered trademarks of the Raspberry Pi
Foundation - www.raspberrypi.org
„CODESYS“ and the related logo are registered trademarks of the company 3S-Smart
Software GmbH - www.codesys.com
„PiXtend“ and the related logo are registered trademarks of the company Qube Solutions
UG – www.qube-solutions.de
„Profibus“ and the related logo are registered trademarks of the PROFIBUS
Nutzerorganisation e.V – www.profibus.com
„AVR“, "ATmega" and the related logo are registered trademarks of the Atmel Cooperation
– www.atmel.com
„Debian“ und „Raspbian“ are registered trademarks of the company Debian Project –
www.debian.org
The rights of all companies and company names mentioned here as well as of products
and product names fit to the respective companies.
This product was developed and produced in accordance with the European directives on
the subject and therefore carries the CE sign. The authorized use of the product is
described in this data sheet and the belonging assembly- and operating manuals.
Warning:
Changes or modifications of the product, as well as the non-compliance of the statements
from the mentioned data sheets and operating manuals leads to loss of the approval for
the European economic area.
The symbol with the crossed out waste bin means, that the product should be recycled
separated to the domestic waste as electronic waste. Where you find the next free
acceptance place, will tell you your local administration.
Another possibility is that you send your device back to us and we take care about the
correct disposal for you.
Table of contents
1. Safety instructions..............................................................................................................6
2. Information to the overall system.......................................................................................7
2.1 Power supply...............................................................................................................8
2.2 The connection to the Raspberry Pi..........................................................................13
2.2.1 Raspberry Pi pin header.....................................................................................13
2.2.2 I²C at 5V-level.....................................................................................................16
2.3 Mechanics..................................................................................................................18
3. PiXtend- Microcontroller...................................................................................................20
4. Digital in- and outputs......................................................................................................25
4.1 Digital inputs..............................................................................................................25
4.2 Digital outputs............................................................................................................30
4.3 Relay outputs.............................................................................................................33
4.4 GPIOs as digital in- and outputs................................................................................38
5. Analogue in- and outputs.................................................................................................43
5.1 Analogue inputs.........................................................................................................44
5.1.1 Voltage inputs.....................................................................................................45
5.1.2 Current inputs.....................................................................................................50
5.2 Analogue outputs.......................................................................................................53
6. Special in- and outputs....................................................................................................56
6.1 PWM/Servo-outputs...................................................................................................56
6.2 DHT11/22, AM2302 Sensors.....................................................................................60
6.3 Connector socket for the 433 MHz-Transmitter........................................................61
7. Serial interfaces...............................................................................................................63
7.1 RS232........................................................................................................................64
7.2 RS485........................................................................................................................67
7.3 CAN...........................................................................................................................71
8. Real-Time-Clock...............................................................................................................74
Table of figures
Figure 1: Connector block – power supply........................................................................................................ 8
Figure 2: Principle-circuit diagram: Connection of the main supply................................................................10
Figure 3: Main connection between PiXtend and Raspberry Pi......................................................................13
Figure 4: Principle-circuit diagram: Connection between Raspberry Pi and PiXtend......................................14
Figure 5: Pin header - I²C at 5 V-level............................................................................................................. 16
Figure 6: Pin header - I²C at 5V-level.............................................................................................................. 17
Figure 7: PiXtend microcontroller.................................................................................................................... 20
Figure 8: Jumper: SPI_EN.............................................................................................................................. 21
Figure 9: Plug connector - in-system-programming (ISP)...............................................................................21
Figure 10: Principle-circuit diagram: Reset-Circuit..........................................................................................22
Figure 11: Principle-circuit diagram: SPI- Enable............................................................................................23
Figure 12: Principle-circuit diagram: Connection of a programming adapter..................................................24
Figure 13: Connector block - digital inputs...................................................................................................... 25
Figure 14: Principle-circuit diagram: Connection of the analog voltage inputs................................................28
Figure 15: Principle-circuit diagram: Connection of the sensor-supply...........................................................28
Figure 16: Principle-circuit diagram: GND- connection...................................................................................29
Figure 17: Connection block - digital outputs.................................................................................................. 30
Figure 18: Principle-circuit diagram: Connection of the digital outputs...........................................................32
Figure 19: Connector block - relay.................................................................................................................. 33
Figure 20: Principle-circuit diagram: Connection of the relays (DC)...............................................................36
Figure 21: Principle-circuit diagram: Connection of the relays (AC)................................................................37
Figure 22: Connection block - GPIOs............................................................................................................. 38
Figure 23: Principle-circuit diagram: Connection of the PiXtend- GPIOs (as inputs)......................................40
Figure 24: Principle-circuit diagram: Connection of the GPIOs (as outputs)...................................................42
Figure 25: Connector blocks - analog in- and outputs....................................................................................43
Figure 26: Connector block- analog inputs..................................................................................................... 44
Figure 27: Principle-circuit diagram: Connection of the analog voltage inputs................................................48
Figure 28: Principle-circuit diagram: Connection of the sensor supply...........................................................48
Figure 29: Principle-circuit diagram: GND- connection...................................................................................49
Figure 30: Principle-circuit diagram: Connection of the analogue current inputs............................................52
Figure 31: connection block - analog outputs................................................................................................. 53
Figure 32: Principle-circuit diagram: Connection of the analogue voltage outputs..........................................55
Figure 33: PWM/Servo-outputs....................................................................................................................... 56
Figure 34: Principle-circuit diagram: Connection of the PWM- / Servo outputs...............................................57
Figure 35: Temperature- and humidity sensor DHT11....................................................................................60
Figure 36: Two-rowed female connector for 433 MHz-Transmitter.................................................................61
Figure 37: Typical "low-cost" 433 Mhz-Funk transmitter.................................................................................61
Figure 38: Principle-circuit diagram: Connection of 433MHz-transmitters......................................................62
Figure 39: connection block – serial interfaces............................................................................................... 63
Figure 40: Principle-circuit diagram: Connection of the RS232-interface........................................................66
Figure 41: Principle-circuit diagram: Connection of the RS485-connector......................................................69
Figure 42: Principle-circuit diagram: Connection of the CAN-interface...........................................................73
1. Safety instructions
Read the complete data sheet and the safety- and connection instructions before you start
with the assembly or the connection of the PiXtend. Keep the data sheets, even after
putting all components into operation.
Warning
For damage of any kind, which is caused by non-observance
of the data sheets and operating manuals, the company Qube
Solutions UG (limited liability) will assume no liability.
The guarantee- respectively warranty claims expire.
The PiXtend- board was developed as extension for the Raspberry Pi Model 2 B / 3 B.
We recommend the operation with this version, because the manuals, software and data
sheets are designed for it. Its also possible to use the Raspberry Pi Model B+ and B.
For the usage of the Model B (without 2/3 or +) you need a different connection cable
which you can find in our Online-Shop.
In operation the PiXtend must be mounted in a suitable case, that direct or accidental
touching of the electrical components and conducting paths can be avoided. We offer you
appropriate cases for the PiXtend. In this data sheet and in the assembly- and operating
manuals you will get all important information to operate your PiXtend reliable and save.
The central power supply is able to supply the PiXtend and the Raspberry with one
connector.
An external power supply unit supplies the PiXtend with a voltage from 12 to 24 V DC and
with a maximal current of 1.2 A. The power supply on the PiXtend board generates out of
this a stable and short-circuit proof 5 V DC voltage. All components on the PiXtend are
supplied with 5 V.
Over the 26-pole flat ribbon cable connection it is possible to supply the Raspberry Pi too,
so it doesn't need a separate power supply unit.
If necessary it is no problem to supply the Raspberry with a separate power supply unit.
For this selection is the jumper named "+5V_PI".
Warning!
Operate the PiXtend only with the defined voltage- and load ranges. A
constant overload can cause lasting damages to the electrical
components.
Danger of burns!
According to load and ambient temperature, the voltage regulator,
cooling element and diodes of the power supply can have temperatures
up to 75 °C
Direct touching should be avoided!
Connection Instructions
The power supply of the PiXtend is realized with a regulated and short-circuit proof power
supply unit with an output voltage between 12 and 24 V DC. The power supply unit must
correspond to the legal regulations of the country in which the PiXtend is used. If you are
buying another power supply unit take care of the appropriate certification marks.
Usable power supply units you also find in our Online-Shop.
The internal power supply of the PiXtend has an energy reserve on the 12-24 V side. This
takes care of an interruption-free power supply in case of voltage drops at the voltage
input for minimum 10 ms. The energy reserve is so designed that the named hold-up time
will last over the complete lifetime of the device.
Warning!
If the Jumper „5V_PI“ is at Position „ON“, then it is not allowed to
connect another power supply unit to the Raspberry Pi
Because of possible compensation currents between the power
supply units, there could be malfunctions, overheating of
components or their defect the result!
The Raspberry Pi computer and PiXtend are connected over a 26-pole flat ribbon cable
(26-pole on PiXtend side, 40-pole on Raspberry Pi side). The complete cable with pre
assembled connectors is in every scope of delivery of the PiXtend assembly kit.
Over the flat ribbon cable-connector a variety of voltages and signals is getting conducted
to the Raspberry Pi. At the second pin header the signals are made available again and
can be used for things like measuring.
Following connectors of the Raspberry Pi 2 B / 3 B are not used on the PiXtend and
therefore are available for other functions:
– GPIO25
→ is connected to the PiXtend over the flat ribbon cable but not used
– GPIO05, GPIO06, GPIO12, GPIO13, GPIO16, GPIO20, GPIO21 and GPIO26
→ are not connected to the PiXtend
Raspberry-Pi-extensions of other manufacturers must be accurately checked for
compatibility before using!
Connection instructions
The pin headers, which are labeled with "RasPi Connector" on the PiXtend, have the same
pinning of voltages and signals as the Raspberry Pi. In this data sheet will be used always
the "BCM Names" of the GPIOs.
In normal operation will be used only the plug connector ( Fig. 4 down) to connect the
Raspberry Pi via flat ribbon cable.
The second pin header (Fig. 4 up) is for the connection of other devices (for example per
I²C) or for measuring.
All voltages and signals on the 26-pole pin header are unprotected and have a direct
connection to the Raspberry Pi respectively the PiXtend- board. The signals are not
protected against short circuits, overload or interfering sources and should be handled
carefully.
Warning!
How the Raspberry Pi and the PiXtend are interlinked correctly, is described in the
assembly- and operation manuals.
PiXtend is using only address 0x68 (hex) on the I²C-Bus of the Raspberry Pi because of
the integrated Real-Time-Clock (RTC).
Example of use
– EEPROM, Flash (memory)
– Sensors (Ultrasound, temperature, air pressure etc.)
– data connection to integrated circuits like microcontroller, FPGAs, ASICs etc.
– Touch-Screen controller
– Analogue/Digital- or Digital/Analogue- Converter
Connection instructions
The I²C-bus is designed for data transmission on the circuit board. If external devices
should be connected, then the cable length should be as short as possible (max. 3m).
The GND- cable which is also on the 3-pole pin header, must be connected to external
devices on the I²C-bus.
Warning!
2.3 Mechanics
PiXtend has over 14 drill holes for M3-screws (diameter 3.2 mm). Four of them are for the
assembly of the Raspberry Pi model 2 B / 3 B / B+. Also are for the „older“ Model B two
fitting drill holes available. The fitting screws and spacers are in every scope of delivery of
the PiXtend assembly kit.
Additional screws and spacers in the assembly kit are for the mounting of the PiXtend-
stainless steel cover or for the mounting on a mounting plate. The outside dimensions of
the circuit board are designed for the insertion in a top-hat rail housing. The top-hat rail
housing can alternatively screwed on a wall or on a mounting plate.
If PiXtend is used without the above-mentioned housings, then the spacers ensure a save
stand and prevent bending of the circuit board at the insertion and loosing of wires. In
operation the PiXtend must be inserted in a housing (either in the original accessories or
another fitting housing)
How the Raspberry Pi and the PiXtend are screwed together correctly, is described in the
assembly- and operation manuals.
Thickness 1.55 mm
Construction Two copper layers Top- and bottom layer
Outside dimensions 231.50 x 107.50 mm
Electrical tested yes Raw circuit board
Labeling yes white, top side
Lead-free(RoHS- compliant) yes
Drill holes: X-direction Y-direction
for Raspberry Pi Model B 68 mm 44 mm
122 mm 69 mm
3. PiXtend- Microcontroller
The PiXtend- Controller is an 8 bit- RISC- Processor, the ATmega32A from the Atmel
Corporation. The Atmega- series is very popular and widespread. Similar controller you
can find for example on the Arduino-boards or on our LED-Qube 5.
Raspberry Pi and PiXtend are connected over the SPI- bus (serial peripheral interface).
The Raspberry Pi is the bus-master, the PiXtend- controller is the slave.
Our open source firmware is written in the programming language „C“ and compiled with
the free of charge program AVC-GCC- Compiler. If needed the controller can be
reprogrammed as wanted. But please consider that only with the original firmware the
function and the CE- conformity can be guaranteed.
With the Jumper "SPI_EN" the SPI- data connection between the Raspberry Pi and the
PiXtend can be disconnected. This for example can be useful when the microcontroller is
getting programmed over the 10-pole ISP-plug connector.
For the programming of the PiXtend- microcontroller is prepared a 10-pole plug connector.
As alternative the microcontroller can get a new firmware directly from the Raspberry Pi
(see Applikation-Note APP-PX-540). But for normal operation this is not necessary. The
microcontroller are always programmed state of the art at delivery of the PiXtend assembly
kits / ePLC.
Connection instructions
The following circuit diagrams illustrate the usage of circuit parts, which can influence the
PiXtend- microcontroller. The circuit part "INT" is part of the PiXtend- board, "EXT" is an
example for a possible external circuit.
The common reset-circuit allows the resetting of the PiXtend- microcontroller and of the
CAN-controller. The reset-circuit can be operated as follows:
1. If the Raspberry Pi GPIO23 (Pin 16) is configured as input, then the microcontroller
and the CAN-controller are in standard operation mode.
2. Is the GPIO23 configured as output, so the condition of the controllers is depending
on the output level of the GPIOs. At LOW-level (0V) the controllers are in standard
operation mode. At HIGH-level (3,3V) the controllers are getting reset and stay in
the reset level until the HIGH-level will be taken back.
3. Optionally an external switch or push button can be connected to the GPIO23 (Pin
16). (please note following information)
Warning!
When connecting an external switch or push button the greatest caution
is necessary!
It only should be connected and pressed a switching element at the
GPIO23 (Pin 16), if the GPIO is configured as input. Otherwise the
Raspberry Pi can be damaged.
Furthermore, as usual at the Raspberry Pi, it is not allowed to apply higher voltages as
3.3V to the GPIO23.
The Jumper "SPI_EN" should be plugged always in normal operation. Or the data
connection between Raspberry Pi and PiXtend is not possible.
But only the plugging of the jumper doesn't activate the data connection automatically.
Additionally it is necessary to configure the GPIO24 (Pin 18) as output and set it to HIGH-
level (3.3V)
In the PiXtend- test programs under Linux or with CODESYS the GPIO24 is set
automatically to activate the data transfer between the controllers.
If the complete software is getting written by oneself (for advanced users) so the handling
of the SPI- Enable should not be forgotten!
Over the 10-pole plug connector the PiXtend- microcontroller can be programmed. The
pinning equals to a standard ISP-connector corresponding to the Application Note
"AVR042: AVR Hardware Design Considerations" from Atmel.
For more information to the programming and the usage of the ATmega32A on the PiXtend
we recommend our pursuing App-Notes and these of the company Atmel.
For normal operation of the PiXtend the ISP-connector is not necessary and shouldn't be
connected. The ISP-connector is a service-connector where it is only allowed to connect
wires shorter as 3 meter.
PiXtend has a huge number of digital in- and outputs. In this chapter you will find all
relevant technical data, as well as connection- and safety instructions. Read always the
relevant sections before you start with the wiring and the work at the in- or output.
The eight digital inputs (DI0-DI7) are realized in 1-wire-connection technology and have
reference to the common ground (GND).
Example of use
– Switch, push button, end switch
– Sensors with switch output (proximity switch, light barrier)
– Outputs of other control devices
– Outputs of integrated circuits (TTL-level, CMOS-level)
It is possible to choose between two different voltage ranges (one jumper per input).
In the 24 V area the inputs are according to legal requirements of the PLC-norm IEC
61131-2. Also signals with 12 V-level (for example in automotive) are detected reliably.
Overload and polarity reversal up to +/- 30 V can't destroy the inputs. The 5V area is
designed for 5 V TTL- and 3.3V CMOS-level.
Analog filtering levels increase the resistance to interference and provide a save signal-
processing by the PiXtend- microcontroller. LEDs signalize the status of the inputs.
Warning!
Voltages higher 30V DC can lead to overheating and the defect of of
components.
The inputs are designed exclusively for DC voltages. It is not allowed to
connect AC voltages.
Warning!
Voltages higher 10V DC can lead to overheating and the defect of of
components.
The inputs are designed exclusively for DC voltages. It is not allowed to
connect AC voltages.
The LEDs can shine already at voltages which are still not detected as high-level.
Connection instructions
The following circuit diagram explains the connection of different signal sources to a digital
input. On the left side (INT) is the internal circuit of an input, on the right side (EXT) the
possible connection of an external circuit.
On the left side of the connector block of the digital inputs is a 2-pole supply connector.
Here the switches, sensors etc. can be connected and supplied. The power consumption
of the connected signal sources should not exceed 100 mA.
A self-resetting fuse prevents damages at overload or short circuit.
If an external power supply unit is used (for sensors, switches etc.), the GND of PiXtend
must be connected with the GNDs of this power supply units. We recommend the
connection of all GNDs at one central point (bridged terminal strips), to prevent ground
loops.
Six digital outputs (DO0 – DO5) allow the switching of DC-consumers with voltages up to
30 V and currents up to 3 A.
Example of use
– Switching of external power relays or contactors
– Operation of DC-motors, model making servo motors
– Connection with the inputs of other control units
– Heating- and Peltier elements
– Fans and blowers
– Lamps for direct current and power-LEDs
All six digital outputs are short circuit- and overload protected. Self-resetting fuses
(Polyfuse / PTC) save the MOSFET power switch. The outputs are in accordance with
„protected and short circuit- resistant outputs“ like it is specified in the PLC-norm
(IEC 61131-2) . Due to the open-drain- technique it is possible to switch up to 30 V DC.
Technical Data:
Warning!
Voltages higher 30 V DC can lead to overheating and the defect of of
components.
The outputs are designed exclusively for DC voltages. It is not allowed
to connect AC voltages.
Danger of burns!
According to load and ambient temperature, the power transistors and
fuses can have temperatures up to 75 °C.
Direct touching should be avoided! Output currents higher then 3 A are
not allowed in standard operation.
Connection instructions
The following circuit diagram explains the connection of different loads and the digital
outputs. On the left side (INT) is the internal circuit of the outputs and on the right side
(EXT) is shown the possible external circuit.
At inductive loads it needs a protection in the external circuit, to ensure that the voltage at
the output never rises higher then 40 V. This can be realised for example with a free-wheel
diode (1N4004), as it is shown in Figure 18.
Should the outputs get connected with inputs (at positive switching) of another controlling
device, it will be needed an external pull-up resistor for the input voltage of the controlling
device.
The ground connections (GND) of external power supply units are to connect directly with
the GND- connections of the connector block of the digital outputs.
The four power relays (RELAY0 – RELAY3) allow the potential free switching from DC
voltage and AC voltage consumers. Every relay has 3 connectors (changeover contact).
Example of use
– Turn on / off 115 V / 230 V AC devices
– Switch AC voltages of different voltages and frequencies
– rotational speed of fans with two velocities
– direct operation of DC- or AC- drives
– fans, blowers and lighting
– high loads with low switching cycles
With the universal-relay it is possible to switch everything what needs maximum 230 V
and 6 A. All switching contacts are potential free and have no leading contact to the rest of
the PiXtend circuit.
Implicitly pay attention to the following safety instructions if you work with dangerous
voltages (higher 50 V)!
Technical Data:
Warning!
In no case it is allowed to connect voltages higher 250 V AC or 60 V
DC!
Spacings between conducting paths and components are layed out for
maximum 250 V.
If the relays should be powered with mains voltage (115 V USA / 230 V EUROPE), so it is
needed a isolating plastic housing and / or a metallic housing with protective earthing. The
housing must prevent a direct touching of components,wires or metallic parts under
voltage.
We offer suitable housings for hat-rails or wall mounting in our shop. The PiXtend stainless
steel cover is connected to the protective conductor ( PE -green/yellow conductor) at
minimum one point. You will find more information in the manual for the stainless steel
housing.
Alternatively the PiXtend assembly kit can be mounted in another protective isolated
plastic housing or grounded metallic housing, which must be closed while operation. Pay
attention to the legal regulations in relation to the electrical safety of the country, in which
the assembly kit is used.
Danger of burns!
Connection instructions
The following circuit diagram shows the connection of ohmic and inductive DC-loads with
the relay outputs. On the left side (INT) is the internal circuit of a relay, on the right side
(EXT) is shown a possible external circuit.
The four relay-outputs have no integrated fuse or other overload protection. Because of
that it is necessary to include an external protection which trips at 6A.
Inductive loads must have an external free-wheel diode or it must be installed a fitting
snubber- network. Otherwise it can cause sparking while switching of the load. This can
interfere other devices and damage the contacts.
Inductive loads are motors, relays, contactors, solenoids, power supply units with
transformers etc.
The ground connectors (GND) of external power supply units, which are used together
with relays, must not be connected to the common PiXtend-GND. The relay contacts have
a potential separation and because of that no conducting connection to other components
or potentials of the PiXtend or the Raspberry Pi.
The following circuit diagram shows the connection of ohmic and inductive AC-loads with
the relay-outputs. On the left side (INT) is the internal circuit of a relay, on the right side
(EXT) is shown a possible external circuit.
Before 115 V / 230 V or other dangerous voltages are getting connected to the
relays, please read all safety- and connection instructions.
When working with 115 V / 230 V mains supply, it always must be used a ground
fault circuit interrupter (fault-current circuit breaker – personal protection)!
Inductive loads are motors, relays, contactors, solenoids, power supply units with
transformers etc.
AC voltages can exclusively be used at the 4 Relay contacts. All other connectors are not
for AC voltages and under no circumstances laid out for mains voltage.
The four GPIOs (GPIO0 -GPIO3) on the PiXtend- board can, depending on the
requirement, be configured for different functions. Generally the PiXtend- GPIOs are made
for a range between 0 V to 5 V.
Example of use
– Connection of sensors, push buttons and end switches (as input)
– Direct connection of small electrical loads like LEDs (as output)
– Connection to digital in- and outputs of other controlling devices or microprocessors
– Connection of temperature- and humidity sensors (DHT11 / DHT22 / AM2302)
In opposite to other in- and outputs on the PiXtend, the GPIOs have only low protection
and no input filter. Because of that it are only short wires (shorter 3 m) allowed and if
necessary it should be used a external signal processing. But as outputs the GPIOs have
a short circuit protection (to GND).
The here described GPIOs are connected to the PiXtend- microcontroller and have
nothing to do with the GPIOs of the Raspberry Pi.
The configuration of the GPIOs must be done per software (PiXtend-Linux- tools or
CODESYS).
Warning!
The connection of voltages higher 5.5 V or smaller -0.5 V DC can lead
to defect of the GPIOs or the whole microcontroller.
Connection instructions
The following circuit diagram shows the connection of the signal generator to the GPIOs
in operation as inputs. On the left side (INT) is the internal circuit of a GPIO, on the right
side (EXT) is shown the possible external circuit.
Figure 23: Principle-circuit diagram: Connection of the PiXtend- GPIOs (as inputs)
For the supply of sensors, switches and other signal generators can be used the +5 V
connector, which is on the same connector block like the GPIOs. It must be looked for that
the consumer doesn't use more then 100 mA from the power supply.
In case of doubt a self-resetting fuse (Polyfuse) saves the supply connector before
overload or short circuit.
Warning!
Under no circumstances can inductive consumers be connected,
because the occurring voltages at the switching of of the loads can
damage the microcontroller.
Connection instructions
The following circuit diagram shows the connection of low consumers to the PiXtend-
GPIOs. On the left side (INT) is the internal circuit of the GPIOs, on the right side (EXT) is
shown the possible external circuit.
Standard LEDs can be connected directly to the GPIOs. But it has to be calculated before,
if the current strength is suitable for the LED:
Example of calculation:
green standard-LED: Forward voltage 2.1 V
(output voltage – forward voltage) / internal series resistor = current strength
(5 V – 2.1 V) / 270 Ω = 10.74 mA
Standard LEDS glow normally at about 2 mA and tolerate minimum 20 mA. So it is
possible to connect a green LED directly between a GPIO output and GND.
When the outputs are getting connected with TTL-inputs of other devices, so it is to look
for, that the imputs resistor is not smaller as 1 kΩ. Otherwise it can be that the voltage at
HIGH-level is not enough to be detected from the other device (voltage divider between
internal 270 Ω and the resistor of the remote station).
The external shown GND- connections are to connect with the PiXtend- GND at minimum
one point, to close the electrical circuit.
Further information and details to the named analogue I/Os you will find on the following
sites.
PiXtend has four analogue inputs. Two for voltage measuring (AI0 – AI1) in the ranges
0..5 V / 0..10 V and two more for current measuring (AI2 – AI3) in the range 0..20 mA.
Example of use
– Analysis of sensors with analogue outputs
– capturing of potentiometer positions (rotary control)
– Current- and voltage measuring in laboratory and at test setups
– Voltage monitoring for accumulators (for example in robots)
– Current measuring with an external shunt ( voltage at resistor)
– Analysis of PT100/1000 sensors (with pre-amplifier)
– Connection with the analogue outputs of other controlling devices
The inputs are robust designed and withstand surges up to 30 V DC. Per jumper the
voltage areas can be easily changed and adapted to the circumstances.
All four channels are according to the standards of programmable logic controllers (IEC
61131-2) and are therefore usable for a variety of professional sensors and measurement
equipment.
Analogue filtering levels ensure low-noise measurements with the 10 bit- analog/digital
converter (integrated in the microcontroller).
Before usage it is to check, and if necessary, to adapt the jumper position. Sure you can
stay in 10V- area always and enjoy the highest flexibility and robustness of the inputs. But
in 5V-area you have the same resolution for a smaller measuring area. For a better
accuracy this can be very helpful.
Potential separation no
Status monitoring no
Maximum cable length <3m unshielded cable
< 30 m shielded cable
Status monitoring no
Maximum cable length <3m unshielded cable
< 30 m shielded cable
The result of the A/D- conversion can be influenced strongly by the setting of the ADC-
speed (frequency) and the counts of the conversion per measuring result (averaging).
Little frequencies and long averaging makes a higher accuracy.
The analogue voltage inputs are able to measure DC- and AC voltage. If AC voltage
should be used, it should be looked for the input filters. It are only allowed measuring in
positive area. Negative voltages can be connected, but not analysed.
PiXtend can not automatically evaluate the jumper setting of analog voltage inputs. If you
reposition the jumper, so must react accordingly in software (conversion factor to adjust).
In CODESYS, the jumper setting can be changed comfortable about "Auxiliary" --> "AI
jumper". The PiXtend Linux tools dominate the switch between 5 V and 10 V measurement
range.
Warning!
Voltages higher +/- 30 V DC can lead to overheating and to the defect
of components.
Connection instructions
The following circuit diagram shows the connection of an analogue voltage generator to
the analogue inputs of the PiXtend. On the left side (INT) is the internal circuit of an
analogue voltage inputs, on the right side (EXT) is shown a possible external circuit.
The voltage inputs can be used in different ways, which necessitate the measuring of a
voltage. In figure 27 is shown an example of an easy circuit with a light-sensitive resistor
(LDR) and the analysis of a rotary potentiometer.
When it should be worked in 5 V-area, it may be advisable to use one of the both +5 V
supplies of the PiXtend-board to supply the sensors and voltage dividers.
Currents higher then 100 mA should not be taken permanently. However, in case of a short
circuit or a permanent overload the supply connector is saved by a self-resetting fuse.
The earth connections (GND) of external power supply units are to connect directly with
the GND connectors, of the connector block, from the analogue inputs.
At analogue signals we basically advice to use shielded connection cables. This will be
important especially, when the cables are layed near pulsed currents (for example
electrical drives) or other interfering sources.
If PiXtend is used in a metal housing or a switch box, then it's useful to connect the shield
to a grounded or blank metallic surface (ground terminal and screw fittings are to buy in
DIY store or specialist shop). There must be or must be made an electrical conductive
connection between GND and the housing / switch box (mostly (PE-protective earth).
Otherwise the shield should be disconnected near the connector blocks, twisted and then
connected with the GND of PiXtend.
At cables shorter then 3 m it too is possible to use unshielded cables.
(Polyfuse)
Potential separation no
Status monitoring no
Maximum cable length <3m unshielded cable
< 30 m shielded cable
The analogue current inputs are able to measure DC- and AC voltage. At usage of AC
voltage should be looked for the inputs filters. It are only measuring in positive area
possible. Indeed it is possible to connect negative currents, but they can't be analysed.
Warning!
Voltages higher +/- 30 V DC can lead to defect of components.
Connection instructions
The following circuit diagram shows the connection of analogue voltage generators to the
analogue inputs of PiXtend. On the left side (INT) is the internal circuit of an analogue
current input, on the right side (EXT) is shown a possible external circuit.
As the circuit diagram shows, the measuring current flows through a shunt-resistor with a
value of 20 Ω. So if a voltage regulator is getting connected to the output, the maximum
allowed current of 25 mA flows already at very low voltages:
Umax = 20 Ω * 25 mA = 0.5 V
If higher voltages are getting connected to the inputs, so the current flow is raising very
fast over the allowed area and will be limited at about 100 – 150 mA by a self-resetting
fuse.
Even when defects are getting avoided, it is not recommended to operate the current
inputs permanently over 25 mA. Currents higher then 25 mA can not be analysed by the
software.
The ground connections (GND) of external power supply units are directly to connect with
the GND connections of the connection block from the analogue inputs.
The full placement of PiXtend (assembly kit full / ARTC / ePLC) has two analogue voltage
outputs. It is possible to output voltages in two channels, independent from each other, in
areas from 0 to 10 V in 10 mV-steps.
Example of use
– Supply and controlling of small loads: Mini-DC-motor, LED(s)
– Function generator (Output of sinus, rectangle and triangle voltage, etc.)
– Connection with analogue inputs of other controlling devices and power amplifiers
– Controlling analogue monitoring device
Both outputs are short circuit protected and are able to run a current of 10 mA in normal
operation. The analogue outputs are supplied over the central voltage supply of the
PiXtend.
The fine trimming of the output voltage area is made by the two potentiometers T0 and T1
on the PiXtend.
Technical Data:
Information!
Because the analogue outputs are supplied from the central PiXtend-
power supply (12-24 V), following is to mind: The rated output current of
10 mA per channel can only be taken, if the PiXtend is supplied with
min. 13.5 V.
Connection instructions
The following circuit diagram shows the connection of consumers and devices to the
analogue outputs of PiXtend. On the left side (INT) is the internal circuit of an analogue
voltage output, on the right side (EXT) is shown a possible external circuit.
If the outputs are getting connected to analogue inputs of other controlling devices, power
amplifiers (too frequency converter)or something, then the groundings (GNDs) are to
connect with the groundings of the PiXtend. Two GND-connectors are directly on the
connector block of the analogue outputs.
Same as at for the analogue inputs, it should be used shielded cables for the analogue
outputs.
6.1 PWM/Servo-outputs
On the 10-pole connection block of the digital outputs are too two connectors named
PWM0 and PWM1. At this special outputs it is possible to output pulse width modulated
(PWM) signals with adjustable frequency and duty cycle or to directly connect a model
making servo.
With help of the jumper „Dox- PWMx“ the PWM- signal directly layed at the digital outputs
DO4 and DO5, so that it is possible to run loads up to 3 A.
Example of use
– control position of up to two model making servos
– rotation speed control of fans and other DC-motors
– dimming of DC-lamps and LEDs (high-power-LEDs too)
– controlling of heating element temperature
– fine adjustable clock source for a variety of electronical applications
Connection instructions
The following circuit diagram shows how to connect consumers and devices to the PWM
or digital-outputs of PiXtend. On the left side (INT) is the internal circuit of the outputs, on
the right side (EXT) is shown a possible external circuit.
The PWM outputs PWM0 and PWM1 can be operated in 2 ways. The Jumper „Dox-
PWMx“ is for the selection of the operation mode:
1. Jumper left (Pin 1 and 2 connected) → DO-mode
DO and PWM work independent from each other. At the PWM outputs can the
PWM- signal be taken as 5 V-TTL-level. It is only allowed to charge the load with a
resistor higher then 1 kΩ, connected with the high omic inputs of a servo motor or
other another digital input.
The PWM- signal is getting redirected to the power switch of the belonging output
and is able to switch /tact the connected load of this DO because of that.
The „normal“ DO-function is deactivated in this mode. The changing of the values
from DO4 and DO5 in the software is not affecting the state of the respective power
driver.
It is only allowed to connect cables shorter then 3 meter to the connectors PWM0 and
PWM1.
All further information to the controlling of the PWM- outputs by software are to look up in
the according manuals / App-Notes. On the PiXtend- homepage (www.pixtend.de) are all
documents ready to download for free.
A break down of the voltage supply can lead to unforeseeable behaviour of the overall
system and in that case too for the I/Os and interfaces. The Raspbery Pi can break down
and has to start up again.
The ground cables of externals accus, accupacks and power supply units, which are used
for the power supply of the servos has to be connected with PiXtend. On the connection
block of the digital outputs and PWM- connectors are GND- pins for that reason.
Because the motors of the servos are inductive loads it possibly (always depending to the
used servo) must be included a Diode, how it is shown in Figure 34. Otherwise it could
result high voltages while switching off, what can lead to damage at the power switch of
the digital output.
When choosing the model making servos, please look that the legal requirements for the
country which it is used in are fulfilled.
The connection instructions for the sensors are described in chapter 4.4 GPIOs as digital
in- and outputs.
The two-rowed female connector named "433MHz Trans." allows the connection of
different common 433 MHz- transmitters to PiXtend.
With the transmitters it is possible to switch customary funk sockets from the DIY- shop.
Cables of 230 V consumers don't extra have to be connected to the relays of PiXtend.
The pin assignment of the connector are prepared the most common transmitters, which
can be put in directly. The transmitters are sold for example with the labeling "FS1000A"
and cost about 3 to 15 €.
The data wire goes directly to a GPIO of the Raspberry Pi, the power supply (5 V) is done
by the PiXtend.
Connection instructions
The following circuit diagram helps with the connection of different 433 Mhz- transmitters
to the according female connector of PiXtend.
Information
The connectors are not saved. Wrong connected, short circuit or
overload can lead to the defects on the PiXtend- or Raspberry Pi board!
On the connector shouldn't be connected cables longer then 3 meter.
Before connecting the transmitter the pinning has to be checked and compared to the
pinning of the female connector of PiXtend.
7. Serial interfaces
RS232 and RS485 share the UART interface of the Raspberry Pi. Between the interfaces
can be switched by a GPIO.
Further information and details to the single interfaces are found in the following.
7.1 RS232
Die RS232-interface allows a easy data transfer between two devices (point to point).
PiXtend converts the UART-signals of the Raspberry Pi to the robust RS/EIA232-
standards.
Example of use
– Connection with a computer (Data transfer or Linux-terminal)
– Data exchange with other controlling devices, measuring equipment and
microcontroller
– Service-access to phone systems
– Connection to analogue modems and other electronical classics
– RS232 can be converted to USB without problems (external adapter)
The on PiXtend installed transceiver is a million time proven, short circuit protected and
can handle overloads up to +/- 30 V at its inputs.
Technical Data:
Warning!
When exceeding the specified maximum values it can cause data
transfer failures, functional disruption and component defects.
The switching between RS232- and RS485- transceiver can be done by the RasPi
GPIO18. Is the GPIO18 configured as input or outputs a low-signal as output so the
RS232 is active. If the output is a high-signal so the RS485 is active.
Connection instructions
RS232 is a point to point connection between two devices and no bus system.
The TX of PiXtend is getting wired to the RX cable of the other device. Just the same is
the RX of PiXtend getting wired to the TX cable of the external device (crossing / X-ing).
At cable lengths longer then three meter should be taken shielded cables. Information and
tipps for the connection or the apply of shields you will find under 5.1.1 Voltage inputs in
this document.
At standard setting for the UART-interface under Raspbian, the RS232-interface serves as
console. With a terminal program it is possible to connect to the Linux-console directly by
PC. For the correct transfer are to to do following settings in the PC program:
7.2 RS485
The RS485-interface allows the data transfer between several devices in a bus system.
PiXtend converts the UART-signals of the Raspberry Pi to the differential level of the
interfere resistant RS/EIA485-standards.
Example of use
Warning!
When raising the specified maximum values it can lead to transfer
failures, function interference and component defects.
The switching between RS232- and RS485- transceiver can be done by the RasPi
GPIO18. Is the GPIO18 configured as input or outputs a low-signal as output so the
RS232 is active. If the output is a high-signal so the RS485 is active.
RS232 is the standard setting the PiXtend- system is starting with.
Connection instructions
In the RS485-bus it has to be connected a 120 Ω resistor at the end of the line structure
(first and last bus-participant). If the PiXtend is one of this bus endings, so the jumper has
to be switched to „ON“. The 1 nF-capacitor prevents unnecessary current flow (power loss)
in idle level.
The „bias-network“ stabilizes the level in the bus, if it is floating. Without a network like this
it could be received so called „phantom characters“ of the other bus participants, which
would be caused by interference / oscillations on the bus cables (unwanted changes of the
logic level).
Because of the ohmic load of the bus / bus-driver by the bias-network, it should be
maximum two device with such a bias-network in a bus-system. In case of doubt it is
possible to unsolder the both 680 Ω- resistors, to lower the bus load.
The RS485-driver of PiXtend works with half-duplex. That means it can be sent or
received. Both together, send and receive, is not possible.
Because of that the transceiver must be switched between send- and receive mode. This
happens over the connections RE / DE. The cables are connected to the GPIO22 of the
Raspberry Pi and can be controlled by it.
PiXtend by default is starting with a LOW-level at RE / and DE and so is standing in
receive mode (listening in the bus).
The ground connection of PiXtend, which is lying directly next to the data cable on the
connection block has to be looped to the other bus participants.
7.3 CAN
The CAN-interface allows the data transfer between several devices in a bus system. The
Raspberry Pi controls the standard-CAN-Controller over the SPI- interface and additional
RasPi- GPIOs. The differential signal makes the CAN-bus more tolerant against
electromagnetic interferences.
Example of use
The CAN-transceiver of PiXtend is short circuit resistant and robust against interference. It
supports the "extended frame format" with 29 bit-identifier (CAN 2.0B).
With a jumper directly next to the connector block it is possible to connect / disconnect a
120 Ω- termination resistor.
Warning!
When raising the specified maximum values it can lead to transfer
failures, function interference and component defects.
Connection instructions
In the RS485-bus it has to be connected a 120 Ω resistor at the end of the line structure
(first and last bus-participant). If the PiXtend is one of this bus endings, so the jumper has
to be switched to „ON“.
The in Figure 42 shown CAN-Transmitter is controlled by a CAN-Controller. The CAN-
Controller is connected with the Raspberry by SPI. Because the digital-analogue-
converter of the analogue outputs and the CAN-Controller have the same chip-select
(CS1), it first must be switched to the CAN-Controller. Therefore the RasPi GPIO21/27 has
to be configured as output and switched to HIGH-level.
For the usage of the CAN-Controller another GPIO of the Raspberry Pi is important too. At
GPIO4 is the interrupt-cable connected. When the GPIO is configured as input, then it can
be read with the software. The interrupt-cable is „active low“.
The ground connection of PiXtend, which is lying directly next to the data cable on the
connection block has to be looped to the other bus participants.
8. Real-Time-Clock
The Real-Time-Clock (RTC) is always provides the actual time and date to the Raspberry
Pi. A Lithium-battery cares, that the clock still runs even when the PiXtend / Raspberry Pi
are not supplied.
The Raspberry Pi (with Raspbian Linux as operating system) normally takes the actual
time from a server in the internet, if it is connected to a network with internet access. But if
there is no internet access (isolated operation), the Raspberry Pi and in this case the
operating system too will loose the time after every shutdown.
Because of that the Real-Time-Clock is not necessary in every application or project and is
missing in the basic assembly kit because of that reason.
The data exchange between Raspberry Pi and RTC runs with I²C-Bus.