Hands-free phone system with RN52 Bluetooth module and PIC24FJ64GB002 : Part2
A new board is assembled for this Hands-free phone system, which is equipped with a speaker unit but is not with a microphone unit yet. On the new board, the PIC microcontroller powers up the RN52 module automatically and controls audio-volume by “-” or “+” key of a keypad.
<< Introduction in Japanese >>
ブルートゥース・ハンズフリー通話の為の PIC24FJ64GB002 マイコン基板を新しく作成した。RN52 と 音声出力アンプはドーター・ボードとして実装し、USB キーパッド、スピーカー、マイクはコネクタにて接続する。新しいシステムでは PIC の初期化に続いて RN52 を自動的に起動する仕様とした。音量はキーパッドのマイナス・キー、プラス・キーで調節する。
Mobile phone <– Bluetooth –> RN52 <– UART –> PIC24FJ64GB002 <– USB –> Keypad
Inputted numbers are displayed in the first line of the LCD and the current connection status obtained with the Q command is in the second line.
<< PIC microcontroller board >>
New test board remade in March, 2016, is compatible with that in my blog page on Aug. 31, 2014.
( In Japanese : 平成26年8月31日の稿で示したボードを新たに制作 )
Clock and pin connection of the PIC24FJ64GB002 board :
FRC 8 MHz – 96 MHz PLL;
48 MHz for USB Module (96 MHz PLL divide by 2);
32 MHz for System Clock (96 MHz PLL divide by 3);
LED : RB0, RB1; Switch (pull down) : MCLR, RB2;
LCD (SC1602BBWB-XA-GB-G) : RS – RB7, R/W – GND, E – RB8, Data bus : DB4 – RB9, DB5 – RB13, DB6 – RB14, DB7 – RB15;
RA0 (assigned to U2RX) – RN52 pin 16 TX
RA1 (assigned to U2TX) – RN52 pin 17 RX
RB3 – RN52 pin 21 PWREN (to power up the RN52 module)
RB4 – RN52 pin 3 GIO2
RA4 – RN52 pin 11 GIO9
<< RN52 board >>
pin 3 GIO2 – PIC pin 12 (RP4/RB4)
pin 11 GIO9 – PIC pin 11 (RA4)
pin 16 TX – PIC pin 2 (RP5/RA0) assigned to U2RX
pin 17 RX – PIC pin 3 (RP6/RA1) assigned to U2TX
pin 21 PWREN – switch (pull high) and PIC pin 7 (RB3)
For flow control is not used, RN52 pin 14 RTS is connected with RN52 pin 15 CTS.
Default UART configuration of the RN52 module :
Baud rate : 115,200 Kbps
Bits : 8
Parity : None
Stop bits : 1
<< Amplifier module >>
OEP30W (fully differential, class D, 30W power amplifier board)
<< Microphone circuit >>
<< Sample code >>
Hands-free-bluetooth 2
Based on Microchip Libraries for Applications v2014_07_22
<< Function of this set >>
If you enter a telephone number, RN52 will initiate outgoing call automatically after 3 seconds.
The maximum telephone number is 11 digits.
Enter-key accepts incoming call, initiates outgoing call or terminates call.
Back-space key cancels a last inputted number.
Plus (+) key increases the volume.
Minus (-) key reduces the volume.
PIC-RB2-switch practices a factory reset of RN52.
In Japanese :
<< 操作方法 >>
電話番号は最大11桁、約3秒で自動発信。
Enter key:着信応答、強制発信、切断。
Back space:1文字キャンセル。
Plus (+) key : 音量を上げる。
Minus (-) key : 音量を下げる。
PIC の RB2-switch で RN52 を工場出荷時設定にリセット。