user’s guide eb355 - e-blocks users guide.pdf · program a 40 pin pic16f877 device. this is...

30
User’s guide EB355 E-blocks is a trademark of Matrix Multimedia Limited PIC and PICmicro are trademarks of Arizona Microchip Inc. Copyright ©2003-2005 Matrix Multimedia Limited www.matrixmultimedia.co.uk

Upload: others

Post on 23-Mar-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

User’s guide EB355

E-blocks is a trademark of Matrix Multimedia Limited PIC and PICmicro are trademarks of Arizona Microchip Inc. Copyright ©2003-2005 Matrix Multimedia Limited www.matrixmultimedia.co.uk

Page 2: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

2

User’s guide.................................................................................................................................................1 1 An introduction to E-blocks™? ..............................................................................................................4

1.1 What are E-blocks™? ....................................................................................................................4 1.1.1 An example of an E-blocks system ............................................................................. 4 1.2 How do E-blocks connect together? ..............................................................................................5 1.3 How do processing E-blocks work? ...............................................................................................5 1.4 How many E-blocks are available? ................................................................................................5 1.5 Why use E-blocks?.........................................................................................................................5 1.6 Where are E-blocks used?.............................................................................................................6 1.6.1 Industrial use................................................................................................................ 6 1.6.2 Educational use ........................................................................................................... 6 1.6.3 Hobbyist/home/student use ......................................................................................... 7 1.7 Where to find further information?..................................................................................................7 1.7.1 Making sure your E-blocks work properly.................................................................... 7

2 Electrical attributes of E-blocks .............................................................................................................8 2.1 How are E-blocks buses connected?.............................................................................................8 2.2 Adding power..................................................................................................................................8 2.3 Protecting E-blocks circuitry ...........................................................................................................9 2.4 Supply voltage and voltage compatibility .......................................................................................9

3 Physical attributes of E-blocks.............................................................................................................10 3.1 Mounting on a backplane .............................................................................................................10 3.2 Adding security and strength........................................................................................................10 3.2.1 Setting up an E-blocks system .................................................................................. 12 3.2.2 Using ZIF sockets ...................................................................................................... 12 3.2.3 Understanding the patch system ............................................................................... 13 3.2.4 Sharing a port ............................................................................................................ 14 3.2.5 Developing your own circuits for E-blocks................................................................. 14

4 Examples of systems that can be built with E-blocks..........................................................................15 4.1 Remote phone snooper / baby alarm...........................................................................................15 4.2 Ultrasonic measuring system .......................................................................................................15 4.3 PC based ECG and heart rate monitor ........................................................................................15 4.4 Internet temperature logger..........................................................................................................16 4.5 CPLD programming system .........................................................................................................16

5 Description of individual E-blocks........................................................................................................17 Screw terminal board ..............................................................................................................................17 Sensor interface ......................................................................................................................................17 LED board ...............................................................................................................................................17 LCD board ...............................................................................................................................................17 USB PICmicro® microcontroller multiprogrammer .................................................................................18 Switch board............................................................................................................................................18 Dual 7-segment display...........................................................................................................................18 USB PICmicro® microcontroller lite programmer ...................................................................................18 Power board.....................................................................................................................................19 infrared/IrDA transceiver board ...............................................................................................................19 SPI memory and D/A board ....................................................................................................................19 Keypad board ..........................................................................................................................................19 RS232 board ...........................................................................................................................................19 Prototype board.......................................................................................................................................20 Patch board .............................................................................................................................................20 CAN bus board.................................................................................................................................20 Atmel AVR board.....................................................................................................................................20 CPLD board.............................................................................................................................................21

Page 3: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

3

Motors driver board .................................................................................................................................21 Internet board ..........................................................................................................................................21 Bluetooth board .......................................................................................................................................22 X-10 home automation board..................................................................................................................22 CAN analyser terminal board ..................................................................................................................22 FPGA board ............................................................................................................................................22 ARM board ..............................................................................................................................................22 Opto-isolator board..................................................................................................................................23 SD card reader ........................................................................................................................................23 Relay board .............................................................................................................................................23 USB232 board.........................................................................................................................................23

6 E-block Accessories and sensors........................................................................................................24 IDC lead - standard .................................................................................................................................24 IDC lead - splitter.....................................................................................................................................24 IDC lead – male to male..........................................................................................................................24 Actuators training panel ..........................................................................................................................24 Storage trays ...........................................................................................................................................24 Metal backplanes ....................................................................................................................................25 Mobile phone module ..............................................................................................................................25

7 Software and courseware for E-blocks................................................................................................26 Programmable Logic Techniques ...........................................................................................................26 Flowcode for PICmicro® microcontrollers version 2.0............................................................................27 C for PICmicro® microcontrollers version 3.0.........................................................................................27 Assembly for PICmicro® microcontrollersversion 3.0.............................................................................28

8 Sensors compatible with the E-blocks system ....................................................................................29 Sensors available ....................................................................................................................................29 Working with sensors ..............................................................................................................................30

Page 4: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

4

1 An introduction to E-blocks™?

1.1 What are E-blocks™? Thank you for purchasing an E-block system or component. This document introduces you to the E-blocks concept and gives you information on how to use E-blocks. E-blocks are small circuit boards each of which contains a block of electronics that you would typically find in an electronic system. Each E-block performs a separate function as either an input sub-system, an output sub-system, an input/output sub-system or a processing sub-system. E-blocks can be put together to form a variety of systems that can be used for teaching and learning electronics and for the rapid prototyping of complex electronic systems. This document contains an introduction to E-blocks. A datasheet on each E-block board is also available in electronic format on CD ROM. Where software is supplied then a comprehensive help file (or course) is supplied which will tell you how to use it.

1.1.1 An example of an E-blocks system

Here you can see a fully working mobile phone that contains a Multiprogrammer Board which is used to program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates with a GPRS mobile phone unit (from Sony) with integral SIM card. This is a good example of how E-blocks can be used to build a dedicated training or development system. Within educational institutions this system is of great appeal: students are very interested in mobile phone technology and this is a good context in which to study microprocessor programming.

Page 5: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

5

