element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Lazy and cheap expansion of RPi hardware using 1 dollar STM32 MCU & few wires
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
GPIO Pinout
Raspberry Pi Wishlist
Comparison Chart
Quiz
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: remcu
  • Date Created: 16 Jun 2020 12:02 PM Date Created
  • Views 4606 views
  • Likes 4 likes
  • Comments 5 comments
Related
Recommended
  • embedded microcontroller
  • peripherals
  • raspberry
  • stm32 microcontrollers
  • peripheral controller
  • peripheral_drivers
  • mcu*
  • 32-bit mcu
  • peripheral
  • embedded
  • stm32
  • peripheral_board
  • microcontroller
  • prototyping_peripheral
  • digital_peripheral_equipment

Lazy and cheap expansion of RPi hardware using 1 dollar STM32 MCU & few wires

remcu
remcu
16 Jun 2020

As you know, Raspberry Pi doesn't have native ADC, DAC, CAN Bus controller and other low-level peripherals found in most modern microcontrollers(MCU), such as STM32, Arduino Due, Teensy dev board. Normally this issue is ensured through external modules added to Raspberry Pi board. These are I2C and SPI modules like MCP3008(ADC chip), MCP2515(CAN bus), MCP4725(DAC) and other MCPXXX-like boards.

image

But if you use an MCU for these purposes you have multiple peripherals at the same time. However, the MCU requires the firmware development, flashing and communication protocol implementation. In this case the code running on the Raspberry computer and the embedded firmware are written separately. Debugging communication problems occur on two completely disparate platforms.

image

It would be great if our programs running on Rpi can work with MCU's peripherals without firmware development and transferring messages (command) between the board and the computer. As if these peripherals were a part of Raspberry SoC.

image

 

Fortunately, Raspberry developers have a tool for dealing with this!

 

The REMCU Lib provides a way to harness the power of a more powerful machine to run complex processing while using the microcontroller being used to collect data from sensors and execute desired outputs. The library lets your Linux user space programs give access to all peripherals of tethered MCU by remote execution of SDK driver code provided by vendors or 3rd parties.

image

In essence the MCU’s peripherals become a part of Raspberry SoC like other Raspberry peripherals SPI, HDMI, USB etc.

No need to develop firmware, flash the chip and setup communication. You can just call the peripheral driver functions in C/C++ or Python applications.

image

In this video, one has shown how to make that. There are basic examples of GPIO control as well as ADC and DAC conversion on STM32

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

GitHub repo with examples: https://github.com/remotemcu/remcu_examples/

The repository does have the detailed instructions how to install the library and OpenOCD utility or just take the readily available image of Raspbian. As well as it has the examples to work with the ADC, DAC, GPIO and CAN bus controller of STM32 chip from Raspbian environment.

 

There is available the REMCU Raspberry version for STM32F103(Blue Pill board too), STM32F0 and STM32F407 microcontrollers to download for now.

 

I believe this approach can provide the absolute fastest and most flexible way to tackle your experiments, hobbies, and design projects, while reducing equipment costs of high speciality MCPXXX boards.

 

Would you be interested in the library version for other STM32 or some other MCU?

  • Sign in to reply

Top Comments

  • mp2100
    mp2100 over 5 years ago +2
    This is a good idea, it makes the raspberry pi much more flexible for sensor I/O. I've gone the MCP3008 route before to get analog inputs on the Pi. The link to the Blue Pill board is informative, no link…
  • shabaz
    shabaz over 5 years ago +2
    However, this is a precompiled library "community edition" with no (or partial) source code? could confirm if this is the case, or if I've misunderstood? Is this project entirely open source, or not?
  • remcu
    remcu over 5 years ago in reply to shabaz +1
    Yes, thanks for your note! The library is not an open source project for now. Our team plans to publish the source in GitHub at year-end. But I'm afraid the Covid situation in the world can possibly affect…
Parents
  • mp2100
    mp2100 over 5 years ago

    This is a good idea, it makes the raspberry pi much more flexible for sensor I/O.  I've gone the MCP3008 route before to get analog inputs on the Pi.  The link to the Blue Pill board is informative, no link to buy it.  I don't see the blue pill board for sale on Newark.  When I search ebay and amazon for stm32 blue pill several options do show up.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • mp2100
    mp2100 over 5 years ago

    This is a good idea, it makes the raspberry pi much more flexible for sensor I/O.  I've gone the MCP3008 route before to get analog inputs on the Pi.  The link to the Blue Pill board is informative, no link to buy it.  I don't see the blue pill board for sale on Newark.  When I search ebay and amazon for stm32 blue pill several options do show up.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • remcu
    remcu over 5 years ago in reply to mp2100

    Hi Allen,

    We did not add link to buy it to provide users have freedom to choose the market.

     

    For instance you can buy it here, I don't have anything to do with the salers:

    https://www.amazon.com/STM32F103C8T6-Minimum-System-Development-Module/dp/B07SBWJWPS

    https://www.ebay.com/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-For-Arduino-NEW/223585760908

    and the most cheap option:

    https://aliexpress.ru/item/4001025262808.html

     

    If you need the analog and GPIO pins only, I am suggesting you consider cheaper, alternate STM32 board:

    https://www.amazon.com/STM32F030F4P6-Systems-Development-Cortex-M0-System/dp/B07SRLNQC4/

    https://www.ebay.com/itm/1PCS-STM32F030F4P6-ARM-CORTEX-M0-Core-Minimum-System-Dev-Board-for-Arduino/182216811895

    https://aliexpress.ru/item/4000965480170.html

     

    Our GitHub repo has also samples to work with that.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube