You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**A low power, wall mounted, Bluetooth audio player, clock, and environmental monitor**
5
+
## A low power, wall mounted, Bluetooth audio player, clock, and environmental monitor
6
6
7
-
**This repo contains the firmware and PCB/enclosure design**
7
+
> [!Warning]
8
+
> This is personal project. It was built and works without issue for my purposes. It is made public here in case some part of it is useful to others, but **neither the hardware nor firmware have been rigorously tested**.
8
9
9
-
Features:
10
+
**Features:**
10
11
11
12
- Media/volume controls
12
13
- Song metadata display
13
14
- Time, temperature, pressure, humidity display on idle
14
15
- Ultra low power sleep with proximity sensing wakeup
15
16
- Differential analog and S/PDIF digital audio output
16
17
17
-
**Full project details at [duk.io](https://blog.duk.io/custom-electronics-projects/)**
18
+
**This repo contains the firmware and PCB/enclosure design.**
19
+
20
+
**See [custom electronics projects at duk.io](https://www.duk.io/blog/electronics-projects/) for full project details.**
18
21
19
22
## Build
20
23
21
-
The project uses the [PlatformIO](https://platformio.org/) dependency management/build system. If you have PlatformIO installed, executing the `run` command in the root folder should be all that is required for a successful build. The `platformio.ini` file contains the required configuration and PlatformIO will download the required platform dependencies and toolchain.
24
+
The project uses the [PlatformIO](https://platformio.org/) dependency management/build system. If you have PlatformIO installed, executing the `run` command in the root folder *should* 🙏 be all that is required for a successful build. The `platformio.ini` file contains the required configuration and PlatformIO will download the required platform dependencies and toolchain.
**2. Build firmware (PlatformIO must be installed)**
35
+
36
+
```shell
24
37
> pio run
25
38
26
39
```
27
40
41
+
**3. Upload to device**
42
+
28
43
Similarly, use `pio run --target upload` to upload the firmware to the device. You'll likely need to update the upload settings in `platformio.ini` to reflect your settings, or use your own upload tool.
29
44
30
-
```
45
+
```shell
31
46
> pio run --target upload
32
47
33
48
```
34
49
50
+
**4. [optional] Create project files for IDE**
51
+
35
52
If you want to view/edit the project in your favorite IDE, use PlatformIO to generate the appropriate setup/workspace files and import the project:
36
53
37
-
```
54
+
```shell
38
55
> pio project init --ide [atom|clion|codeblocks|eclipse|emacs|netbeans|qtcreator|sublimetext|vim|visualstudio|vscode]
39
56
```
40
57
@@ -54,11 +71,11 @@ If you wish to use a different build system, you will need:
54
71
| Startup source file | ASM file containing the startup code and vector table |
55
72
| Linker script | Tells the linker how to setup everything in flash/SRAM |
56
73
57
-
All of these are available in the ST STM32 SDK available from ST Micro.
74
+
All of these are available in the [STM32 SDK](https://www.st.com/en/development-tools/stm32-software-development-tools.html) available from ST Micro.
58
75
59
76
**Compiling / linking**
60
77
61
-
`platformio.ini` lists the required compiler flags. Be sure to use `--specs=nano.specs` and `--specs=nosys.specs` when linking.
78
+
`platformio.ini` lists the required compiler flags. Be sure to use `--specs=nano.specs` and `--specs=nosys.specs` when linking using your own tools.
62
79
63
80
#### Compiler
64
81
@@ -69,18 +86,37 @@ The project was built with `gcc-arm-none-eabi 9.2.1` It should work with any lat
69
86
|||
70
87
|-|-|
71
88
|MCU | STM32F1xx |
72
-
|Flash| >42kb |
73
-
|SRAM | >8kb |
89
+
|Flash| >42kb |
90
+
|SRAM | >8kb |
74
91
75
-
## Dependencies
92
+
## Dependencies (firmware)
76
93
77
94
**CMSIS**
78
95
79
-
PlatformIO should automatically include/link the correct headers/sources from the STM32 SDK.
96
+
PlatformIO should automatically include/link the correct headers/sources from the STM32 SDK. Version 9.0.0 was used in production.
80
97
81
98
**Libpekin**
82
99
83
-
[Libpekin](https://github.com/canardos/libpekin) is a collection of shared MCU related code resulting from this and other projects. It's included as a Git submodule in the `lib` folder. PlatformIO will include the `lib` subfolders automatically.
100
+
[Libpekin](https://github.com/canardos/libpekin) is a collection of shared MCU-related code resulting from this and other projects. It's included as a Git submodule in the `lib` folder. PlatformIO will include the `lib` subfolders automatically.
101
+
102
+
## Hardware
103
+
104
+
#### PCB
105
+
106
+
The PCB was designed with KiCad v.5, but the files have been upgraded to v.7 and are located in `/hardware/pcb`. Gerber output for the first revision is located in `/hardware/pcb/plots_rev_a`.
107
+
108
+
> [!Important]
109
+
> [Several fixes have been made to the design](https://www.duk.io/blog/electronics-projects/bt-player/bluetooth-audio-player-conclusion/#problems-and-screwups), which are implemented in the latest schematic/pcb files, but are not present in the revision A plot output.
110
+
111
+
See the [KiCad documentation](https://docs.kicad.org/) for information on installing and using KiCad.
112
+
113
+
**Custom symbols and footprints required by the board are included as a Git submodule at `/hardware/pcb/kicad-mycustom-lib`, and are included in the KiCad project as a project-specific library.**
114
+
115
+
#### Enclosure
116
+
117
+
The [enclosure design](http://www.duk.io/blog/electronics-projects/bt-player/bluetooth-audio-player-mechanical-design/#mechanical-design) includes a [laser-cut wooden facade](http://www.duk.io/blog/electronics-projects/bt-player/bluetooth-audio-player-mechanical-design/#laser-etched-wood-facade). The CAD files for the design are located in `/hardware/enclosure/laser_cut_facade`.
118
+
119
+
A Sketchup model I used to model the mechanical constraints of the design is included in `/hardware/enclosure`.
0 commit comments