1.2 How do E-blocks connect together? Each E-block has one or more 9 way D-type connectors that provide up to 8 input/output lines and a ground line. These D-type connectors allow connection between E-blocks to be made in buses of multiples of 8 lines – just like a real electronic system. Power is routed separately to those E-blocks that need it. Details of how this works are given in the section entitled ‘Electrical Attributes of E-blocks’ below.

1.3 How do processing E-blocks work? Processing E-blocks control the whole E-blocks system. PICmicro® microcontrollers are used as the preferred processor: these provide up to 5 E-block ports with up to 8 lines per port. CD ROM courses and utilities allow software to be written in Flowcharts, C or Assembly code. Details of these courses and utilities is given below.

1.4 How many E-blocks are available? At the end of 2005 the E-blocks family will consist of:

40 hardware E-blocks

6 CD ROM courses/programming utilities

30 Additional sensors

Various accessories such as clear acrylic covers, motors boards etc.

1.5 Why use E-blocks? E-blocks offer a number of advantages in teaching, learning and developing electronic systems:

Within an educational context E-blocks’ ability to easily form complex electronic systems means:

Students are motivated by working with ‘real’ systems

Students can go further, faster

Students can understand how electronic systems are built

Teachers can customise systems for their own particular requirements

Students can explore systems with more than one processor

The rapid prototyping facility E-blocks offer means:

It is easy to build an electronic system of your choice

Litle or no wiring is required

It is very quick to build a prototype system of your choice

Reusability of E-blocks for different projects can result in a considerable financial saving.

The range of software and courseware supplied with E-blocks means:

Software development tools (flowcharting, C and Assembly) are available to suit each kind of user

There is full support in terms of learning materials for first time users

The tight integration between Flowcode and E-blocks means:

Development times for systems are extremely rapid

Page 6: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

6

Learning curves for first time users are extremely short

Users can migrate to Assembly or C programming with ease as their applications become more

sophisticated

1.6 Where are E-blocks used?

1.6.1 Industrial use In industry E-blocks have a number of uses: 1.6.1.1 Rapid system prototyping in industry The modular nature of E-blocks and the wide variety of E-blocks compatible parts means that electronic systems can be assembled in a wide range of configurations with great speed. Once initial prototyping is complete then engineers can take E-blocks circuits (supplied with each E-blocks board) and software and develop a custom circuit board from the component parts in a very short time. Flowcode has implications here too: Flowcode converts flowcharts to PICmicro microcontroller code and is an extremely rapid development language. The use of flowcharts as a programming tool makes microcontroller technology accessible to those with little or no training. 1.6.1.2 Training in industry E-blocks hardware systems can be configured for a wide range of industries and the software solutions facilitate training in development of microcontroller systems in flowcharting, C or assembly, in CPLD/FPGA programming and in a number of other areas. The relatively low cost of E-blocks software and courseware packages makes training very low cost and all training packages are stand alone items which can be used without the academic support traditionally given by institutions.

1.6.2 Educational use 1.6.2.1 School: Technology studies In Technology studies students need to study systems and how they are controlled. In many courses they are required to understand how to use microprocessors and tend to use PICmicros as a context for understanding A variety of electronic systems. Using Flowcode with E-blocks students can build systems of surprisingly high functionality which mimic real life systems. 1.6.2.2 School 16 - 18 years: Electronics Most students opting for a two year course in electronics at schools will need to understand microprocessor operation and architecture including functions of ROM, RAM etc. There will be some quite in depth work here and a significant part of the course is likely to be a project. E-blocks are used with Assembly code programs to fulfill most of this part of the electronics syllabus. 1.6.2.3 FE Colleges / vocational schools 1.6.2.4 Universities in Universities E-blocks and programming software are used in many departments. Here are a few examples:

Page 7: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

7

• In chemical engineering E-blocks and sensors are used for experiments in process control and for developing process systems.

• In electronic engineering E-blocks are used for teaching C programming in a microcontroller context and for teaching about microprocessor systems. E-blocks also save a considerable amount of electronics departmental budget allocated to projects as they are reusable.

• In Computer Science departments E-blocks with Assembly for PICmicro microcontrollers courseware are used to teach students assembly code programming and to teach the inner workings of a microcontroller including fetch-execute cycles.

1.6.3 Hobbyist/home/student use There are several areas where E-blocks will be used in the home and by hobbyist: • For those wanting to design electronic systems • For robotics use • For home automation • For studying at home in conjunction with a formal electronics course

1.7 Where to find further information?

All information on E-blocks is available in Electronic format. Because of the wide range of parts in the E-blocks range the relevant information is supplied in layers with each layer containing more detail. This document contains the top layer of information: a general introduction to E-blocks and the E-blocks system of operation. Most E-blocks also have: • a marketing datasheet that tells you what the E-block will do • a technical datasheet which provides technical details on the E-blocks board and a circuit diagram. • a user text hex file that you can use to check your E-block is working properly – these are all written

for PICmicro microcontrollers • a C and ASM strategy guide which gives you an outline hint of how to get the E-block working – note

that actual code is not supplied • for many E-blocks an understanding of the chips used and their properties will also be important –

you will find device data on the web site of the appropriate chip manufacturer Each ‘upstream’ E-block is shipped with a mini CD ROM (code ELSAM) that has this data on. However ELSAM is only pressed every 6 months and will always be out of date. Because of this the most up to date versions of all documentation are available on the E-blocks members area of our web site. You will get a password for this area when you purchase E-blocks products.

1.7.1 Making sure your E-blocks work properly All E-blocks are tested at the factory before being shipped. When writing code for the first time there is often suspicion that it is not your code that is at fault – it is the fault of the device – or in this case the E-block. Because of this a hex routine for a PICmicro microcontroller that will allow you to test the E-block is functioning properly is made available. The hex routine can be downloaded to a PICmicro and the E-block in question can be tested. Test instructions are given in the technical datasheet. The hex test routine for each E-block can be found in the members area of our web site.

Page 8: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

8

2 Electrical attributes of E-blocks 2.1 How are E-blocks buses connected?

