Home > Hardware, STMicro STM32, Video > “BluePill” is a $2 Arduino Compatible Development Board Based on STMicro STM32 MCU

“BluePill” is a $2 Arduino Compatible Development Board Based on STMicro STM32 MCU

I’m amazed that if your budget for a board was just $5 for one MCU board, you now have so many options for your electronics projects: ESP8266 boards, a few STM8 boards, One Dollar Board project, and many more… Other options are “BluePill” or “RedPill” boards based on STM32 or GD32 32-bit ARM Cortex M3 micro-controllers that go for about $2 shipped, and can be programmed with the Arduino IDE thanks to STM32Duino project.


BluePill board specifications:

  • MCU – STMicro STM32F103C8T6 ARM Cortex-M3 MCU @ 72 MHz with 64KB flash memory, 20KB SRAM.
  • USB – 1x micro USB port for power and programming
  • Debugging – 4x pin SWD header or micro USB port
  • Expansion – 2x 20-pin with power signals, I2C, SPI, GPIOs, ADC inputs, etc…
  • Misc – Reset button, two jumpers (for boot mode), power and user LEDs.
  • Power – 5V via USB, 2.0-3.6V power via 3.3V pin on SWD header.
  • Dimensions – 5.3cm x 2.2cm.

I specifically wrote about “BluePill” board instead of “RedPill”, because one thread on STM32duino forums mention the former is a bit better. You can find documentation on Piffa.net wiki (Italian only) and STM32duino wiki. Most instructions use a USB to serial (TTL) board to program connected to PA9 and PA10 pins to program the board, but I understand that USB programming if possible by replacing the 10kΩ pull up resistor on PA12 (USB D+) by a 1.5kΩ resistor.

The video below shows how to use the STM32 board with a serial debug board, and the Arduino IDE.

One interesting fact about the $2 price tag for the board (remember it also includes shipping) is that STM32F103C8T6 MCU itself is supposed to sell for $2.056 in 10k quantities, until you are looking for actual pricing in China, where it is sold for less than one dollar (6 RMB).

Beside Aliexpress, you can also find the board on eBay. Few sellers call it BluePill, and instead they are often called “STM32 Minimum System Development Board”, but a search for “STM32F103C8T6″ on your favorite resellers should also list the board.

