README: document project and connections
This commit is contained in:
parent
54bdd92222
commit
fccf0b7c0b
95
README.md
95
README.md
|
@ -1,4 +1,5 @@
|
||||||
This firmware template is designed for development boards based around [STM32 F1 series micro-controller](http://www.st.com/web/en/catalog/mmc/FM141/SC1169/SS1031).
|
This is the firmware for the sound lever meter.
|
||||||
|
It will read the measurements from a GM1351 sound level meter and send them over Bluetooth.
|
||||||
|
|
||||||
project
|
project
|
||||||
=======
|
=======
|
||||||
|
@ -6,48 +7,76 @@ project
|
||||||
summary
|
summary
|
||||||
-------
|
-------
|
||||||
|
|
||||||
*describe project purpose*
|
The GM1351 is a digital hand held sound level meter.
|
||||||
|
It is available under multiple brands.
|
||||||
|
There is no connector/interface to read the measurements.
|
||||||
|
Instead I am using test point on the back of the PCB.
|
||||||
|
This allows me to monitoring the interface to the LCD and read back the data displayed into measurements.
|
||||||
|
|
||||||
|
The measurements are send transmitted over Bluetooth using a SPP module.
|
||||||
|
|
||||||
technology
|
technology
|
||||||
----------
|
----------
|
||||||
|
|
||||||
*described electronic details*
|
The firmware runs on a [black pill](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#black_pill) development board.
|
||||||
|
It is based on a STM32F103C8T6 micro-controller.
|
||||||
|
This will do all the processing and control the peripherals.
|
||||||
|
|
||||||
board
|
The Bluetooth module is a HC-05.
|
||||||
=====
|
It should be configured to be a slave and offer a SPP profile.
|
||||||
|
The measurement will be forwarded by the micro-controller over the UART part configured at 115200 bps 8N1.
|
||||||
|
It will transmit the measurement in the format "123.4 dBa\n".
|
||||||
|
|
||||||
The current implementation uses a [core board](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#core_board).
|
This does not use a Bluetooth Low Energy (BLE) module because it does not fit the needs.
|
||||||
|
There is no need to save energy since the device needs permanent power just for the display.
|
||||||
The underlying template also supports following board:
|
There is a constant stream of data (not fitting BLE principles).
|
||||||
|
The is a specified Classic Bluetooth profile for serial data: Serial Port Profile (SPP).
|
||||||
- [Maple Mini](http://leaflabs.com/docs/hardware/maple-mini.html), based on a STM32F103CBT6
|
BLE module use non-standard GATT characteristics for serial data transfer.
|
||||||
- [System Board](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#system_board), based on a STM32F103C8T6
|
|
||||||
- [blue pill](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#blue_pill), based on a STM32F103C8T6
|
|
||||||
- [black pill](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#black_pill), based on a STM32F103C8T6
|
|
||||||
- [core board](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#core_board), based on a STM32F103C8T6
|
|
||||||
- [ST-LINK V2 mini](https://wiki.cuvoodoo.info/doku.php?id=jtag#mini_st-link_v2), a ST-LINK/V2 clone based on a STM32F101C8T6
|
|
||||||
- [USB-Blaster](https://wiki.cuvoodoo.info/doku.php?id=jtag#armjishu_usb-blaster), an Altera USB-Blaster clone based on a STM32F101C8T6
|
|
||||||
|
|
||||||
**Which board is used is defined in the Makefile**.
|
|
||||||
This is required to map the user LED and button provided on the board
|
|
||||||
|
|
||||||
The ST-LINK V2 mini clone has SWD test points on the board.
|
|
||||||
Because read protection is enabled, you will first need to remove the protection to be able to flash the firmware.
|
|
||||||
To remove the read protection (and erase flash), run `rake remove_protection` while a SWD adapter is connected.
|
|
||||||
|
|
||||||
The Altera USB-Blaster clone has a pin header for SWD and UART1 on the board.
|
|
||||||
SWD is disabled in the main firmware, and it has read protection.
|
|
||||||
To be able to flash using SWD (or the serial port), the BOOT0 pin must be set to 1 to boot the system memory install of the flash memory.
|
|
||||||
To set BOOT0 to 1, apply 3.3 V on R11, between the resistor and the reference designator, when powering the device.
|
|
||||||
The red LED should stay off while the green LED is on.
|
|
||||||
Now you can remove the read protection (and erase flash), run `rake remove_protection` while a SWD adapter is connected.
|
|
||||||
|
|
||||||
connections
|
connections
|
||||||
===========
|
===========
|
||||||
|
|
||||||
Connect the peripherals the following way (STM32F10X signal; STM32F10X pin; peripheral pin; peripheral signal; comment):
|
Connect the peripherals as described below.
|
||||||
|
|
||||||
- *list board to peripheral pin connections*
|
MT3608 voltage regulator module:
|
||||||
|
- IN-: ground
|
||||||
|
- IN+: 5V
|
||||||
|
- OUT-: ground
|
||||||
|
- OUT+: IDC 2x3 pin 5
|
||||||
|
|
||||||
|
Set the MT3608 voltage output to 9V.
|
||||||
|
This is meant to replace the GM1351 PP3 9V battery.
|
||||||
|
It kind of also works with 5V, but the LCD is very dim.
|
||||||
|
Since I don't know if the measurements remain accurate at 5V, I prefer to provide the voltage it was designed for.
|
||||||
|
|
||||||
|
HC-05 Bluetooth SPP module:
|
||||||
|
- STATE: no connect
|
||||||
|
- RX: USART3_TX/PB10
|
||||||
|
- TX: no connect
|
||||||
|
- GND: ground
|
||||||
|
- VCC: 5V
|
||||||
|
- EN: no connect
|
||||||
|
|
||||||
|
n-channel MOSFET 2N7000:
|
||||||
|
- 1 source: ground
|
||||||
|
- 2 gate: PB0, add pull down resistor
|
||||||
|
- 3 drain: IDC 2x3 pin 2
|
||||||
|
|
||||||
|
IDC 2x3 2.54 mm, micro-controller side:
|
||||||
|
- 1: ground
|
||||||
|
- 2: PB13, SPI2_SCK
|
||||||
|
- 3: 2N7000 pin 3
|
||||||
|
- 4: PB15, SPI2_MOSI
|
||||||
|
- 5: MT3608 OUT+
|
||||||
|
- 6: PA8
|
||||||
|
|
||||||
|
IDC 2x3 2.54 mm, GM1351 side (solder wires on the PCB):
|
||||||
|
- 1: B-
|
||||||
|
- 2: LCD_WR
|
||||||
|
- 3: D7/D8, on the text side, to control the ON/OFF button
|
||||||
|
- 4: LCD_DATA
|
||||||
|
- 5: B+
|
||||||
|
- 6: LCD_CS
|
||||||
|
|
||||||
All pins are configured using `define`s in the corresponding source code.
|
All pins are configured using `define`s in the corresponding source code.
|
||||||
|
|
||||||
|
@ -83,7 +112,7 @@ It is up to the application to advertise USB DFU support (i.e. as does the provi
|
||||||
|
|
||||||
The `bootlaoder` image will be flashed using SWD (Serial Wire Debug).
|
The `bootlaoder` image will be flashed using SWD (Serial Wire Debug).
|
||||||
For that you need an SWD adapter.
|
For that you need an SWD adapter.
|
||||||
The `Makefile` uses a Black Magic Probe (per default), or a ST-Link V2 along OpenOCD software.
|
The `Makefile` uses a ST-Link V2 along OpenOCD software.
|
||||||
To flash the `booltoader` using SWD run `rake flash_booloader`.
|
To flash the `booltoader` using SWD run `rake flash_booloader`.
|
||||||
|
|
||||||
Once the `bootloader` is flashed it is possible to flash the `application` over USB using the DFU protocol by running `rake flash`.
|
Once the `bootloader` is flashed it is possible to flash the `application` over USB using the DFU protocol by running `rake flash`.
|
||||||
|
|
Loading…
Reference in New Issue