E-blocks are built on a bus based concept. Each E-block connection consists of 8 bits and ground – 9 connections in total. There are two types of E-block – ‘upstream’ and ‘downstream’ E-blocks. The word ‘upstream’ is used to describe items that have control of the flow of information in an electronic system. Any device which contains ’intelligence’ and can dictate the direction of flow of information on the bus can be thought of as an ‘upstream’ device. Examples include microcontroller boards, and Programmable Logic Device boards. Any device which responds to these changes and whose behaviour is determined by another device can be thought of as a ‘downstream’ device. Examples include LED boards, RS232 boards etc. In the E-blocks system it is important to understand which E-blocks are upstream and which are downstream because each uses different connectors – upstream devices connect using 9 way D-type sockets, and downstream devices connect to E-blocks using 9 way D-type plugs. This combination works remarkably well as most system topologies require upstream devices to connect directly to downstream ones. The following diagram shows the connections that can be made to the plugs and sockets. On each connector bit 0 is on pin 1, bit 7 is on pin 8 and pin 9 is designated 0V.

Where two upstream devices need to be connected together a gender changer or IDC cable with two IDC sockets on can be used.

2.2 Adding power Power connections are always routed separately between E-blocks using simple screw terminals. This facilitates the interoperation of E-blocks with different voltage levels (notably 3.3V and 5V) and power sources. Most upstream E-blocks have 5V outputs provided by a voltage regulator. These E-blocks are powered by applying a higher voltage via a power jack (usually positive outer) or using screw terminal blocks. As 0V is connected to all blocks through the 9 way D-type connectors it is only necessary to connect power to all E-blocks. Most upstream E-blocks have a regulator that produces 5V, and many downstream E-blocks have 5V loop through screw terminals which allow users to keep power wires tidy. Power wires can be looped under E-blocks and under the backplanes.

Page 9: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

9

2.3 Protecting E-blocks circuitry Where possible leaded components have been used for all devices on E-blocks boards that can be subjected to electrical damage. This means that in the case where devices on the E-blocks boards do become damaged that the task of replacing them is very simple. Some upstream boards (ARM processor boards and FPGA board) make use of surface mounted technology components which can not be socketed and which are not easy to solder. In these cases we have used smaller daughter board so that if the key device is broken then you can simply order a new daughter board. To protect upstream components all downstream E-blocks have been developed with protective resistors so that it is not possible to damage an upstream E-block by improperly declaring an input as an output, and having two output pins with different output levels, clash. However it will still be possible to damage some devices on the upstream boards when using screw terminal connectors and patch/prototype boards and care should be taken with all boards before any wiring is undertaken. Before making any changes to the wiring of your E-blocks system you would be well advises to turn power to the system off.

2.4 Supply voltage and voltage compatibility Most E-blocks systems are constructed using a standard 5V power supply. However with the increasing number of upstream devices using 3.3Vpower supplies every attempt has been made to make E-blocks compatible with both 5V and 3.3V. On some downstream E-blocks boards you will find link blocks to make a selection between 3.3V and 5V operation – the internet board is a good example of this. Some upstream boards can only operate of 3.3V – for example the FPGA board. The following table shows the status of current E-blocks and whether they 3.3V compatible.

EB002 Screw Terminal board Yes EB003 Sensor board Partial - external sensors require +5V but on-board Pot and LDR can operate

from 3.3V EB004 LED board Yes EB005 LCD board Yes (original design was 5V only) EB006 Multiprogrammer No EB007 Switch board Yes EB008 7-Seg display board Yes EB010 Lite Programmer No EB011 Power board No EB012 IrDA board Yes EB013 SPI board Partial - FRAM fitted at factory is not but users can fit a 3.3V EPROM (25LC640)

to give 3.3V compatibility EB014 Keypad board Yes EB015 RS232 board Yes EB016 Proto board Yes EB017 Patch board Yes EB018 CAN board No EB019 AVR board No EB020CPLD board No EB023 Internet board Yes EB024 Bluetooth board Partial – interface is 3.3V compatible but board needs 5V supply EB030 FPGA board Yes EB031 Arm board No EB032 Codec board Yes - note that this board MUST be powered from the 3.3V when using directly

with the Bluetooth Board

Page 10: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

10

3 Physical attributes of E-blocks

3.1 Mounting on a backplane E-blocks can be mounted onto a metal backplane to form a completely rugged system. To facilitate this each E-block is fitted with 4 off 3 mm holes spaced at 20mm intervals. M3 bolts with spacers can be used to mount the E-blocks onto a backplane which has 4mm holes on a regular 20mm grid.

Mounting E-blocks onto backplane The spatial relationship between the mounting holes on the backplane, the holes on the E-blocks and the spacing of each D-type plug and socket on the E-blocks are such that each E-block will fit into another and yet still be mountable on the backplane. This is shown here:

Spatial relationship between D-type and 20mm grid.

3.2 Adding security and strength

In some circumstances it is advisable to only allow access to certain parts of the E-blocks boards. This includes situations where settings or chip selections made on E-blocks do not want changing, where

Page 11: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

11

there is a chance of vandalism or where there is a chance of theft of components on the E-blocks themselves. To facilitate this clear acrylic covers are available for all E-blocks as you can see here with the USB PICmicro microcontroller multiprogrammer:

These are mounted onto E-blocks with 25mm M3 bolts and 10mm spacers using the same grid of holes that are used for mounting the E-blocks to the backplane. The following cross section diagram shows how this is done:

Cross section of mounting details showing acrylic cover

The tight fitting clear acrylic covers add considerable strength to each E-block as well as making them – to some extent – tamper proof. The exception to this is the switch board which, because the switches are relatively short, requires the spacers to be replaced with M3 lock nuts before the cover is put into place. This can be seen in the following diagram:

Page 12: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

12

3.2.1 Setting up an E-blocks system There are several choices in terms of physically using E-blocks. 3.2.1.1 On the bench You do not need a backplane to use E-blocks – you can simple connect them together on the bench. In each E-blocks package you will find a four small rubber feet to facilitate this – these will provide a degree of protection for your E-blocks boards and will help prevent shorts from tinned copper wire and other metal objects on the bench. 3.2.1.2 On a backplane – flexible If you are reconfiguring your E-blocks system regularly or you want others to go through the process of doing this then we suggest that you use steel or Nylon M3 bolts on all your E-blocks and that you use a backplane to allow them to be mounted at an angle which is more conducive for experimentation and projects. The E-blocks can be mounted on the backplane and will stay in position without using securing bolts behind the backplane – although if you are going to move them around then one or two nuts on the back will ensure your E-blocks stay in place. The diagram below shows 12mm bolts with self locking nuts – these will keep the bolts secured onto the circuit board and will allow you to position the boards on the backplane as you wish..

