Course: Bluetooth FPGA control via mobile app

Add Bluetooth connectivity to FPGA projects! Learn to control the color LEDs on your board from a phone and show VHDL signal values in the mobile app.

Category: Tags: , ,

Description

Learn to make an FPGA-powered Bluetooth gadget with this course. We’ll create a demo VHDL project that allows you to control the color and illumination intensity of LEDs on the FPGA board with a mobile app.

I will also show how to send tagged FPGA signal values in the opposite direction, from the FPGA to the phone. And we’ll implement pairing mode that allows a new phone to bond (exchange cryptographic keys) with the Bluetooth chip.

You’ll learn about advanced VHDL state machines, pattern matching, text parsing, timers, and how to create a self-checking testbench that precisely simulates the UART communication with the BLE transceiver.

The same methods are applicable for interfacing with other AT command set (ASCII command-based) devices that communicate with the host MCU, or FPGA in this case, over UART, including Wi-Fi modules like the ESP32.

See the video below for a preview of selected lessons.

This course is only available in the VHDLwhiz Membership.

The membership subscription gives you access to this and many other courses and VHDL resources.

You pay monthly to access the membership and can cancel the automatic renewal anytime. There is no lock-in period or hidden fees.

In this course, I use the Digilent Pmod BLE (Bluetooth Low Energy ) module with the Microchip RN4871 transceiver and the Arty A7-35T FPGA board.

I also provide constraint files for the Arty S7-50 board. But you can use almost any FPGA board, and if it has a Pmod connector, no wires are needed.

Hardware used in the course

Software used in the course

I am using Windows 11 in the course. All the other software is available for free for Windows and Linux:

Course outline

Number of lessons:
17
Average video duration:
12m38s
Total video duration:
3h34m

The overview below shows the lessons in this course.

video lesson icon/default Created with Sketch.

1 - Introduction

Welcome to the course! Let's talk about what we will create and what you can learn.

video lesson icon/default Created with Sketch.

3 - Top module and first communication with the BLE module

To establish initial communication with the Microchip RN4871 Bluetooth chip, we'll create a preliminary top-level VHDL module that forwards the UART signals to the computer.

video lesson icon/default Created with Sketch.

4 - Firmware update

Let's go through some basic ASCII commands and upgrade the RN4871 chip's firmware.

video lesson icon/default Created with Sketch.

5 - RN4870/71 BLE module commands

Let's derive a "program" or list of commands to use as factory settings, to enter pairing mode, and to enter normal Bluetooth gadget operation.

video lesson icon/default Created with Sketch.

6 - UART module and top-level entity

We'll use the UART buffered module from the VHDLwhiz resource library to implement the serial communication with the BLE chip. Let's also get the UART bus functional model (BFM) for the testbench.

video lesson icon/default Created with Sketch.

7 - PWM and debouncer modules

We can get a switch debouncer and pulse width modulation (PWM) module from the VHDLwhiz Membership resource library. We need them to interface with peripherals.

video lesson icon/default Created with Sketch.

8 - BLE controller module and top-level testbench

Let's start on the Bluetooth controller VHDL module that will contain the finite state machine that shall interact with the BLE device.

video lesson icon/default Created with Sketch.

9 - Top-level testbench UART BFM

See how to send ASCII strings over UART in the VHDL testbench while reading and checking the responses from the device under test (DUT).

video lesson icon/default Created with Sketch.

10 - Send UART message VHDL procedure

Finally, we'll start implementing the finite state machine (FSM) in the Bluetooth controller module that will communicate with the RN4871 chip.

video lesson icon/default Created with Sketch.

11 - Pattern match module

We'll use multiple pattern-matching VHDL modules to continuously monitor the bytes that arrive from the Bluetooth chip, looking for predefined tag strings.

video lesson icon/default Created with Sketch.

12 - Timer module

To stay in pairing mode for a maximum of 60 seconds, we need a timer. We'll also use this VHDL stop watch implementation to avoid waiting for status messages indefinitely.

video lesson icon/default Created with Sketch.

13 - Procedure to wait for UART reply

Interacting with the Bluetooth chip over UART requires waiting for status messages or command replies. We'll make a VHDL procedure to handle that in our FSM.

video lesson icon/default Created with Sketch.

14 - Bluetooth pairing sequence

Let's implement the rest of the Bluetooth pairing sequence by using our send message and wait for reply VHDL procedures.

video lesson icon/default Created with Sketch.

15 - Value reader Bluetooth messages parser module

To pass VHDL signal values to the FPGA over Bluetooth, we'll send them as ASCII hex characters and prefix them with known text string tags.

video lesson icon/default Created with Sketch.

16 - Transmitting user switch values over Bluetooth

It's also possible to pass VHDL signal values from the FPGA to the mobile app over Bluetooth. We'll use two toggle switches on the board for this demo.

video lesson icon/default Created with Sketch.

17 - FPGA board and Bluetooth mobile app design test

Get ready to be amazed! If everything goes well, we'll be interacting with the FPGA from our mobile phone app over Bluetooth.

This course is only available in the VHDLwhiz Membership.

The membership subscription gives you access to this and many other courses and VHDL resources.

You pay monthly to access the membership and can cancel the automatic renewal anytime. There is no lock-in period or hidden fees.

Reviews

There are no reviews yet.

Be the first to review “Course: Bluetooth FPGA control via mobile app”

Your email address will not be published. Required fields are marked *