{"id":18675680,"url":"https://github.com/tvlad1234/pillscope","last_synced_at":"2025-09-10T11:36:53.082Z","repository":{"id":40271088,"uuid":"504942210","full_name":"tvlad1234/pillScope","owner":"tvlad1234","description":"Oscilloscope based around the STM32F103 Blue Pill and an OLED screen","archived":false,"fork":false,"pushed_at":"2022-06-26T10:38:05.000Z","size":13438,"stargazers_count":16,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T02:11:45.747Z","etag":null,"topics":["adc","bluepill-board","oled","oscilloscope","ssd1306","stm32","stm32f103"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tvlad1234.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.MD","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-18T20:17:22.000Z","updated_at":"2024-12-19T03:31:25.000Z","dependencies_parsed_at":"2022-07-28T23:09:27.883Z","dependency_job_id":null,"html_url":"https://github.com/tvlad1234/pillScope","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tvlad1234/pillScope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2FpillScope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2FpillScope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2FpillScope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2FpillScope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tvlad1234","download_url":"https://codeload.github.com/tvlad1234/pillScope/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tvlad1234%2FpillScope/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274455663,"owners_count":25288557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adc","bluepill-board","oled","oscilloscope","ssd1306","stm32","stm32f103"],"created_at":"2024-11-07T09:25:53.938Z","updated_at":"2025-09-10T11:36:52.519Z","avatar_url":"https://github.com/tvlad1234.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pillScope\nOscilloscope based around the STM32F103 Blue Pill and an OLED screen\\\n_Take a look at [pillScope Plus](https://github.com/tvlad1234/pillScopePlus), with a better screen and more sample memory_\n## Features\n-3.3V to 3.3V input range (can be increased if using attenuator probes)\\\nApproximatively 1MOhm input impedance\\\nTimebase goes down to 20uS/div\\\nOn screen measurements: min/max voltage, peak-to-peak voltage, frequency\\\nCaptured waveforms can be sent over USB or UART in TekScope-compatible CSV format.\n## Required parts\n### Base parts:\nSTM32F103C8 Blue Pill development board\\\n128x64 SSD1306-based OLED display\\\n4 pushbuttons\n### Analog frontend:\nLM358 dual op-amp (rail-to-rail opamps should work better in this context, but this is what I had on hand)\\\n2x 68kOhm resistors (to create a 1.65V offset voltage)\\\n2x 500kOhm resistors (to create the input attenuator)\\\n\n### 2x probes:\njust a 1MOhm resistor, in series with the input\n\n## Schematics\nThe OLED display is connected to I2C1 (PB7-SDA and PB6-SCL). The buttons are connected as follows:\\\nPB12: Menu\\\nPB13: Select\\\nPB8: Down\\\nPB9: Up\n\nPA9 is the UART TX, PA10 is RX\n\nThe output of the analog frontend is connected to ADC1_IN0, which corresponds to PA0.\n\nThe analog frontend consists of:\\\na 1.65V voltage reference, which serves as a virtual ground point for the input,\\\na 2x voltage divider at the input,\\\nan LM358 dual op-amp, which buffers the reference voltage and the output of the input attenuator\n\nThe schematic of the analog frontend can be found in the frontend.pdf file.\n\n## Using the oscilloscope\n### The UI\nThe menu buton cycles between menus on the right side of the screen, while the select button changes the current selection in the menu.\n\n### Measuring things\nThe frontend makes use of a virtual ground point which is 1.65V above the real ground. Because of this, the oscilloscope and the device under test must not be sharing the same ground reference. If you need to send data to the computer while measuring a device which shares ground with the scope, you should connect the computer via the UART port, with an opto-isolated adapter, while powering the oscilloscope from an external source.\n\n## Saving wavevorms\nThe captured waveforms can be sent to a computer over USB or UART. Sending `s` or `S` to either port will tell the scope to output the captured waveform in CSV format. This data can then be imported into the Tektronix TekScope app for further analysis.\n![Waveform in TekScope](https://user-images.githubusercontent.com/60291077/174594659-d71b9acf-26f0-4e4b-9766-6355c0acc5a1.png)\n![Waveform on pillScope](https://user-images.githubusercontent.com/60291077/175494191-82f16835-0c3a-488d-b7e0-959405abd570.jpg)\n\n\n## Code\nThe code can be compiled with `make`. Be sure to recursively clone this repository, as the display driver is included as a submodule. The actual oscilloscope code of this project is located in `Core\\Src`, the `scope.c`, `ui.c`, `wave.c` files. Feel free to take a look, as they're commented for ease of understanding.\n\n## Pictures\n![20220619_165356](https://user-images.githubusercontent.com/60291077/174484756-e336c5bb-27e9-40c6-923a-6aa228a2cb00.jpg)\n![20220619_165433](https://user-images.githubusercontent.com/60291077/174484767-cb0bdf95-f4b4-4de8-8a6a-038e26494a6b.jpg)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvlad1234%2Fpillscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftvlad1234%2Fpillscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftvlad1234%2Fpillscope/lists"}