For best results with this mounting technique you should attach the nuts and self locking bolts and then slacken off the nuts by a quarter turn – this allows the bolts a little movement in the PCB mounting holes and makes them easier to take off the backplane. If you are concerned about the finish of your backplane then you can substitute the steel bolts with nylon ones. However we have found the powder coating of the backplanes is sufficiently strong not to warrant this. 3.2.1.3 On a backplane - permanent If you are permanently mounting the E-blocks on a backplane then we suggest you use a minimum of two self locking nuts for each E-blocks board.

3.2.2 Using ZIF sockets It is possible to use Zero Force Insertion sockets with the E-Blocks PICmicro Multiprogrammer and other programmers in the E-blocks range. ZIF sockets are useful where the chips will be removed from the programmer many times. ZIF sockets are available from many vendors and can be inserted into the DIL sockets on the upstream boards. Some E-blocks boards may have other components close to the DIL socket in question. If this is the case then you can simply insert additional DIL sockets to gain enough height so that the ZIF socket can be satisfactorily inserted.

Page 13: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

13

3.2.3 Understanding the patch system Most ‘downstream’ E-blocks include a patch system that gives you flexibility in the connections that are made between the upstream and downstream E-blocks. The patch system has two parts: link blocks that dictate whether the default connections are used or whether the patch system is used, and the patch connectors themselves. Looking at this graphic of the sensors board:

eblocksSensors

01234567

GND

For this board when the link blocks are in the ‘default’ position then the default wiring is chosen. Default wiring is optimized for ease of connection between upstream and downstream boards for the PICmicro range of processors. For example the Tx and Rx lines of the PICmicro are usually on bits 6 and 7 respectively, so you will find that the default conections on downstream boards communications boards (e.g.RS232 board) are for bits 6 and 7. For the A/D board shown above the default connections are as follows: Bit 0 LDR Bit 1 RV1 Bit 2 Digital sensor out Bit 3 Analogue sensor Bit 4 Digital sensor in The bits 0 – 4 have been chosen because on many devices in the PICmicro range the A/D inputs are on bits 0 to 4 of the port. If you wanted to use another processor that needed the LDR input on bit 3 then you would change the link from the ‘default’ position to the ‘patch’ position and use a small jumper wire to make the connection between the LDR output and bit 3 of the D-type as shown in the drawing below:

eblocksSensors

01234567

GND

The patch system is designed to allow you to make any combination of connections between the upstream and downstream boards.

Page 14: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

14

3.2.4 Sharing a port There are times when you need to split a port into several sections, or where signals on a port need to be shared between two or more downstream E-blocks boards. In this case you need to use a splitter cable. As an example of this: supposing that you wanted to develop a system that used two external analogue sensors. The Sensor board only has the capability for one external analogue sensor, so you need to use a splitter cable and the patch system to make the appropriate connections. The resulting system would look something like this:

eblocksSensors

01234567

LDRRV1ANA SEND IN

GND

D OUT

DEFAULT

PATCH

eblocksSensors

01234567

LDRRV1ANA SEND IN

GND

D OUT

DEFAULT

PATCH

The splitter cable allows you to connect one upstream port to two downstream ports using IDC connectors and ribbon cable. You can see that the analogue sensor input on the top board is the default connection – bit 3. On the lower board the link blocks are moved to the ‘patch’ position and a small wire is used to connect the second analogue sensor to bit 2. The resulting system allows you to connect one analogue sensor to bit 3 and the other to bit 2 on the upstream board.

3.2.5 Developing your own circuits for E-blocks Whilst every attempt has been made to provide a wide selection of E-blocks boards, it is likely that there will be occasions where you will need to develop circuits of your own. With this in mind you can add small sections of circuitry using the Prototype board or patch boards which each have two downstream D-type connectors.

Page 15: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

15

4 Examples of systems that can be built with E-blocks This section gives details of some systems that can be built with E-blocks:

4.1 Remote phone snooper / baby alarm

Port A

Port

D

RV1

SW

1S

W2

Port

C

Port B

J6

J5

Port

E

8 pi

n

RESET

eblocks

USB multiprogrammerEB006001

1

40

PB1

X1

0V+V

+V+14V

LED1

ONLY INSERT 1 CHIP AT A TIME

ONLY INSERT 1 CHIP AT A TIME

U18

U28

U40

U8/14

J1

U1

J3

RC XTAL

SLOW FAST

RC F

REQ

. CON

TROL

USB

ICD2

USB

PSU

eblockslcd

0V5V

eblockskeypad

eblocksRS232

01234567

0V5V

RXTXRTSCTS

0V 5V

eblocks

proto

01234567

01234567

www.m

atrix

mult

imedia

.co.u

k

4.2 Ultrasonic measuring system

Port A

Port

D

RV1

SW

1S

W2

Port

C

Port B

J6

J5

Port

E

8 pi

n

RESET

eblocks

USB multiprogrammerEB006001

1

40

PB1

X1

0V+V

+V+14V

LED1

ONLY INSERT 1 CHIP AT A TIME

ONLY INSERT 1 CHIP AT A TIME

U18

U28

U40

U8/14

J1

U1

J3

RC XTAL

SLOW FAST

RC

FREQ

. CO

NTRO

L

USB

ICD2

USB

PSU

eblockslcd

0V5V

eblockskeypad

eblocksSensors

01234567

GND

4.3 PC based ECG and heart rate monitor

Port A

Port

D

RV1

SW

1S

W2

Port

C

Port B

J6

J5

Port

E

8 pi

n

RESET

eblocks

USB multiprogrammerEB006001

1

40

PB1

X1

0V+V

+V+14V

LED1

ONLY INSERT 1 CHIP AT A TIME

