2BIT || ! 2BIT 👨‍💻
  • Home
  • Blog
  • About
  • Social
  • Affiliate ​Store
  • Home
  • Blog
  • About
  • Social
  • Affiliate ​Store

Debug I2C communication from MPU6050 to STM32F103C8T6 using Hantek 6022BE USB Oscilloscope

2/1/2018

 
Today I wanted to talk about a video that inspired me by Joop Brokking
it’s a tutorial video about STM32F103C8T6 ARM STM32 Minimum System Development board known also as the Blue Pill and how to program it to use the MPU-6050 sensors board via I2C
AliExpress.com Product - 1 pices STM32F103C8T6 ARM STM32 Minimum System Development Board Module For arduino Sensing Evaluation for Skiller
AliExpress.com Product - Free Shipping X 10PCS/LOT GY-521, MPU-6050 Module ,MPU6050 module ,3 Axis analog gyro sensors+ 3 Axis Accelerometer Module
In this video Joop tested the i2c communication from the MPU-6050 sensors board to the STM32F103C8T6 ARM-M3 Micro controller

He used a real hardware Oscilloscope to test the signal
and show the errors and how to fix them

These hardware Oscilloscopes are very useful
but could also be quite expensive, especially for a beginner

So I thought why not replicate the hardware setup and try the same experiment with my Hantek 6022BE PC USB Digital portable Oscilloscope
And see how the single looks like or if it’s even capable measuring these kind of signals
AliExpress.com Product - Hantek 6022BE PC USB Digital portable Oscilloscope Storage 2Channels 20MHz 48M Portable PC USB Oscilloscopes Handheld 6022BE
​The Hantek 6022BE PC USB Digital portable Oscilloscope, is a PC USB Digital portable Oscilloscope that features 2 20MHz analog Channels at 48M, and single can be shown on the computer with a dedicated software that comes with it
​
I have tested the 100KHz and 400KHz with no problem
You can see the clock signal and the data signal
As can be seen here it works great and it only costs around 70$
Picture
Picture
There are multiple ways to investigate the signal
and the software has some nice measuring capabilities

But of course it has less features than the hardware ones
and probably will not work at the higher scales of Mhz signals

I have also tried the same experiment with my USB 24MHz 8 Channel Logic Analyzer and the results were also great and this one only costs around 10$, but cannot debug analog signals only digital ones (i2c, spi, UART , etc...)
AliExpress.com Product - New USB Logic SCM 24MHz 8 Channel Logic Analyzer Debugger for ARM FPGA High Quality
Picture
To program the STM32 you will beed an FTDI programer connected to the STM32 B6 and B7
AliExpress.com Product - Free shipping 1pcs/lot New FT232RL FT232 USB TO TTL 5V 3.3V Download Cable To Serial Adapter Module For Ardui USB TO 232
Check out the full tutorial about programming the STM32F103C8T6 here
Picture
I2C test

    AliExpress.com Product - Free shipping! Microcontroller learning kit starter and proficient 24 interactive lessons for arduino
    View my profile on LinkedIn

    Categories

    All
    ARDUINO
    ELECTRONICS
    Embedded
    Raspberry Pi
    STM32F103C8T6
    TOOLS

    RSS Feed

Don't forget 📝

If you like what your read and it helped you trough the development and professional 
​growing 
​journey, please subscribe and share.

Get in touch 👇