-
Notifications
You must be signed in to change notification settings - Fork 70
Construction
How to construct an STM32-O-Scope.
Bill of materials.
-
Any STM32F103XXXX board will be suitable, but if you want to keep costs down, go for the STM32F103C8XX series as they are available for around $5 US - shipped from China - the "maple mini" boards are a few cents more but they have more flash, which is not needed for this build could be useful if you wish to add more features or re-purpose the board later.
-
Any ILI9341 based 240 x 320 display (actually other displays would work, but you would need to change the code to suit). Ebay Search The board I built the prototype with has a touch panel, but I haven't added touch to the build (yet).
-
A 1 Meg Ohm resistor. This gives an attenuation of approximately 50% so if the STM32 ADC voltage is 3.3V we can measure up to around 6.6V - the exact attenuation will depend on a number of factors, so assume a full range of 0 to 6V for the input and you should be safe.
-
A programmer for your STM32 - I used an ST-Link V2 clone available from the usual suspects, but you can also use a 3.3V USB Serial adapter.
-
The latest build of the Arduino STM32 software see here for details.
-
The sketch from here.
-
Suitable wire to hook it all up.
Optional.
A probe and a BNC Socket.
The BNC socket and probe are not strictly necessary, but they do give the project a more professional look. The probe also includes a 10x attenuator, but its actual effect would have to be determined by experimentation.
Construction consists of wiring up the STM board to the programmer and the display, exact pinouts will depend on which boards you are using.
I used the following wiring colours for the display.
Additional display specific signals (i.e. non SPI) for STM32F103C8T6 (Wire colour)
TFT_DC PA0 (Green)
TFT_CS PA1 (Orange)
TFT_RST PA2 (Yellow)
Hardware SPI1 on the STM32F103C8T6 ALSO needs to be connected and pins are as follows.
SPI1_NSS (PA4) (LQFP44 pin 14) (n.c.)
SPI1_SCK (PA5) (LQFP44 pin 15) (Brown)
SPI1_MISO (PA6) (LQFP48 pin 16) (White)
SPI1_MOSI (PA7) (LQFP48 pin 17) (Grey)
...and of course a (red) wire for the display 3v3 supply and a (black) wire for GND.
The LCD backlight should be connected to whatever signal is appropriate, some ILI9341 boards have a transistor to drive the backlight, others don't. NOTE: If your display does not have a transistor to control the backlight, the pins on the STM32F103 can't directly drive the 80mA required for the LEDs at full brightness, but will manage about 40% duty cycle on a PWM pin, this obviously makes for a dimmer display.
The analog input is on pin PB0 and a test signal (PWM approx 500Hz) is on PB1
NOTE: The free hamburger give away toy "O" is optional. No endorsement of the STM-O-Scope by any third party, burger manufacturer or otherwise is implied. This build will not allow you to shoot lasers from your eyes.