ONLY INSERT 1 CHIP AT A TIME

U18

U28

U40

U8/14

J1

U1

J3

RC XTAL

SLOW FAST

RC

FREQ

. CON

TRO

L

USB

ICD2

USB

PSU

eblockslcd

0V5V

eblockskeypad

eblocksRS232

01234567

0V5V

RXTXRTSCTS

eblocksSensors

01234567

LDRRV1ANA SEND IN

GND

D OUT

DEFAULT

PATCH

This system allows anxious parents to check up on their children using their mobile phone – a sort of remote baby alarm. The system we propose, shown in the diagram above, uses a PICmicro Multiprogrammer with an ‘877 device, a keypad, LCD display, patch board for some audio circuitry and a Sony GSM module with integral SIM card. The audio circuitry on the patch board contains a small microphone and a rail-to-rail quad op-amp which feeds the audio into the A/D converter on the PICmicro and also amplifies the audio and feeds it into the GSM module.

Flowcode macros can be used to control the mobile phone module.

This diagram shows an ultrasonic measuring system. This can be developed to create an ultrasonic system that measures distance (such as those used by estate agents) or to develop a system that gives a warning when the distance falls below a pre-set amount ( such as those used by cars for reversing distance warning systems). The system consists of a Multiprogrammer board, LED board, Sensor board, 7-segment display board, and an Ultrasonic sensor.

This system uses an Electro-cardiogram sensor to display heart rate on the local LCD display and to allow ECG data to be displayed on a PC. This system consists of a PICmicro microcontroller programmer that is controlled by a key pad. Data from the ECG monitor is passed to the microcontroller through a sensor board. Heart rate is displayed on the LCD display and ECG data is passed to the PC via the RS232 board. PC based software will need to be written to show time varying ECG data.

Page 16: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

16

4.4 Internet temperature logger

Port A

Port

D

RV1

SW

1S

W2

Port

C

Port B

J6

J5

Port

E

8 pi

nRESET

eblocks

USB multiprogrammerEB006001

1

40

PB1

X1

0V+V

+V+14V

LED1

ONLY INSERT 1 CHIP AT A TIME

ONLY INSERT 1 CHIP AT A TIME

U18

U28

U40

U8/14

J1U

1

J3

RC XTAL

SLOW FAST

RC

FREQ

. CON

TRO

L

USB

ICD2

USB

PSU

eblockslcd

0V5V

eblocksSensors

01234567

GND

0V5V

5V01234567

SD

AS

CL

/INT

eblocks

Internet b

oard

EB-0

23-0

0-1

4.5 CPLD programming system

1 2 30

eblocks7-seg display

www.matrixmultimedia.co.uk

0V5V

J4

eblocksLEDs

www.matrixmultimedia.co.uk

D0D1D2D3D4D5D6D7

eblocksswitches

www.matrixmultimedia.co.uk

0V5V 5V

S0S1S2S3S4S5S6S7

J3

eblocks

Advanced logicEB006001

J10 J7

0V +5V +5V +14VINOUTOUT

This system uses an Electro-cardiogram sensor to display heart rate on the local LCD display and to allow ECG data to be displayed on a PC. This system consists of a PICmicro microcontroller programmer that is controlled by a key pad. Data from the ECG monitor is passed to the microcontroller through a sensor board. Heart rate is displayed on the LCD display and ECG data is passed to the PC via the RS232 board. PC based software will need to be written to show time varying ECG data. Flowcode macros allow a rapid development path for the internet board.

This is a simple system that shows how the E-blocks CPLD development board can be incorporated onto the backplane and used with simple E-block boards – in this case a switch board, an LED board, and a quad 7-segment display board.

Page 17: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

17

5 Description of individual E-blocks This section lists the E-blocks that are currently available in their part number order. We have also listed here some additional E-blocks that are planned for production in late 2005.

Screw terminal board

Sensor interface

LED board

LCD board

Contains 8 LEDs with upstream and downstream D-type connectors. Further E-blocks can be connected to this E-block, but care must be taken as LEDs may affect voltage levels on the bus.

• 8 screw terminals • Allows connection to E-blocks with bare wires

This small circuit board allows connection to all 8 pins of a standard E-blocks port with bare wires using screw terminals.

This E-block contains a variable resistor and a simple light sensor which can be used for simple analogue experiments. It also contains sockets which allow users to interface to our range of more than 30 sensors.

• Supports more than 30 sensors • On-board light sensor • On-board potential divider

• 8 LEDs • Upstream and downstream connectors

16 character, 2 line alphanumeric LCD display on a 4 wire bus. Flowcode macros for driving this E-block are available.

• 2 lines,16 characters per line • Contract control

Page 18: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

18

USB PICmicro® microcontroller multiprogrammer

Switch board

Dual 7-segment display

USB PICmicro® microcontroller lite programmer

• E-blocks compatible • Low cost • Used as a programmer and as a development

board • Programs a wide range of PICmicro MCU

devices • Programming software provided • RC or Xtal operation • 5 I/O ports • Interchangeable crystal

This new PICmicro microcontroller programmer connects to your PC via USB to provide you with one of the World’s lowest cost and most flexible PICmicro® microcontroller programmers. This board can be used with Assembly, C or Flowcode programming utilities provided by Matrix Multimedia. The board will program most 8, 14, 18, 28 and 40 pin PICmicro microcontroller devices using the flexible programming software provided – PPP - and provides ‘clean’ access to all I/O lines on the relevant PICmicro MCU devices. A complete customised solution for development or training purposes can be built using this board and other E-blocks.

• E-blocks compatible • Ultra-low cost for student projects and comms. work • Used as a programmer and as a development board • Programs selected 18 pin devices • Includes free Lite versions of programming utilities • 2 I/O ports • Fitted with PIC16F88 as standard

This new low cost programmer connects to your PC via USB and can be used with Assembly, C or Flowcode programming utilities. Lite versions of these products are shipped with the product. This programmer has been designed for use where an ultra-low cost PICmicro MCU device is required. The Lite programmer gives access to two PICmicro ports and can be powered from the USB port or (where more current is required) from an external power supply. This programmer is compatible with a number of 18 pin devices including the 16F627, 16F628, and 16F88.

