The Serial Snooper is a UART data logger with automatic baud rate detection, real-time data stamping and a command-line-interface for configuration, running on an STM32F3 microcontroller.
It is utilised in an R&D setting to easily capture logs from devices to speed up catching software and hardware bugs.
This project started out as a submission for the final project in the course "Making Embedded Systems" by Elecia White, and evolved into a complete functional product used professionally. The report for the project submitted to the course can be found here.
PCBA FrontPCBA Back
- Plug in USB (5V - resettable fuse limits current to 500mA incase of short circuits damaging the power source).
- Device powers up, indicated by the green LED.
- A short moment later, the red LED lights up, indicating that the SD card was successfully initialised.
- Plug in DB9 cable for the device you wish to snoop. The baud rate will be automatically detected.
- The yellow LED will toggle for every character received.
- The blue LED will toggle for every successful SD card write.
- When ready, power down the device by removing the USB cable and remove the SD card.
The full hardware schematic can be found on Github.
Software Block DiagramA prototype board was created to aid development.
Headers have been soldered to a perforated board. A mixture of wire wrapping and soldering used for the connections.
All demonstrations below are from the prototype device using the software in this repository.
The CLI is used to:
- Ascertain the software version number
- Send commands:
- Get DIP switch setting.
- Get the current time.
- Set the current time.
For example:
The received data is timestamped and saved to the SD card. The filesystem being used is Fatfs (middleware software for this was provided by STM32 Cube).
In the example below, nearly 30,000 characters were sent over the course of 68 seconds (at 115200 BR) and all data was transferred successfully.
(The text file below is generated by the Serial Snooper and can be found as resource/example_log.TXT)