Difference between revisions of "BLUE-PILL-HUB"

From Land Boards Wiki
Jump to navigation Jump to search
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[File:tindie-mediums.png|link=https://www.tindie.com/products/land_boards/blue-pill-breakouti2c-hub-pcb-only/]]
  
[[File:BluePillHub-P682-cropped-720px.jpg]]
+
[[File:BluePillHub-P101-cropped-720px.jpg]]
  
 
== Features ==
 
== Features ==
  
* Carrier for the [[STM32|STM32 Blue Pill Board]]
+
* Carrier for the [[STM32_Blue_Pill|STM32 Blue Pill Board]]
 
** STM32F103 CPU
 
** STM32F103 CPU
 
* I2C Hub - [https://www.ti.com/lit/ds/symlink/pca9544a.pdf PCA9544A]
 
* I2C Hub - [https://www.ti.com/lit/ds/symlink/pca9544a.pdf PCA9544A]
** 4-channel
+
** 4-channel I2C
** Independent 3.3V/5V power for each channel
+
** Independent 3.3V/5V power for each I2C channel
* Separate interrupts for each channel
+
** Separate interrupts for each channel
* GVS connections for Blue Pill pins
+
* GVS (Ground,3.3V/Signal) connections for Blue Pill pins
 
* Reset switch
 
* Reset switch
  
Line 18: Line 19:
  
 
* [https://github.com/land-boards/lb-boards/blob/master/ODAS%20Cards/Blue-Pill-Hub/BluePillBoard/stm32f103c8t6_schematic.png Blue Pill module schematic]
 
* [https://github.com/land-boards/lb-boards/blob/master/ODAS%20Cards/Blue-Pill-Hub/BluePillBoard/stm32f103c8t6_schematic.png Blue Pill module schematic]
 +
* [https://www.onetransistor.eu/2020/01/stm32-bluepill-arduino-support.html Install official support for STM32 bluepill on Arduino IDE and start programming and uploading sketches with STM32CubeProgrammer]
 
* [https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill.html Nice description of the Blue Pill Boards]
 
* [https://stm32-base.org/boards/STM32F103C8T6-Blue-Pill.html Nice description of the Blue Pill Boards]
 
* [https://www.electronicshub.org/getting-started-with-stm32f103c8t6-blue-pill/ Getting Started with STM32F103C8T6 Blue Pill]
 
* [https://www.electronicshub.org/getting-started-with-stm32f103c8t6-blue-pill/ Getting Started with STM32F103C8T6 Blue Pill]
 
* [https://www.youtube.com/watch?v=XMB11p4eHiY Replace R10 with 1.5K resistor to fix STM32 USB D+ pull-up]
 
* [https://www.youtube.com/watch?v=XMB11p4eHiY Replace R10 with 1.5K resistor to fix STM32 USB D+ pull-up]
 +
* [https://www.electronicshub.org/working-with-interrupts-in-stm32f103c8t6/ Working with Interrupts in STM32F103C8T6 Blue Pill Board]
 +
 +
=== STM32F103 Arduino Pin Mapping ===
 +
 +
* Arduino pin  2 = B7
 +
* Arduino pin  3 = B6
 +
* Arduino pin  4 = B5
 +
* Arduino pin  5 = B4
 +
* Arduino pin  6 = B3
 +
* Arduino pin  7 = A15
 +
* Arduino pin  8 = A12
 +
* Arduino pin  9 = A11
 +
* Arduino pin 10 = A10
 +
* Arduino pin 11 = A9
 +
* Arduino pin 12 = A8
 +
* Arduino pin 13 = B15
 +
* Arduino pin 14 = B14
 +
* Arduino pin 15 = B13
 +
* Arduino pin 16 = null
 +
* Arduino pin 17 = C13, onboard led, input only.
 +
* Arduino pin 18 = C14
 +
* Arduino pin 19 = C15
 +
* Arduino pin 20 = A0
 +
* Arduino pin 21 = A1
 +
* Arduino pin 22 = A2
 +
* Arduino pin 23 = A3
 +
* Arduino pin 24 = A4
 +
* Arduino pin 25 = A5
 +
* Arduino pin 26 = A6
 +
* Arduino pin 27 = A7
 +
* Arduino pin 28 = B0
 +
* Arduino pin 29 = B1
 +
* Arduino pin 30 = B10
 +
* Arduino pin 31 = B11
  
 
== Connectors ==
 
== Connectors ==
Line 117: Line 153:
 
# n/c
 
# n/c
 
# PB9
 
# PB9
# I2C_INT (PB8)
+
# PB8 = I2C_INT
# I2C_SDA1 (PB7)
+
# PB7 = I2C_SDA1
# I2C_SCL (PB6)
+
# PB6 = I2C_SCL
 
# PB5
 
# PB5
 
# PB4
 
# PB4
Line 176: Line 212:
 
* H7 should not be installed if H8 is installed
 
* H7 should not be installed if H8 is installed
  
=== H9 - Hub Chip Address ===
+
=== H9 - I2C Mux Chip Address Offset ===
  
* Select the address of the PCA9544A I2C hub
+
* 2x3 header
 +
* Select the address offset of the PCA9544A I2C hub
 +
* Base address = 0x70
 +
* A0-A2 - address offset jumpers
 +
* Install for 0, remove for 1
 +
* Typical use 0x71 = remove A0, install A1, A2
  
 
== Switches ==
 
== Switches ==
Line 186: Line 227:
 
* Press to reset Blue Pill board
 
* Press to reset Blue Pill board
  
=== SW2 - Switch on/off J1, J4 power source ===
+
=== SW2 - Power Switch (Rev 4) ===
 +
 
 +
* Switches on/off J1, J4 power source
  
 
== Schematic ==
 
== Schematic ==
  
* [https://github.com/land-boards/lb-boards/blob/master/ODAS%20Cards/Blue-Pill-Hub/BLUE-PILL-HUB-Rev2_Schematic.pdf Schematic]
+
* [https://land-boards.com/BLUE-PILL-HUB/BLUE-PILL-HUB-Rev3_Schematic.pdf Schematic] - Rev X3 Board
 +
* [https://land-boards.com/BLUE-PILL-HUB/BLUE-PILL-HUB-Rev4_Schematic.pdf Schematic] - Rev 4 Board
  
 
== Drivers ==
 
== Drivers ==
Line 212: Line 256:
 
*** Port: [the comm port]
 
*** Port: [the comm port]
  
[[File:ArduinoIDE_Tools_Menu.png]]
+
[[File:ArduinoIDE_Tools_Menu_2.png]]
  
 
* Upload code
 
* Upload code
Line 233: Line 277:
 
[[File:SerialPropogramming (AN3155).PNG]]
 
[[File:SerialPropogramming (AN3155).PNG]]
  
== Rev 4 ==
+
== Rev 4 Board ==
  
 
* Change FTDI to Module
 
* Change FTDI to Module
 +
* Added power switch for DC Jack or 5mm jumper block
  
[[File:P1725-crop-720px.jpg]]
+
[[File:BluePillHub-P101-cropped-720px.jpg]]
  
 
== Rev 1 Board ==
 
== Rev 1 Board ==

Latest revision as of 12:21, 6 April 2022

Tindie-mediums.png

BluePillHub-P101-cropped-720px.jpg

Features

  • Carrier for the STM32 Blue Pill Board
    • STM32F103 CPU
  • I2C Hub - PCA9544A
    • 4-channel I2C
    • Independent 3.3V/5V power for each I2C channel
    • Separate interrupts for each channel
  • GVS (Ground,3.3V/Signal) connections for Blue Pill pins
  • Reset switch

Blue Pill Module

STM32F103C8T6-Blue-Pill-Pin-Layout.gif

STM32F103 Arduino Pin Mapping

  • Arduino pin 2 = B7
  • Arduino pin 3 = B6
  • Arduino pin 4 = B5
  • Arduino pin 5 = B4
  • Arduino pin 6 = B3
  • Arduino pin 7 = A15
  • Arduino pin 8 = A12
  • Arduino pin 9 = A11
  • Arduino pin 10 = A10
  • Arduino pin 11 = A9
  • Arduino pin 12 = A8
  • Arduino pin 13 = B15
  • Arduino pin 14 = B14
  • Arduino pin 15 = B13
  • Arduino pin 16 = null
  • Arduino pin 17 = C13, onboard led, input only.
  • Arduino pin 18 = C14
  • Arduino pin 19 = C15
  • Arduino pin 20 = A0
  • Arduino pin 21 = A1
  • Arduino pin 22 = A2
  • Arduino pin 23 = A3
  • Arduino pin 24 = A4
  • Arduino pin 25 = A5
  • Arduino pin 26 = A6
  • Arduino pin 27 = A7
  • Arduino pin 28 = B0
  • Arduino pin 29 = B1
  • Arduino pin 30 = B10
  • Arduino pin 31 = B11

Connectors

J1 - 5V power

  • DC jack
  • 5V
  • Center positive

J4 - 5V Power

  • 5mm terminal block

J7 - I2C

  • The I2C interface that goes to the I2C hub part
  1. SCL (PB6)
  2. SDA (PB7)
  3. 3.3V
  4. GND

P1 - 5V

  • 2x4 header with 5V from H2 (Rev 4 card)

P2 - Vbattery

  • Battery power to the Blue Pill board
  1. GND
  2. Vbat

P3 - FTDI connector (Rev X1-X3)

  • To cable to FTDI wires swap pins 4 and 5 in cable
  • FTDI card jumper has to be set to 3.3V since STM32 has 3.3V signal levels
  1. GND
  2. N/C
  3. VCC (to H8 pin 2)
  4. TX (to Blue Pill RX) (PA10 pin on STM32)
  5. RX (to Blue Pill Tx) (PA9 pin on STM32)
  6. RESET*

FTDI rot.jpg

P3 - FTDI Module (Rev 4 or higher)

  • Cheap FT232 module pinout

FTDI rot.jpg

P4, P5, P6, P7 - I2C Interfaces #0-#3

  1. INT*
  2. SCL
  3. SDA
  4. VCC
  5. GND

P8 - SPI

  1. PA6 (MISO)
  2. 3.3V
  3. PA5 (SCK)
  4. PA7 (MOSI)
  5. RES
  6. GND

P11/P12 - GVS Connector

  • Ground, Power, Signal pins
  1. n/c
  2. PC13
  3. PC14
  4. PC15
  5. PA0
  6. PA1
  7. PA2
  8. PA3
  9. PA4
  10. PA5/SCK1
  11. PA6/MISO1
  12. PA7/MOSI1
  13. PB0
  14. PB1
  15. PB10
  16. PB11

P12/P13 - GVS Connector

  • Ground, Power, Signal pins
  1. n/c
  2. PB9
  3. PB8 = I2C_INT
  4. PB7 = I2C_SDA1
  5. PB6 = I2C_SCL
  6. PB5
  7. PB4
  8. PB3
  9. PA15
  10. PA12
  11. PA11
  12. RX
  13. TX
  14. PA8
  15. PB15
  16. PB14
  17. PB13
  18. PB12

Headers

H1 - 3.3V (Rev X1-X3)

  • Install to power 3.3V from regulator

H1 - 3.3V source select

  • 1-2 power from 5V to 3.3V regulator
  • 2-3 Power from Blue Pill board 3.3V regulator

H2 - 5V Jumper (Rev X1-X3)

  • Install to connect J4 and J1 5V

H2 - 5V Power Source (Rev 4 or higher)

  • T-shaped header
  • Up - Power 5V from BluePill Hub USB power
  • Left - Power 5V from DC Jack
  • Down - Power 5V from FTDI 5V

H3, H4, H5, H6 - I2C Power

  • Select the power to the I2C interface
  • Install in one of the two positions to power external I2C interface from the board
  • Remove if power comes in from external I2C interface
  1. 3.3V
  2. 5V

H7 - 3.3V from Blue Pill module 3.3V regulator

  • Install = power on-board 3.3V circuitry from regulator on Blue Pill module
    • H8 should not be installed if H7 is installed

H8 - Power from FTDI

  • 1-2 = 3.3V from FTDI (don't ever do this)
  • 2-3 = 5V from FTDI (probably don't do this)
  • H7 should not be installed if H8 is installed

H9 - I2C Mux Chip Address Offset

  • 2x3 header
  • Select the address offset of the PCA9544A I2C hub
  • Base address = 0x70
  • A0-A2 - address offset jumpers
  • Install for 0, remove for 1
  • Typical use 0x71 = remove A0, install A1, A2

Switches

SW1 - Reset Switch

  • Press to reset Blue Pill board

SW2 - Power Switch (Rev 4)

  • Switches on/off J1, J4 power source

Schematic

Drivers

Uploading Code

  • FTDI connection to Blue Pill Hub FTDI connector
    • FTDI TX (to Blue Pill RX) (PA10 pin on STM32)
    • FTDI RX (to Blue Pill Tx) (PA9 pin on STM32)
  • Set Switch (or jumper) on Blue Pill module set towards center of card to download

BluePill Jumper.png

  • In Arduino IDE,
    • Tools
      • Board "Generic..."
      • Upload method: "Serial..."
      • Port: [the comm port]

ArduinoIDE Tools Menu 2.png

  • Upload code
    • Takes a while
  • Set Switch (or jumper) on Blue Pill module set towards edge of card to run
  • Press reset button

Testing

BPH-P711-720px.jpg

Programming

SerialPropogramming (AN3155).PNG

Rev 4 Board

  • Change FTDI to Module
  • Added power switch for DC Jack or 5mm jumper block

BluePillHub-P101-cropped-720px.jpg

Rev 1 Board

BluePillHub-P682-cropped-720px.jpg

Assembly Sheet