Contains 8 push-to-make switches with upstream and downstream D-type connectors. Further E-blocks can be connected to this E-block.

• 8 push-to-make switches • Upstream and downstream connectors

Quad 7-segment common-anode display with an option to operate off one port using links. Flowcode macros for driving this E-block are available.

• Quad common anode displays • Multiplexed characters – needs 2 ports

Page 19: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

19

Power board

infrared/IrDA transceiver board

SPI memory and D/A board

Keypad board

RS232 board

This highly sophisticated E-block contains a small infrared transmitter receiver device as well as an IRDA decoder stack. This E-block allows communication links to be set up between E-blocks on a low level or high level basis. This E-block also supports the IRDA protocol which is used on lap tops, Windows CE devices and Palm compatible computers. Flowcode macros for driving this E-block are available.

• Flexible infrared development board • Allows low level IR communication • User selectable baud rates • On-board IrDA devices

• Includes Non-Volatile Memory • Includes Digital to Analogue converter • Flowcode macros available

This E-block contains an 8k byte SPI (Serial Peripheral Interface) compatible serial memory and D/A converter chip. The board can be used to provide additional memory or D/A features into an E-block system.

A simple 4x3 keypad that allows data entry into bus based systems. Flowcode macros for driving this E-block are available.

• 4 by 3 keypad for E-blocks

This E-block provides an RS232 interface which can be used to facilitate communication between PICmicro microcontroller and third party devices like PC serial ports, mobile communications systems etc. Flowcode macros for driving this E-block are available.

• Allows communication with PCs • Allows communication with other RS232 devices

• E-blocks compatible • 8 power outputs • push or pull • auto-resetting electronic fuses

The E-blocks power board contains two L293 four channel push pull channel driver chips which can be used for general purpose power outputs for driving lamps or motors - including stepper motors. The board supplies 8 power outputs which can be used to sink or source 500mA at up to 36V. Each output is fitted with an inline resettable fuse to ensure that the L293 devices are adequately protected against short circuits.

Page 20: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

20

Prototype board

Patch board

CAN bus board

Atmel AVR board

This E-block contains a small prototype board for developing circuits and projects. Connectors for two E-block ports allow prototype wires and leads to be connected to the rows and columns on the prototype board.

This very low cost E-block can be used for developing permanent circuits that connect into the E-blocks system. The multitude of holes on the patch board allow components to be soldered onto the board and wired into the D-type connectors.

• 29 * 10 hole proto area • Separate lines for power rails • Patch area for non-proto components

• 40 * 18 hole patch area • Separate lines for power rails • Can be used to make you own rugged E-block

This E-block is designed to allow a CAN bus communications system to be easily set up using a wide range of microcontroller devices - even those without embedded CAN functions. The board includes both a CAN Controller and a CAN Transceiver and uses the high speed SPI bus to configure the CAN controller for transmitting and receiving CAN information. The host microcontroller must therefore have an SPI bus module. The CAN transceiver converts the CAN controller signals into differential signal level used by the CAN bus, and vice-versa.

• Transmit and receive messages via CAN bus • Allows processors with no CAN module access to the CAN bus • 3 test switches and 2 test LEDs • Uses SPI bus for all configuration

The AVR Multiprogrammer contains several items: a CD ROM containing development tools, an in-system programmer and an E-blocks AVR board. The ISP programmer connects to your serial port and to the board which is compatible with 20 and 40 pin AVR devices. The board itself (code EB019) supplies 4 full E-block sports and all pins are available on a 40 pin header. The CD ROM includes a range of development tools including an Integrated Development Environment for code writing in assembly and debugging, a professional C compiler, and the ISP programming software.

• A complete AVR development solution • Programs and executes AVR code • Includes full IDE and C compiler

Page 21: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

21

CPLD board

Motors driver board

Internet board

This E-blocks board contains a 128 macrocell 7000 series CPLD from Altera which can e programmed using the parallel port on your PC. The board has 7 E-blocks ports which can be used to interface to other E-blocks components. A clear protective acrylic cover for this E-block is available.

• Programs CPLDs and 'runs' the CPLD code • Provides 7 x 8 bit ports • Free Quartus II Web Edition software from Altera

Based on the W3100A hardwired TCP/IP stack chip from WizNET, this E-blocks board adds Ethernet functionality to an existing microprocessor based system without the necessity of a developing the TCP/IP software stack. As well as the Ethernet protocol the module supports 10/100 connection and a number of protocols including UDP, IP, ARP, ICMP, DCHP, ARP, DLC and MAC. The unit interfaces to a microprocessor using I2C serial communication. The patch jumpers on the board allow more than one Ethernet module to be connected to the I2C bus. Flowcode macros for his E-block are available.

• Flexible internet development board • Facilitates web page design and email functions • Flowcode macros available

• Drives two motors at up to 4A • Digital encoder feedback • Current sensing feedback

This E-block board is based on the L298 device which can drive two motors operating off up to 46V at up to 4A each.This device has a low saturation voltage, high noise immunity and has in-built over temperature protection. The board can be used in a variety of motor control configurations including PID control.

Page 22: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

22

Bluetooth board

X-10 home automation board

CAN analyser terminal board

No picture

FPGA board

ARM board

This E-block is designed to facilitate the use of X10 mains-borne communication using E-block compatible embedded systems. The circuit board provides a connection between an upstream E-blocks board and a standard X10 mainsborne transceiver using an RJ11 connector and lead. The board conditions signals for E-blocks and provides protection for the E-blocks system.

• Links X10 transceivers to E-blocks systems • Provides protection for the E-blocks system

This simple board provides a connection between two screw terminal pins and a 9 way D-type connector for the Kvaser CAN analyser.

This FPGA daughter board sits on top of the existing E-blocks CPLD programming board (EB020) to provide 7 full E-blocks ports which can interface to other E-blocks: from simple LED and switch boards through to more complex boards like internet interfaces, IrDA communication systems, internet and Bluetooth boards. The FPGA daughter board itself can be removed from the CPLD board to provide a leaded component that can be used in your own projects (serial memory programmer required). This solves the difficult issue of handling FPGA packages which are difficult to solder. The FPGA device used is Altera’s EP1C3 FPGA which contains 3000 logic elements.

