This past week, I have been working on the Bluetooth module and the microSD card module. I was able to solder speaker connections to the Bluetooth module as well as manipulate two audio files for testing the system; however, I’ve run into two problems that set me slightly behind schedule. Once the microSD card module and microSD cards arrived, I had some difficulty finding an SD card adapter until this morning (Saturday); once I had the adapter, getting test song mp3 files downloaded and wiring the microSD card module for testing was straightforward. The other, still standing, issue I’ve run into is getting the Bluetooth module to see the files that are on the microSD card. I believe the current library for the Bluetooth module was made for a specific adaptation of an Arduino Uno that includes built-in memory, so I’m currently researching how to get the BT module to reach the files. One step I’ve made towards getting this working is verifying that the microSD card module works; I found that Arduino has built-in example code for memory cards, which can both verify that there is a connection to the card as well as list files on the card (as seen in the photo at the bottom). I plan to take time tomorrow to learn from the example code how to see the files so that I can copy the paths for the BT module.
Another potential issue that may come up once I solve the file issue is wiring the speaker to the BT module since it has a useful audio function library. In the diagram given for the BT module, there are three connections (GND, VCC, and DACL) going from the BT module to the speaker; however, our current speaker only has two connections. This may be as simple as wiring only GND and DACL, but I won’t know until after I can get the BT chip reading from the SD card.
Because of these main issues, my progress is slightly behind schedule. To catch up, I plan on working most of tomorrow to get the BT and microSD card communicating, and maybe testing my speaker hypothesis if I have time. If the speaker doesn’t work, I will look for a speaker to order.
This upcoming week, I hope to have the speaker, microSD card module, BT module working together. After this, I hope to have these items integrated into the main lock system as well as begin testing the BT connection between the app and the lock.
Additional Discussion
In terms of verification of the lock subsystem, I have tested or plan on testing the following measures:
- Keypad functionality – this was completed by hardcoding a correct PIN and verifying that the keypad outputted a “correct” signal when the correct PIN was entered.
- Solenoid lock functionality – this was completed by connecting the solenoid to the 5V pin of the Arduino and verifying that it unlocked when powered.
- Bluetooth connection – this was initially confirmed by connecting my iPhone to the module without the rest of the system. Better validation will come by testing the connection between app/lock, and mat/lock.
- Audio quality and level – this will be verified in two parts. Quality will be qualitatively measured by listening to the audio files through my laptop and comparing to the audio quality from the speaker. Level will be measured hopefully through a decibel reader, likely through a downloaded phone app.