X205 SKU: EZ-0046

From 52Pi Wiki
Jump to navigation Jump to search

X205 EXPANSION BOARD FOR RASPBERRY PI

X205 860p2.jpg



X205 165p3.jpg
X205 165p4.jpg
X205 165p5.jpg



KEY FEATURES

Parameters Values
Input Voltage 6V to 20Vdc converted to 5V, 3A via step-down DC/DC converter to power the Raspberry Pi
RS232 serial communications Control the Raspberry Pi over RS232 or connect to external serial accessories
RS485 serial communications You will be able to have a communication port for your field bus directly connected to your RPi!
- It will allow up to 32 devices to communicate through the same data line over a cable length of up to 4,000ft with a maximum data rate of 10Mbit/s.
Audio 3.5mm MIC in jack
- 3.5mm stereo audio jack
- Audio IO connector (Microphone input and stereo audio amplifier 3.3Wx2)
Wireless WiFi (IEEE 802.11b/g/n) with external antenna
- IR sensor (38KHz)
USB Storage Self-powered USB hub with 3 ports
Real-time clock (RTC) Based on DS3231SN with included CR2032 battery
GPIO Control 8-channel Darlington driver chip (ULN2803) allowing to control electronic circuits which require more current
Misc Power output socket
- Camera flex slot so camera can still be used with the expansion  board attached
- DIP switch to remove connection from RPi’s pin header
- Directly connected on top of the Raspberry Pi using the board GPIO header pins 
- No wiring nor soldering is required 
- Duplicated the 40-pin header of the R-Pi in order to support existing expansion boards 
- Suitable for Raspberry Pi Model B+, Raspberry pi 2 Model B and Raspberry Pi 3 Model B NEW!
Dimensions 85 x 56mm (Same size as Raspberry Pi)

X205test1.jpg



PACKING LIST

  • 1 x X205 expansion board
  • 1 x USB adapter
  • 1 x 2.4GHz WIFI antenna
  • 4 x nylon spacers (M3 x 20mm)
  • 8 x nylon screws (M3 x 6mm)

QUICK START GUIDE

  • A. Fitting the expansion board
  • B. Operation system
  • C. Power supply
  • D. RS232 communications
  • E. Testing of RS485 communications
  • F. Microphone input and audio output
  • G. Audio input and output interface
  • H. Setting RTC time
  • I. Setting up the IR remote
  • J. ULN2803 8-channel RC servo port

    • A. FITTING THE EXPANSION BOARD

1. Push a screws up through the mounting hole on the underside of the Raspberry Pi and screw the spacer down until it is hand tight

Assembly 275p1.jpg



2. Plugs the expansion board straight into your Raspberry Pi B+'s GPIO header and screw down.

Assembly 275p2.jpg



3. Insert the USB adapter

Assembly 275p4.jpg



4. Install the WiFi antenna

Assembly 275p5.jpg



B. OPERATION SYSTEM

Rpi.jpg


Download


C. POWER SUPPLY

Xseries expansion board supplies the RPi with a regulated +5V through the GPIO header using a 2A poly-resettable (PTC) fuse.
With the wide voltage input range (6~21Vdc), the RPi can be powered from a wide variety of external sources such as batteries, 12V power adapters, solar battery sources, etc.

Recommended Power Adapter : 110~240VAC input, 12VDC 2A output
Dimension of input plug (Unit: mm)
Ds0101.jpg


D. RS232 COMMUNICATIONS

Introduction

The RS232 port is connected to the UART port on the Raspberry Pi using a MAX3232 interface. The MAX3232 IC converts the 3.3V UART port to RS232 voltages allowing communication with RS232 compatible devices over a DB9 serial cable or with the use of a null-modem cable the board allows terminal access with linux on the Raspberry Pi using a terminal application. The RS232 port can be accessed through the terminal block on x205. Schematic diagram


E. TESTING OF RS485 COMMUNICATIONS

  • What is RS485

Please click on the link below for further details of RS485.
http://www.radio-electronics.com/info/telecommunications_networks/rs485/rs-485-tutorial-basics.php

  • Install Dedendecy Libraries (Raspbian)

1. Update source list
$ sudo apt-get update
2 . Install python-pip
$ sudo apt-get install python-pip
3.Use pip to install WiringPi (WiringPi is designed for raspberry pi to behave similarly to that of the wiring library under Arduino.
After this library is installed,c or shell or python can use the function to configure and control GPIOs directly.
$ sudo pip install wiringpi
4. Installed the associated library files of serial ports :
$ sudo apt-get install python-serial
5.Test whether the GPIO library and the serial library is installed or not:
$ python
$ import RPi.GPIO
$ import serial
If there is no error , then the two libraries are installed correctly.

X205test2.jpg



6. We need to configure file ‘/boot/cmdline.txt’ to remove the kernel booting information and debug message:
$ sudo nano / boot / cmdline.txt
You can see the following information:
dwc_otg.lpm_enable = 0 console = ttyAMA0, 115200 kgdboc = ttyAMA0, 115200 console = tty1 root = / dev/mmcblk0p2 rootfstype = ext4 elevator = deadline rootwait
Remove “console = ttyAMA0, 115200 kgdboc = ttyAMA0, 115200″ so that the information becomes:
dwc_otg.lpm_enable = 0 console = tty1 root = / dev/mmcblk0p2 rootfstype = ext4 elevator = deadline rootwait
7. Disable log in from the serial port:
$ sudo nano / etc / inittab
and comment out ” T0: 23: respawn :/ sbin / getty-L ​​ttyAMA0 115200 vt100″
8 Restart Raspberry Pi:
$ sudo reboot
Now you can use / dev/ttyAMA0 like the regular COM port.


  • Python Test Code

Test code(serial_test.py , unzip and save to /home/pi ) :

300



  • Test Tools
    • 1 x Raspberry Pi
    • 1 x X205 expansion board for Raspberry Pi
    • 1 x Cable (two conductors)
    • 1 x USB-RS485 converter
RS485 converter.jpg



  • Wire Diagram and Test

Wiring:
X205 RS485 ‘A’-> USB-RS485 converter ‘ A ‘
X205 RS485 ‘B’-> USB-RS485 converter ‘ B ‘

After the wiring is done, launch a serial terminal. We use X-CTU in our case, and set the baud rate to 9600:

X205test4.jpg


After running serial_test.py, enter the characters in the X-CTU:

X205test5.jpg


X205test6.jpg



F. MICROPHONE INPUT AND AUDIO OUTPUT

To configure X205 sound card as the default audio device.
<1> Right-click the volume icon, a pop-up menu appears to allow you to select "USB PnP Sound Device".

X200test1.jpg


<2> Click "Device Settings..." to allow more detailed control of the X300 audio devices – you can access this either under Device Settings from the volume right-click menu or from the Preferences section of the main menu, where it is listed as Audio Device Settings.

X200test2.jpg


X200test3.jpg


<3> From this dialog, select the device you want to control from the drop-down at the top, and then press the Select Controls button to choose which of the controls the device offers that you want to display. Pressing the Make Default button on this window has the same effect as choosing an output source in the volume right-click menu.

X200test4.jpg


<4> Let's record the sound with LXterminal
pi@raspberrypi ~ $ arecord -D plughw:1,0 -f cd test.wav
<5> Press Ctrl + C to abort recording
<6> Playback the recording with aplay
pi@raspberrypi ~ $ aplay test.wav


G. AUDIO INPUT AND OUTPUT INTERFACE

X200test5.jpg



H. SETTING RTC TIME


I. TESTING THE IR RECEIVER


J. ULN2803 8-CHANNEL RC SERVO PORT