• Works with free Quartus II Web edition software • Can be used with block diagrams, VHDL or Verilog • 3000 logic Elements – 5KLE device available • Fits onto EB020 and can be used a component in projects

Details not available at the time of going to press.

Details not available at the time of going to press.

Page 23: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

23

Opto-isolator board

SD card reader

Relay board

USB232 board

Details not available at the time of going to press.

Details not available at the time of going to press.

Details not available at the time of going to press.

Details not available at the time of going to press.

Page 24: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

24

6 E-block Accessories and sensors

IDC lead - standard

IDC lead - splitter

IDC lead – male to male

Picture not available

Actuators training panel

Storage trays

Storage trays for E-blocks and E-blocks solutions are available. Additional furniture for storing multiple trays is also available.

IDC leads can be used to connect E-blocks together using 9 way ribbon cable. This is useful where mechanical constraints mean that the on-board 9 way male and female D-type connectors can not snapped together. EB634 is our basic lead, the EB635 lead splits the E-blocks bus into two to allow two downstream boards to be connected to a single upstream board. The EB251 lead is a male to male IDC ribbon cable which allows two ‘upstream’ E-blocks to be connected together.

The Actuators training panel contains several types of motor which students are encouraged to write a range of programs for: a 7.5 degree/step stepper motor, a 120 degree servo motor, and a bi-directional DC motor with gearbox and rotational feedback. Flowcode macros are available for servo control. A new version of the Actuators training panel includes an E-blocks 9 way D type.

The EB635 lead splits the E-blocks bus into two to allow two downstream boards to be connected to a single upstream board.

The EB251 lead is a male to male IDC ribbon cable which allows two ‘upstream’ E-blocks to be connected together.

Page 25: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

25

Metal backplanes

Mobile phone module

This GPRS mobile phone unit can be added to any E-blocks system with an RS232 E-block board. The module is supplied with antenna, power supply, cables and a CD with documentation. SIM card not included. Flowcode macros for this unit are available.

Metal backplanes for E-blocks are available. E-blocks can be snapped together to form an electronic system and then bolted to the backplane (using M3 nuts and bolts) for security or to make the final system more rugged. BP232 backplane has 18 by 13 holes at 20mm intervals. Backplanes can be joined together to form a larger area should it be required. Backplanes can also be locked down using Kingston lap top locks.

Page 26: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

26

7 Software and courseware for E-blocks

Programmable Logic Techniques Helps you create advanced logic solutions

• Complete guide to logic design using Quartus II • Includes example projects • Includes courses in both Verilog and VHDL • A modern way to learn digital electronics design

Quartus II design software allows rapid

development of CPLDs in block diagram, VHDL or Verilog format.

The CD ROM includes:

…information on the structure of PLDs…

…tutorials on designing CPLD and FPGAs with conventional block diagrams…

…as well as example files, and Quartus II Web

edition itself.

This CD ROM gives a thorough introduction to programmable logic design techniques to CPLD and FPGA programming using Altera's Quartus II Web Edition software. The CD starts with an introduction to designing with Quartus II using block diagrams, at basic and intermediate levels. Then the CD ROM takes students through the process of developing combinational and sequential logic designs using both Verilog and VHDL descriptor languages. The CD is suitable for those who have some experience of digital logic and want to get to grips with modern CPLD and FPGA techniques. A number of example projects in block diagrams, Verilog and VHDL are included.

Page 27: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

27

Flowcode for PICmicro® microcontrollers version 2.0

Allows those with no programming skills to design complex electronic systems

C for PICmicro® microcontrollers version 3.0 A complete solution for learning and teaching C programming for PICmicro microcontrollers.

• Requires no programming experience • Allows complex PICmicro microcontrollers to be designed

quickly • Uses international standard flow chart symbols (ISO5807) • Full on-screen simulation allows debugging and speeds up

the development process • Produces ASM code for a range of 18, 28 and 40 pin devices • Free course online • Integrates tightly with the E-blocks system

24 hour clock with LCD display

Simple light chaser construction

Flowcode is a very high level language programming system for PICmicro microcontrollers based on flowcharts. Flowcode allows newcomers to programming to design and simulate complex robotics and control systems in a matter of minutes. Flowcode is a powerful language that uses macros to facilitate the control of complex devices like 7-segment displays, motor controllers, and LCD displays. The use of macros allows students to control highly complex electronic devices without getting bogged down in understanding the programming involved. Flowlog is a powerful rapid development tool and is also useful as a means of introducing the need for C and assembly programming. The following devices are supported: 12C67x, 12F629, 12F675, 16F630, 16F676, 16F7x, 16F8x, 16F81x, 16F87x, 16F62x, 16C5x, 16C6x, 16C7x. New features in version 2 include: arrays, improved LCD handling, RS232 comms, IDRA comms, Keypad control, multiple servo control, on-board EEPROM routines and a wider range of supported PICmicro microcontrollers.

• Includes a new version of our budget C compiler and IDE • New analogue sections • Complete course in C as well as C programming for

PICmicro microcontrollers • Highly interactive course • Virtual C PICmicro improves understanding • Includes MPLAB software • Compatible with most PICmicro programmers

The virtual PICmicro microcontroller

The IDE and C compiler

This new version of our popular C for PICmicro microcontrollers CD ROM is designed for students and professionals who need to learn how to program embedded microcontrollers in C. The CD contains a full course as well as all the software tools needed to create hex code for a wide range of PICmicro devices - including a full C compiler and an Integrated Development Environment (IDE). The C compiler on this CD ROM is compatible with most 12xxx series and 16xxx series PICmicro microcontroller devices. The compiler on this product is for educational use only. Those wanting to produce commercial products using the compiler will need to purchase a commercial licence. This new version includes new sections on programming analogue PICmicro microcontrollers and an updated C compiler and IDE.

The software on the CD

C2C IDE An Integrated Development Environment where you develop your code

C2C C compiler

Compiles any code into MPASM code

MPLAB assembler

Assembles MPASM code into Hex

PPP send program

Sends Hex into a PICmicro device

