The blog of a dedicated radio amateur and electronics enthusiast

"Having fun on the air and in the workshop - communicating and creating"
Showing posts with label ESP32. Show all posts
Showing posts with label ESP32. Show all posts

16 July 2023

Mobile App User Interface for a DDS Module 📶

I previously featured a DDS module based on the Analog Devices AD9850 32bit device on 4.1.2018. The method I used then to generate an output frequency from the DDS board involved an SPI-USB protocol converter dongle with pc terminal software.
Another method I recently devised uses a micro-controller and my custom "DDSTerm" App installed on a mobile phone📱. As before SPI protocol is still needed to upload the tuning word, phase and power control bytes to the DDS configuration register and this operation is now performed by the micro-controller. But instead of software running on a pc, the App is now used to generate the bytes required, which are then sent using BluetoothⓇ Low Energy ( BLE ) to the micro-controller. An ESP32 micro-controller has SPI peripherals and built-in BluetoothⓇ, and so was used.
App 'DDSTerm_v1.06' opened
The micro-controller functions as a BLE server 'AD9850_DDS'. The App on the client device scans for this server and connects to it. The desired frequency, phase and power mode are entered. Clicking "Generate" produces the required 5 bytes ( hex 004831C8C4 in the image example ), and clicking "Send to DDS" sends the bytes using BluetoothⓇ to the ESP32, which then uploads them to the DDS board on the SPI.  An output is generated on the selected frequency, e.g., 137.7KHz. Clicking 'PWR DWN' puts the DDS in 'sleep' mode. The two yellow LEDS ( see image below ) are toggled on/off with GPO1 & GPO2. The last uploaded frequency is saved and automatically recalled whenever the App connects.
The hardware setup during development & testing
The hardware ( image above ) consists of an AD9850 DDS module board bought very cheaply on-line and mounted on my test jig from 4.1.2018. Inside the 3D-printed blue and yellow enclosure is the ESP32 micro-controller development board which is a typical one having the ESP32-WROOM-32 processor. Both the DDS and ESP32 are 3.3v supply and logical level compatible. No level shifting is therefore required when interconnecting.
I also use DDS modules fitted with the AD9851 chip; see 2.11.2017. The only changes to the App, ( other than selecting the correct device ), would be a 'x6 Reference Clock Multiplier' checkbox, and extending the frequency range of the 'slider control'; both optional.

DDS = Direct Digital Synthesis.
GPO = General Purpose Output
SPI = Serial Peripheral Interface ( 3-wire bus ). 
 

08 August 2022

Soil Moisture Meter - update

I recently discovered a supplier of 3D printed enclosures for TTGO LoRa32v2 microcontroller development boards, and bought a couple. I have used a red one to give a completely new appearance to the LoRa link indoor receiver module. These enclosures are also available in black and dark blue.
The slot (top) is for a supplied fixing clamp ( not shown )

Having also upgraded the firmware, I am now uploading moisture data both to the Ubidots cloud and, simultaneously, to Thingspeak (see a previous post) without the Node-RED server.
From my Ubidots dashboard I can remotely turn on/off a green LED ( see image above ).  This feature could be used instead to control a solenoid valve for an automatic watering system.
Part of my Ubidots dashboard for the 'Soil Moisture Meter'


 

02 August 2020

Wi-Fi and Bluetooth with ESP8266 & ESP32

Several years ago I began experimenting with Wi-Fi using modules based upon the ESP8266 family of devices manufactured by Espressif Systems in Shanghai. They are microcontroller chips with built-in 2.4GHz Wi-Fi capability. Development boards using these chips are readily available at very low cost from many different suppliers. At first I used the basic ESP8266-01 incorporating the ESP8266EX chip, and then progressed to boards with more functionality ( I/O, serial comms, ADC etc ) i.e., the NodeMCU-12E using the ESP8266MOD. I was thinking about some IoT ( Internet of Things ) applications. Although I made some gadgets, nothing was actually being controlled remotely. Eventually I moved on to other activities.
However, my interest in this topic returned recently after discovering the successor to the ESP8266, namely the ESP32, ( 32bit, 240MHz clock & more memory ), with both built-in Wi-Fi and Bluetooth ( classic Bluetooth & Bluetooth Low Energy, BLE, server & client ) capability; also development boards incorporating the ESP32 such as the NodeMCU-32S and some others including a video camera ( ESP32-CAM ) or an OLED display ( Heltec WiFi Kit 32 ). All these remarkable devices cost only a few dollars.
My collection of Wi-Fi & Bluetooth development modules
In the above image, left to right :-
NodeMCU-12E, Wi-Fi only.
NodeMCU-32S, Wi-Fi and Bluetooth.
WiFi Kit 32, Wi-Fi and Bluetooth, 128 x 64 px OLED display.
ESP32-CAM, Wi-Fi and Bluetooth, 2Mpx video camera, 4GB uSD card slot.
ESP8266-01, Wi-Fi only.

Perhaps I'll make a BLE server to notify a value from an unusual sensor; e.g., air quality, charged particles, UV, magnetic field. ( Obviously for my personal experimental use in my private capacity as a hobbyist. )

( I tweeted updates to this post on 5 August 2020 and 12 August 2020. Click on the link on the left ).