Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
EXPERIENCE
INCREDIBLE
PERFORMANCE
pg. 1
CONTENTS
pg. 2
Contents
1
INTRODUCTION ............................................................................................................................................... 4
Connectivity.............................................................................................................................................. 6
2.2
2.3
2.4
2.4.1
2.4.2
2.4.3
2.5
3
3.2
5.2
5.3
5.4
Resources ...................................................................................................................................................... 31
Glossary ......................................................................................................................................................... 32
pg. 3
1 INTRODUCTION
SingleTact is a single element tactile pressure sensor that accurately and reliably quantifies applied
force combined with a simple interface board offering a 0 to 2V analog output for immediate Data
Acquisition (DAQ) integration and an I2C based interface for integration into embedded systems.
This document provides all the information necessary to interface with the SingleTact including a
sample Arduino digital interface and simple C# PC DAQ software (see EXAMPLE USE CASE)
All source code is open source and can be downloaded from: www.singletact.com.
Figure 1 SingleTact Sensor and Interface Board
MCU
SingleTact.com
5
6
7
8
4
3
2
1
SingleTact.com
MCU
Analog
Measurement
5 4
6 3
7 2
8 1
IC
SingleTact.com
MCU
5 4
6 3
7 2
8 1
UNO
IC
SingleTact.com
SingleTact.com
MCU
5 4
6 3
7 2
8 1
User
Hardware
User Hardware
including C8051F717
*1 In addition to the data acquisition example, a .NET library is available to download for simple integration into a users
own software suite. See Example .NET API.
*2 Supports over 100 SingleTact interface boards on a single I2C bus. The interface board firmware is open source and
can be optimized to users requirements as required. See UPDATING THE INTERFACE BOARD.
*3 Users may choose to integrate the Silicon Labs C8051F717 Capacitance to Digital converter as used in the
SingleTact Interface. See UPDATING THE INTERFACE BOARD for firmware integration.
Copyright 2016 - www.SingleTact.com
pg. 4
2 INTERFACE DESIGN
pg. 5
2.1 Connectivity
The sensor is plugged into the FFC connector on the green interface board (the sensor connector
pads are facing upward). The connections are outlined in Figure 4.
Electrical parameters are outlined in Table 1.
Figure 3 Sensor Assembly
Note via orientation
MCU
SingleTact.com
5
6
7
8
4
3
2
1
PIN
NUMBER
CONNECTION
Programming (Clock)
Programming (Data)
Frame Sync
Analog Out
Ground
Vcc
Value
3.7 5V
100KHz or 400KHz
3 5V
0 2V (FSR output 0.5 1.5V)
>5K
3.3V CMOS output
>140Hz (dependent on C8051F717 settings)
pg. 6
2.0V
OVER
Analog Output
PRESSURE
1.5V
VALID
RANGE
0.5V
NEGATIVE
PRESSURE
0V
0
FSR
Force or Pressure
pg. 7
PIN
NUMBER
CONNECTION
No Connect
No Connect
No Connect
No Connect
No Connect
Analog Out
Ground
Vcc
pg. 8
111
128
Output
Sensor Data
Read Only
191
SETTING
Reserved
Reserved
*1
*1
Reserved
*1
pg. 9
BYTE
SETTING
10
11
12
13
Reserved
14
15
16-38
Reserved
39
40
41
42-90
Reserved
91
92-127
Reserved
128
129
130
131
132
133
pg. 10
BYTE
SETTING
Reserved
TO SENSOR
0x02
3 -> (N-1)
N (max 31)
pg. 11
TO SENSOR
0x01
FROM SENSOR
0 - 31*
pg. 12
The digital scaling value is a 16-bit value stored at register locations 10 and 11 (see Table 2). For
increased precision the digital scaling value can be adjusted in 0.01 increments. A value of 100
represents unity scaling (100 x 0.01).
The internal capacitance to digital converter (CDC) operates at 140 to 4000 Hz depending on the
capacitance sensor settings (in particular the number of accumulations).
Each time the CDC completes a measurement
The frame synchronization output (Frame Sync, Figure 4) goes high each time a new measurement is
available. This can be used to synchronize the I2C communications channel to the capacitance
sensor.
Alternatively, the sensor might be polled as quickly as possible over I2C. Since the frame index
increments with each frame it can be used to identify duplicate or missing data readings.
pg. 13
pg. 14
pg. 15
PIN
NUMBER
CONNECTION
Programmer Pin 4
(Programming Data)
Programmer Pin 7
(Programming Clock)
No Connect
No Connect
No Connect
No Connect
Programmer Pin 9
(Ground)
Programmer Pin 10
(Vcc)
pg. 16
10 8
pg. 17
Built/Make Project
Connect
Download
pg. 18
4 TROUBLESHOOTING SingleTact
1. Arduino UNO not detected by PC.
Arduino UNO requires to install a driver to communicate over USB port.
Follow the step-by-step instruction from https://www.arduino.cc/en/Guide/HomePage.
2. Invalid setting error on PC (Error popup reports Failed to set).
Likely reason:
faulty pin connection.
3. Silicon labs IDE cannot connect 8-bit USB debug adapter (Error popup
reports Detected un-supported target revision).
-
pg. 19
5.
pg. 20
pg. 21
Note: USB communication may need additional driver installation from Arduino software package.
See https://www.arduino.cc/en/Guide/Windows#toc4 for further information.
pg. 22
PIN NUMBER
CONNECTION
No Connect
No Connect
No Connect
No Connect
*Note: Reference Gain will automatically change depending on the sensor size.
The PC application can be used to change the sensors I2C address and to modify its capacitive
sensing settings. For more information on these settings please refer to the I2C Interface section.
Copyright 2016 - www.SingleTact.com
pg. 23
UNO
USB Cable
Note: USB communication may need additional driver installation from Arduino software package.
See https://www.arduino.cc/en/Guide/Windows#toc4 for further information.
Follow the step-by-step instructions.
1. Go to File --->Open and open SingleTactDemo.ino
2. Go to Sketch --->Include Library --->Add .zip Library and select Timer1.zip
3. Go to Sketch --->Verify/Compile.
4. Go to Sketch --- > Upload*.
*Note: If you receive an error on Upload make sure the Arduino is selected under Tools --->Port.
pg. 24
pg. 25
N SingleTacts
1 Arduino Uno
Request data
(USB/UART)
Send sensor
data
Send new data to
PC
Scan
sensors*
Transfer
to output
buffer
and
timestam
p
repeats
repeats
repeats
*Scan cycle is
asynchronous
Command needs
I2C result?
New
Command?
Y
Y
Parse command
packet
Timestamp
reading*1
Relay commands
over I2C
Send result / ack to
PC
pg. 26
On the host, the Arduino appears as a virtual RS-232 serial device. Data is sent to/from the Arduino
using a serial API, such as the one available in .NET.
The Arduino calculates a timestamp for each packet using the Arduinos crystal controlled oscillator.
This can be used as the time for each sensor.
The serial commands, which mirror the raw I2C commands (as shown in blue in Figure 21), are
outlined in the following tables. Header and footer bytes are added to easily delimit serial packets. A
timeout can be specified for I2C transfers.
pg. 27
FROM PC TO ARDUINO
Header = 0xFF
Header = 0xFF
Header = 0xFF
Header = 0xFF
ID (echoed in reply)
12 + N
Footer = 0xFF
13 + N
Footer = 0xFF
14 + N
Footer = 0xFF
15 + N
Footer = 0xFF
pg. 28
FROM ARDUINO TO PC
Header = 0xFF
Header = 0xFF
Header = 0xFF
Header = 0xFF
1 if timeout exceeded
Timestamp MSB
Timestamp
Timestamp
10
Timestamp LSB
11
12 -> 12+N
I2C data
13+N
Footer = 0xFE
14+N
Footer = 0xFE
15+N
Footer = 0xFE
16+N
Footer = 0xFE
pg. 29
singleTact_.I2cAddressForCommunications = 0x04;
singleTact_.Initialise(arduinoSingleTactDriver);
//Start sensor
{//Process result}
NOTE: The sensor settings can be modified using commands such as:
singleTact_.Settings.ReferenceGain = ###
pg. 30
6 Resources
SingleTact homepage
http://www.singletact.com/
I2C-bus specification and user manual VERSION 6, April 2014
http://www.nxp.com/documents/user_manual/UM10204.pdf
Arduino home
https://www.arduino.cc/
Microsoft .NET Framework
https://www.microsoft.com/net
Silicon Labs C8051F717
http://www.silabs.com/products/mcu/8-bit/c8051f7xx/pages/C8051F717-GM.aspx
pg. 31
7 Glossary
API
CDC
DAQ
FFC
FSR
I2C
IDE
LSB
MSB
.NET
RS-232
pg. 32