Thank you Zoobab!

  1. theguyuk
    May 17th, 2016 at 15:09 | #1

    When I see these types of board I often let my mind wonder and dream, if only they could have a TV out, more ram and 2 to 3 USB ports. Could someone then programme them as a 2016 Sinclair Spectrum with Basic language. Build it in a case with a calculator style keyboard and sell it for $10.00. Sdcard could be accessed via USB port.

    Not a One dollar board but a Ten dollar computer. Trubble is it is only a dream 😯

  2. Aaa
    May 17th, 2016 at 16:49 | #2

    Can micropython be run on it?

  3. Klaus
    May 17th, 2016 at 18:45 | #3

    Using a cheap stlink clone (< 3USD, just search for "stlink" in your favourite chinese store), you are able to debug the stm32.

  4. onebir
    May 17th, 2016 at 19:49 | #4

    The real Raspberry Pi 😉
    BTW Arduino can do some kind of TV out; there’s a library for it. But involves massive overhead I suspect.

  5. Theguyuk
    May 17th, 2016 at 20:43 | #5


    Trouble with Raspberry, Orange, Friendlyarm Pi boards is they all boot from a sdcard, so that adds extra cost. Plus you need a means to back up your sdcard in case it gets corrupt. So we need internal flash or ROM and cost suggest the amount will be small. The ZX Spectrum had a 16kb ROM which did everything and included a basic language. So not Android but the minimum to program with and very basic games. I suspect Ten dollars would be hard.

    But in poor communities it could create jobs and give education I suggest.

    Whether there is a cheap phone SOC with HDMI or a cheap tablet SOC with HDMI, I know not. Else you use a media player OTT SOC as Raspberry Pi do.

  6. May 17th, 2016 at 22:28 | #6

    Anyone has the USB working? What is the actual VID and PID?

  7. onebir
    May 17th, 2016 at 23:10 | #7

    Agreed – something like Spectrum/Vic 20 (except…Python) with keyboard & TV-out/cheap LCD display for $10 could spark the same kind of interest in computers in developing countries.

  8. Theguyuk
    May 17th, 2016 at 23:45 | #8


    Agree – but will anyone or group with the know how try 😯

  9. Iridiumsat
    May 18th, 2016 at 05:46 | #9

    I wonder why we still stick with AVR for arduino platform, this 32-bit cortex-m3 should be ok for a rich features :-

    32-bit ARM Cortex-M3
    2x SPI
    2x I2C
    3x UART
    USB + CAN
    and more… in $2 !!!

  10. John S.
    May 18th, 2016 at 06:36 | #10

    The photo of a blue board in this article appears to exhibit exactly the same thing being warned against on the red board (USB socket with not enough (and maybe only SMD at that) mounting tabs). So soldermask color alone doesn’t seem to be enough to tell the different versions apart.

    @zoobab – I’m not sure, but I don’t think the STM32F103 chips have a DFU bootloader built-in, only a UART serial bootloader. ST on the chip’s page even link to an example on implementing your own DFU in your own firmware in order to use it. So I think you would need to flash a DFU bootloader of your own onto the device via serial or SWD as a first step. And about the pullup resistor, mine has the correct 1.5K pullup, but it is an older one. I suppose that with so many manufacturers and such low prices, mistakes will be made on some devices.

    @onebir – are you including the keyboard/cheap LCD display in the $10 price? That might be a bit optimistic. If you aren’t, I think the CHIP exactly meets your requirements, if you don’t count the $5 S/H. OTOH, it might be a bit too complex for what you have in mind, with wifi and an OS and a browser and media player to distract away from any need to actually have to write code to get it to do something.

    But being able to just pull it out of its boxes and plug it straight into a TV and watch it boot up gave me a real nostalgic feeling, especially with the wiggly bad video quality. Except then I tried to plug a keyboard in and it browned out. So it wasn’t quite $9 total cost or a simple out-of-the-box experience when I had to add a USB hub to provide peripheral power for a keyboard and a mouse. Though I guess the USB power issue is avoided with a bluetooth keyboard/mouse. Anyway, it might meet what you’re looking for.

  11. John S.
    May 18th, 2016 at 07:04 | #11

    @zoobab: Ah, looking at the Italian wiki, I see that they show a photo of having to replace a resistor on the bluepill (mine’s red, and it has the correct 1.5K pull-up and 22 series resistors). And they link to a bootloader that you can flash for DFU support. So I suppose if you flash that bootloader, you should expect the IDs to be 0xAF:0x03 and 0x1E:0x00, which are defined at https://github.com/rogerclarkmelbourne/STM32duino-bootloader/blob/master/STM32F1/config.h#L297

  12. John S.
    May 18th, 2016 at 09:41 | #12

    0x1EAF:0x0003, doh

  13. onebir
    May 18th, 2016 at 11:10 | #13

    @John S. @Theguyuk Yep, like a $10 ViC 20, or one of these: https://en.wikipedia.org/wiki/Pocket_computer

    Something you more or less have to code on to do something interesting, like a Micro:bit for developing countries where a computer for the IDE or even a spare TV isn’t a given.

  14. May 18th, 2016 at 11:22 | #14

    onebir :
    Agreed – something like Spectrum/Vic 20 (except…Python) with keyboard & TV-out/cheap LCD display for $10 could spark the same kind of interest in computers in developing countries.

    What makes you think there isn’t already an interest in computers in developing countries? Particularly the ones where people have enough to eat?

  15. May 18th, 2016 at 11:34 | #15

    Aaa :
    Can micropython be run on it?

    My guess: No.
    It looks like it has a fraction of the flash and RAM of any of the STM32 chips MicroPython has been ported to.

  16. May 18th, 2016 at 11:44 | #16

    I agree with @John S. that CHIP might be a good solution. PocketCHIP has all you need (minus the multiple USB ports), but it costs $49.

  17. Paul
    May 18th, 2016 at 16:55 | #17

    > My guess: No. It looks like it has a fraction of the flash and RAM of any of the STM32 chips MicroPython has been ported to.

    I ported MicroPython to MappleMini which is similar chip, but with 128K of Flash. MicroPython runs pretty well in 16K of RAM on micro:bit. MicroPython can calculate you 2+2 in an interactive prompt in 2K of RAM (but not do much more beyond that of course). As for flash, 64K is not enough to have an interactive prompt, 80K is minimum size for that (so 128K fits interactive uPy and basic drivers). 64K would be enough to run precompiled bytecode (but probably not much space for such bytecode would be left).

  18. May 18th, 2016 at 17:30 | #18

    I forgot to mention that while the specs I’ve seen only show 64KB flash, it looks like 128KB might be accessible/usable:
    In the Italian Wiki:

    Forum post about 128KB flash @ http://www.stm32duino.com/viewtopic.php?t=110

  19. Theguyuk
    May 18th, 2016 at 18:00 | #19

    The $49 dollar pocket CHIP hints at high costs, I suggest.

    The CHIP is a wait and see.

  20. FergusL
    May 18th, 2016 at 19:17 | #20

    I think this STM32 board or maybe a very similar one has been around for quite some time! On DX.com, aliexpress and others.
    Never seen it nicknamed “Blue/Redpill” though! It should also support Mbed environnement for more advanced usage.

  21. May 18th, 2016 at 20:10 | #21

    You’re right, it’s not a new design, but I still thought it was interesting to feature it here.

  22. Jan de Boer
    May 19th, 2016 at 00:55 | #22

    @Paul @cnxsoft regarding 64K/128K

    This is a very easy mistake to make. Difference in marking between 64K flash and 128K is just one letter – 8 or B. And it is very, very easy to confuse the two reading markings on the chip:

    STM32F103C8T6 -> 64KB flash

    STM32F103CBT6 -> 128KB flash

    See here screenshot from data-sheet: http://imgur.com/D9f3jdO

  23. onebir
    May 19th, 2016 at 03:50 | #23

    Do any of the $2 boards use the STM32F103CBT6 (128k flash, uPython-capable) version? The ones I found were all considerably more :(. Still doesn’t ESP8266 run uPython capably already, with the upgraded ESP32 due out?
    – $3 ESP8266 dev board
    – $2 Nokia 5110 / similar LCD
    – $5 (?) Qwerty calculator style keyboard/case
    – $1 PCB
    – $1 battery holder

    Could be a $12 VIC 20/ZX Spectrum equivalent. & if a smartphone’s available perhaps it could driving the display &/ take input from its onscreen keyboard &/ use it like a “tape drive” :p.

  24. mdel
    May 19th, 2016 at 15:13 | #24

    i’ve been looking into that and you can find “maple mini boards” aka STM32F103CBT6 (128k flash) on aliexpress for less than 4e, so the price difference is not big.
    I would assume that the bluepill board is simply an ultra low cost version of another design (read below).

    as i didn’t know much about the STM32 and seeing the very good performance it has with spi displays compared to atmel (arduino) mcu, i started looking into those blue/redpill boards, to finally come across leaflabs maple line boards which look like the original design (2011).

    But i see that leaflabs has discontinued that line of products and its support for their library :
    “As of March 2015, the LeafLabs Maple line and the libmaple library are end-of-life and no longer supported by LeafLabs”

    Apparently STM32duino is providing support for programming some STM32 models with the arduino IDE.

    I was also not very impressed by the number of boards available from non chinese suppliers (sparkfun, adafruit ..) based on the STM32F103 which is the model supported by STM32Duino.

    So basically my questions would be, is it worth investing some time into that chip, what’s the state of the community around it ?
    Are there other “arm” (32bit) low cost cpus that would be more interesting (understand popular) than the STM32 ?

    I would also recommend taking a look at that comparison video from Andreas Spiess

  25. May 19th, 2016 at 16:44 | #25

    I’m not following the MCU boards as much as the “Linux” boards, but if you want cheap 32-bit MCU boards STM32 and ESP8266 are the ones I have in mind. NXP LPC, Microchip PIC32, and EneryMicro (now Silabs) EFM32 are also popular, I think they are at a different price point. You could also go with some lesser known silicon vendors in Greater China (holtek, gigadevices,…) but for hobbyists it’s not really worthwhile I think.

    STM32F1 MCU family will be available at least until 2026 according to http://www.st.com/content/st_com/en/support/resources/product-longevity.html

  26. rasz_pl
    May 20th, 2016 at 02:20 | #26

    STM32F103C8T6 -> 64KB flash
    STM32F103CBT6 -> 128KB flash
    See here screenshot from data-sheet: http://imgur.com/D9f3jdO

    datasheet is a lie, you can flash 128KB on STM32F103C8T6, flash capacity is weakly enforced by reading chipid, override that and all of a sudden whole 128KB work

  27. May 20th, 2016 at 02:25 | #27

    How do you actually flash it in order to get 128KB?

  28. TonyT
    May 20th, 2016 at 06:26 | #28

    Another choice is ST’s Nucleo boards. They typically run ~$10, and include some higher end chips (such as the STM32F4xx), have Arduino & ST headers, and some affordable peripherals (stepper drivers, industrial I/O, etc) from ST.

    TI’s LaunchPads run about $10-$25, and include some off-beat choices (such as motor control DSP’s and safety-oriented ARM chips); the 430 series has by far the best community support. Energia (Arduino-clone) is available for many of the LaunchPads, along with CCS.

  29. zgoda
    May 27th, 2016 at 14:30 | #29

    Any details on how to override chipid? The only way I found so far is to recompile Texane ST-Link with with changed chipid (https://github.com/texane/stlink/blob/master/include/stlink/chipid.h).

  30. zgoda
    May 27th, 2016 at 15:52 | #30

    The Arduino framework is not that bad, but requires manual work to get it running with these boards. There’s an alternative framework from ARM called “mbed” that does the same as Arduino but it feels strange – only official boards from couple of vendors are supported, and only the newest ones, although the support code is still there (eg. STM32F0-DISCOVERY). The framework is open source on github but I can’t find any trace of stm32f103c8t6 being mentioned in either issues or pr, as if there was no interest in getting support. There’s a lot of confusing forks and repositories on both github and mbed developer site. The developer site is riddled with 404’s and other gizmos, with not fuctioning Questions section and oh my, what a mess. To isolate from this it’s best to use some 3rd party desktop IDE with PlatformIO or even bare commandline PlatformIO but still the generic boards are not supported by mbed framework. It just feels very strange – there’s cheap hardware (cheaper than clones of Arduino UNO R3), there’s enabler framework, yet there’s no interest in community in making this tick.

  31. onebir
    May 27th, 2016 at 16:38 | #31

    One reason might be that the cheap hardware doesn’t have a nice name like Arduino; they’re just STM32F103C8T6 dev boards. Even ESP8266 is more memorable. But that added wifi & BT at a dominant price point.

    Maybe calling them “STM32 PILL” boards will help people remember they exist, & galvanise some development work on the IDE etc…

  32. zgoda
    June 8th, 2016 at 20:58 | #32
  33. zgoda
    June 9th, 2016 at 16:03 | #33


    And it looks mbed devs opt for common name use so it will be called BluePill if the support makes into framework. PlatformIO devs show interest in incorporating support for these boards so there’s some hope.

  34. June 9th, 2016 at 16:45 | #34

    Nice work!

  35. zgoda
    July 6th, 2016 at 20:09 | #35

    Well, the eagle has landed, my PR got merged and will be included in release 122 of mbed framework. Add 2-3 weeks and working board definition will be in PlatformIO.

  36. mailliw
    September 26th, 2016 at 20:35 | #36

    The Sinclair already used alot of the overhead on video.

  37. mehum
    January 5th, 2017 at 08:40 | #37


    I don’t think so. These boards only have 64K of flash, micropython needs min 512K.

  1. No trackbacks yet.