BUZZ Click is a click board with a mikroBus form factor. It is substantially composed of a piezoelectric speaker having a resonant frequency at 3.8 kHz: this means we should expect best performances at this frequency. Let’s take a look to the principle of operation of DC and AC buzzer. continue reading…
The TTP229 is an integrated circuit for capacitive sensing designed specifically for touch pad controls. It provides stable sensing method covering different conditions.
1.1 Description and versions
The chip is a TSSOP-28 deigned to work with 8 or 16 key. It provide a direct interface if we use it in 8 key mode providing an output for pin for every key (So 8 direct output). When we want to use it in 16 key mode, the TSP229 provides a serial interface.
We can find two different version of the TTP229: BSF and LSF. Main difference is in serial communication: TTP229BSF uses a 2 wire serial, TTP229LSF uses a standard I2C.
We will provide a demonstration of uses with a 16 key capacitive touch pad. Our device uses a TTP229-BSF and these are related datasheet and schematics.
The TTP229 can work with a voltage between 2.4~5.5V, it provides some configuration and auto calibration for environment changing. Typical current consumption are in order of 2.0~2.5uA.
2.2 Pin description
Our touchpad provides direct output for direct connection (using key from 1 to 8 only) or the two wires serial interface (using all the 16 keys). Let’s we describe pin (Please refer to figure 1):
VCC, power supply 2.4~5.5V DC
GND, connection to ground
SCL, serial clock
SDO, serial data out
OUT1, direct output for key 1
OUT2, direct output for key 2
OUT3, direct output for key 3
OUT4, direct output for key 4
OUT5, direct output for key 5
OUT6, direct output for key 6
OUT7, direct output for key 7
OUT8, direct output for key 8
2.3 Choose the settings through the jumper
The TTP229 could be configured connecting some pin to GND using an high impedance resistor. These pin are pin TP0~TP7 corresponding to the same pin used as input for key1~key8.
Looking at schematic we can see that our PCB is already provided of 1MΩ resistors: we need just to make connections using jumpers. We have two header (see figure 2) named P1 (in red) and P2 (in green). Note that every header in enumerated from 1 to 8 (as example header 3 is in yellow). Connecting two contiguous header using a jumper we are actually connecting a pin of the TTP229 to GND though the 1MΩ resistor (R2 or R1). So we have different configuration connecting or not impedances to our chip using jumpers.
Let’s go to describe how we can choose TTP229 functionalities using headers. First of all consider that the enumeration assert where the header is connected: the header identified by number 1 is connected to TP0, 2 to TP1 and so on.
Let’s discuss all the available configuration:
CMOS or Open Drain selector. Select direct output gate: OD with jumper, CMOS otherwise;
Active High or Active Low selector. This pin manages more than a think. If CMOS output is selected, output is AL with jumper, AH otherwise. If OD output is selected, output is OD pull down with jumper, OD pull up otherwise. Furthermore this pin decides sampling edge for serial communication: rising edge with jumper, falling otherwise;
8 or 16 key selector. Selects number of keys: 16 keys with jumper, 8 otherwise;
Multi-key single key selector 1. Decides if keys 1~8 could be pressed simultaneously. Multi-key with jumper;
Multi-key single key selector 2. As above for keys 9~16;
Sampling rate in sleep mode selector. When device enter in sleep mode it wakes up checking pad periodically. This selects sampling rate when device is in sleep mode: sampling rate 64 Hz with jumper 8Hz otherwise;
Sampling period in sleep selector. Decides how long is sampling time, in sleep mode: 2ms with jumper 4ms otherwise;
Maximum key-on time. If a key is pressed for a long time most likely this is caused by charge accumulation. This option prevent malfunction resetting chip if a button is pressed for to much time: 80s with jumper, infinite otherwise.
In our case we just need to activate 16 keys mode adding a jumper on header number 3. continue reading…
The HD44780 is a controller for display developed by Hitachi commonly used to manage alphanumeric dot matrix LCD. This controller is a standard de-facto for this kind of display. It is often used in industrial test equipment, networking equipment, vending machine and in embedded projects.
Compatible LCD screens are manufactured in several standard configurations. Common sizes are one row of eight characters (1×8), as well as 16×2, 20×2 and 20×4 formats. Larger custom sizes are made with 32, 40 and 80 characters and with 1, 2, 4 or 8 lines. The most commonly manufactured larger configuration is 40×4 characters, which requires two individually addressable HD44780 controllers with expansion chips as a single HD44780 chip can only address up to 80 characters. A common smaller size is 16×2, and this size is readily available as surplus stock for makers and prototyping work.
1.2 Controller documentation
We want to provide a full library for HD44780 compatible with ChibiOS/HAL 3.0 ad a demo explaining gradually how software has been designed. This task requires a preliminary read of HD44780 datasheet.