HTML course HTML courseware pages with all tutorials and interactive Virtual C PICmicro microcontroller

This CD ROM contains a complete course as well as a number of separate software items:

The software on the CD

Flowcode Core software

C2C C compiler

Compiles any code into MPASM code (no IDE)

MPLAB assembler

Assembled MPASM code into Hex

PPP send program

Dumps Hex into a PICmicro device

30 sample files

Flowcode sample files can be used to learn how Flowcode works

This CD ROM contains lots of sample files (which can be used to learn how Flowcode works) as well as a number of separate software items:

Page 28: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

28

Assembly for PICmicro® microcontrollersversion 3.0 A complete solution for learning and teaching assembly code programming for PICmicro microcontrollers

• Comprehensive instruction through 39 tutorial sections • Includes a Virtual PICmicro microcontroller: a fully functioning

simulator • Tests, exercises and projects covering a wide range of

PICmicro applications • Includes MPLAB assembler • Includes fully operational virtual PICmicro •

The Virtual PICmicro microcontroller Typical tutorial screen

Assembly for PICmicro microcontrollers V3.0 contains a complete course in programming the PICmicro microcontroller from Arizona Microchip. It starts with fundamental concepts and extends up to complex programs including watchdog timers, interrupts and sleep modes. The CD makes use of the latest simulation techniques which provide a superb tool for learning: the Virtual PICmicro microcontroller. This is a simulation tool that allows users to write and execute assembly code for the PIC16F84 microcontroller on-screen. Using this students can actually see what happens inside the PICmicro microcontroller as each instruction is executed. This enhances understanding, retains student interest, and is a great debug tool.

Contents of the CD ROM

IDE An Integrated Development Environment where you develop your code

MPLAB assembler

Assembles MPASM code into Hex

PPP send program

Dumps Hex into a PICmicro device

HTML course

This CD ROM contains a complete course as well as a number of separate software items:

Virtual PICmicro

A simulation tool that allows you to develop code and see each line execute

HTML courseware pages with all tutorials

Page 29: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

29

8 Sensors compatible with the E-blocks system Sensors available

Using the Sensor interface board E-blocks can be used with a superb range of over 30 sensors and attachments. These sensors are designed primarily for experimentation, and are rugged and well built.

Barometer

Current probe

Dual range force sensor

Differential voltage probe

ECG sensor

Heart rate monitor

Gas pressure sensor

Instrumentation amplifier

Low g accelerometer

Motion detector

O2 sensor

Magnetic field sensor

pH sensor

Temperature probe

Product Code Bar Tape HSTAPE Barometer HSBAR Colourimeter HSCOL Conductivity probe HSCON Current probe HSDCP Differential voltage probe HSDVP Dissolved oxygen probe HSDO Dual-range force sensor HSDFS ECG electrodes HPELEC ECG sensor HPEKG Extra long temperature probe HSTPL Fast response photogate HSVPG Flow rate sensor HSFLO Gas pressure sensor HSGPS Heart Rate Monitor HSEHR Instrumentation amplifier HSINA Low-g accelerometer HSACC magnetic field sensor HSMG Microphone HSMCA Motion Detector HSMD O2 gas sensor HSO2 pH sensor and amplifier HSPH Picket Fence HSPF Radiation Monitor HSRM Relative humidity sensor HSRH Respiration monitor belt (requires gas pressure sensor)

HSRMB

Rotary Motion sensor HSRMS Smart Pulley Attachement HSSPA Thermocouple HSTCA Three range light sensor HSLS Turbidity sensor HSTRB Wide range stainless steel temperature probe

HSTMP

Page 30: User’s guide EB355 - E-blocks users guide.pdf · program a 40 pin PIC16F877 device. This is connected to an LCD display, a keypad, and an RS232 E-block. The RS232 E-block communicates

E-blocks™

30

Working with sensors There are two types of sensor – analogue and digital. Working with digital sensors is usually fairly straight forward as the programs you write need to make calculations based on the timing between signals etc. For example: with a distance/motion sensor the program you write needs to send a pulse to the sensor and then time the interval between that pulse and a return pulse. The outgoing pulse triggers a burst of ultrasonic sound which is emitted from the sensor. The burst of ultrasonic sound travels to the target device and back. When the sensor detects the returning burst of sound it emits a return pulse on the digital output from the sensor. The distance between the sensor and the target can be calculated by taking the speed of sound (331m/s) and multiplying this by half the time interval between transmit pulse and receive pulse. However doing ‘live’ calculations in an 8 bit micro based on a delay in ms and the speed of sound is going to be a challenge, and in practice you may want to use a look up table or an approximation technique. Analogue sensors require a very varied range of algorithms which will depend on the sensor in question. For each sensor you will be supplied with a datasheet that will indicate what the analogue voltage from the sensor represents. For a device like a heart rate monitor the output from the sensor is a simple voltage pulse waveform for each beat of the heart. Your program needs to ‘slice’ this data at an appropriate value of the A/D inputs on the processor, and then do some calculations of time between pulses which will allow you to calculate heart rate. You will also have other considerations concerning sample rate, developing routines which give the average heart rate – rather than instantaneous – and so on. For many sensors the voltage output can be directly related to a real world value. In this case the formula for calculating the real world value from the voltage will be given on the datasheet supplied with the sensor. For example: The temperature sensor contains an NTC resistor which converts to temperature in the following equation: T=[K0+K1(ln1000R) +K2(ln1000R)3]-1 -273.15 Where K0=1.02119 x 10-3, K1=2.22468 x 10-4, K2=1.33342 x 10-47, and R is the NTC resistance and the corresponding resistor in the potential divider chain on the E-blocks sensor board is 10k ohm. Using this information you can compile a spreadsheet in Excel that will tell you the analogue voltage (assuming a 5 V power supply is used), and then (assuming a 10 bit A/D is used) you can calculate each A/D reading between 0 to 1024 and the corresponding temperature. How you proceed from here depends on the program you want to make: if you are using the temperature probe to make control decisions then you may want to work out the values between 0 and 1024 that are relevant to you. If you want to display temperature then you may need to develop some kind of look up table relating A/D reading to temperature value for display on a LCD.