Jump to content
Electronics-Lab.com Community

Search the Community

Showing results for tags 'dfrobot'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Electronics Forums
    • Projects Q/A
    • Datasheet/Parts requests
    • Electronic Projects Design/Ideas
    • Power Electronics
    • Service Manuals
    • Theory articles
    • Electronics chit chat
    • Microelectronics
    • Electronic Resources
  • Related to Electronics
    • Spice Simulation - PCB design
    • Inventive/New Ideas
    • Mechanical constructions/Hardware
    • Sell/Buy electronics - Job offer/requests
    • Components trade
    • High Voltage Stuff
    • Electronic Gadgets
  • General
    • Announcements
    • Feedback/Comments
    • General
  • Salvage Area

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Skype


Location


Interests

Found 5 results

  1. In this tutorial, I will guide you on how to create a temperature and humidity monitoring system that can be controlled by voice using a FireBeetle and a DHT11 sensor. Imagine being able to ask your FireBeetle about the current temperature and getting a visual response! Let's dive into the details. 💡 Components Required: DFRobot FireBeetle 2 ES32 S3 DHT11 Temperature and Humidity Sensor DFRobot Gravity Offline Voice Recognition sensor Jumper Cables 🔌 Wiring Diagram: Connect the DHT11 sensor to the FireBeetle as follows: GND pin: Connect to GND (0V). VCC pin: Connect to VCC (5V or 3.3V). DATA pin: D5 If you’re using a DHT11 module, it may have a built-in resistor, eliminating the need for an external one. Connect the Offline Voice Recognition sensor to the FireBeetle as follows: GND pin: Connect to GND (0V). VCC pin: Connect to VCC (5V or 3.3V). DATA pin: SDA CLOCK pin:SCL Finally, connect the TFT screen to the FireBeetle directly via the connector interface. Get PCBs for Your Projects Manufactured You must check out PCBWAY for ordering PCBs online for cheap! You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop. Also, check out this useful blog on PCBWay Plugin for KiCad from here. Using this plugin, you can directly order PCBs in just one click after completing your design in KiCad. 1️⃣ Train the custom voice commands: This DFRobot Gravity Offline Voice Recognition Sensor sensor is designed for Arduino, Raspberry Pi, Python, and ESP32 platforms. It allows you to recognize voice commands without an internet connection and comes with built-in fixed command words as well as the ability to add custom commands. Here are the steps to train custom voice commands: First, connect the Voice Recognition sensor's VCC pin to 5V and GND to GND. Then wake up the sensor by saying "Hello Robot" Next, say "Learning command word", this will help us to add our own command words. Once the system ready, train with your custom commands. Here I have created two commands, one is what is the temperature? and the next one is what is the humidity? These commands have some specific ID. Normally the first command id is 5 then the following will be 6,7 and so on. In my case what is the temperature? is command is 5 and what is the humidity? is command is 6. 2️⃣ Install Required Libraries: In your Arduino IDE or other development environment, install the necessary libraries for the Gravity Voice Recognition Sensor. You can find the library on the DFRobot GitHub repository. As well as the DHT11 sensor. 3️⃣ Programming the FireBeetle: Write a program to interface with the sensor. You can use the provided example code or create your own. This code will get the DHT11 temp and humidity value. #include <dht11.h> dht11 DHT; #define DHT11_PIN 4 void setup(){ Serial.begin(9600); Serial.println("DHT TEST PROGRAM "); Serial.print("LIBRARY VERSION: "); Serial.println(DHT11LIB_VERSION); Serial.println(); Serial.println("Type,\tstatus,\tHumidity (%),\tTemperature (C)"); } void loop(){ int chk; Serial.print("DHT11, \t"); chk = DHT.read(DHT11_PIN); // READ DATA switch (chk){ case DHTLIB_OK: Serial.print("OK,\t"); break; case DHTLIB_ERROR_CHECKSUM: Serial.print("Checksum error,\t"); break; case DHTLIB_ERROR_TIMEOUT: Serial.print("Time out error,\t"); break; default: Serial.print("Unknown error,\t"); break; } // DISPLAT DATA Serial.print(DHT.humidity,1); Serial.print(",\t"); Serial.println(DHT.temperature,1); delay(2000); } Here is the complete sketch to configure DHT11 for voice recognition. #include <Wire.h> #include "DFRobot_GDL.h" #define TFT_DC D2 #define TFT_CS D6 #define TFT_RST D3 #include <DFRobot_DHT11.h> DFRobot_DHT11 DHT; #define DHT11_PIN D5 DFRobot_ST7789_240x320_HW_SPI screen(/dc=/TFT_DC,/cs=/TFT_CS,/rst=/TFT_RST); #include "DFRobot_DF2301Q.h" //I2C communication DFRobot_DF2301Q_I2C DF2301Q; void setup() { Serial.begin(115200); screen.begin(); Wire.begin(); // Init the sensor while ( !( DF2301Q.begin() ) ) { Serial.println("Communication with device failed, please check connection"); delay(3000); } Serial.println("Begin ok!"); DF2301Q.setVolume(7); DF2301Q.setMuteMode(0); DF2301Q.setWakeTime(15); uint8_t wakeTime = 0; wakeTime = DF2301Q.getWakeTime(); Serial.print("wakeTime = "); Serial.println(wakeTime); DF2301Q.playByCMDID(23); // Common word ID } void loop() { uint8_t CMDID = 0; CMDID = DF2301Q.getCMDID(); c if (0 != CMDID) { Serial.print("CMDID = "); Serial.println(CMDID); int16_t color = 0x00FF; screen.setTextWrap(false); screen.setRotation(1); screen.fillScreen(COLOR_RGB565_BLACK); screen.setTextColor(COLOR_RGB565_GREEN); screen.setFont(&FreeMono9pt7b); screen.setTextSize(1.5); screen.setCursor(0, 30); screen.println("CNID: "); screen.setCursor(130, 30); screen.setTextColor(COLOR_RGB565_RED); screen.println(CMDID); if (CMDID == 5) { Serial.print("CMDID = "); Serial.println(CMDID); DHT.read(DHT11_PIN); Serial.print("temp:"); Serial.print(DHT.temperature); Serial.print(" humi:"); Serial.println(DHT.humidity); int16_t color = 0x00FF; screen.setTextWrap(false); screen.setRotation(1); screen.fillScreen(COLOR_RGB565_BLACK); screen.setTextColor(COLOR_RGB565_GREEN); screen.setFont(&FreeMono9pt7b); screen.setTextSize(1.8); screen.setCursor(20, 50); screen.println("Tempearature: "); screen.setTextColor(COLOR_RGB565_RED); screen.setCursor(160, 50); screen.println(DHT.temperature); screen.setCursor(190, 50); screen.println(" C"); } if (CMDID == 6) { Serial.print("CMDID = "); Serial.println(CMDID); DHT.read(DHT11_PIN); Serial.print("temp:"); Serial.print(DHT.temperature); Serial.print(" humi:"); Serial.println(DHT.humidity); int16_t color = 0x00FF; screen.setTextWrap(false); screen.setRotation(1); screen.fillScreen(COLOR_RGB565_BLACK); screen.setTextColor(COLOR_RGB565_GREEN); screen.setFont(&FreeMono9pt7b); screen.setTextSize(1.8); screen.setCursor(20, 50); screen.println("Humidity: "); screen.setTextColor(COLOR_RGB565_RED); screen.setCursor(160, 50); screen.println(DHT.humidity); screen.setCursor(190, 50); screen.println(" %"); } } delay(1000); } 4️⃣ Testing and Refinement: Upload your program to the FireBeetle, select the correct COM port, and wait until it finishes the upload. Test the sensor by speaking the fixed command words and your custom commands. And look at the serial terminal for the response. Finally, you can see the DHT11 data on the TFT screen. 5️⃣ Use in Your Project: Now that your sensor recognizes custom voice commands, integrate it into your project. For instance, control home automation devices, trigger specific actions, or create interactive audio experiences. Remember that the sensor’s self-learning function allows you to train it with various sounds, not just voice. So, get creative! You can use whistles, snaps, or even cat meows as custom commands. 🎙️🔊 For more detailed information, refer to the DFRobot Wiki and explore the Hackster project. Happy hacking! 🚀
  2. Creating a voice-controlled lighting system can add a touch of magic to any environment. In this blog, we’ll explore how to integrate the DFRobot Gravity: Offline Language Learning Voice Recognition Sensor with a Neo Pixel light strip, all controlled by a Beetle ESP32 C3 microcontroller. Introduction to DFRobot Gravity Voice Recognition Sensor The DFRobot Gravity: Offline Voice Recognition Sensor is a powerful module designed for voice command projects. Here are its key features: Offline Operation: Unlike cloud-based solutions, this sensor works without an internet connection. It’s built around an offline voice recognition chip, making it ideal for applications where internet connectivity is not available or desired. Built-in Command Words: The sensor comes with 121 fixed command words preloaded. These cover a wide range of common instructions, eliminating the need for users to record their voices. Custom Commands: Additionally, the sensor supports the addition of 17 custom command words. This flexibility allows you to train it to recognize specific sounds or phrases, such as whistling, snapping, or even cat meows. Self-Learning Function: The self-learning feature enables you to teach the sensor new commands. For example, you could use it in an automatic pet feeder. When your cat emits a meow, the sensor recognizes it and triggers the feeder to provide food promptly. User-Friendly Design: With its straightforward interface, the sensor simplifies voice interaction projects. Whether you’re building smart home appliances, toys, lighting fixtures, or robotics, this sensor provides a flexible solution. Key Features: Offline Operation: Works without the need for an internet connection. Custom Commands: Supports adding custom voice commands. Compatibility: Can be used with Arduino, Raspberry Pi, Python, and Beetle ESP32 C3. Get PCBs for Your Projects Manufactured You must check out PCBWAY for ordering PCBs online for cheap! You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop. Also, check out this useful blog on PCBWay Plugin for KiCad from here. Using this plugin, you can directly order PCBs in just one click after completing your design in KiCad. Neo Pixel: A Symphony of Lights Neo Pixel LEDs are individually addressable RGB LEDs, which means each LED’s color and brightness can be controlled independently. This makes them ideal for creating dynamic and colorful lighting effects. Why Choose Neo Pixel? Individual Addressability: Control each LED separately. Vibrant Colors: Create a spectrum of colors with RGB LEDs. Energy Efficient: Low power consumption with bright output. The Beetle ESP32 C3 Controller: The Brain Behind the Operation The Beetle ESP32 C3 is a small, powerful development board ideal for IoT projects. It features: A RISC-V 32-bit single-core processor for efficient performance. A coin-sized design, making it highly portable. Up to 13 digital I/O ports for various connections. Onboard battery management for direct li-ion battery connection. Wi-Fi and Bluetooth 5 (LE) support for versatile networking. Compatibility with Arduino IDE, ESP-IDF, and MicroPython, and supports C and Python programming. An expansion board for additional power sources and a GDI for screens. Operates at 3.3V with a Type-C input of 5V DC and a charging current of 400mA. Suitable for a wide range of temperatures, from -40 to 105°C. It’s a compact yet feature-rich board that’s adaptable for a variety of applications. Advantages of Beetle ESP32 C3: Connectivity: Wi-Fi and Bluetooth ready. Powerful: Enough processing power to handle complex tasks. Versatile: Compatible with various programming environments. Bringing It All Together To create a voice-controlled Neo Pixel light system, we’ll need to connect the DFRobot Gravity sensor to the Beetle ESP32 C3 and then to the Neo Pixel strip. The Beetle ESP32 C3 will listen to voice commands through the sensor and control the Neo Pixel lights accordingly. Adding Custom Commands in DFRobot Gravity Voice Recognition Sensor Let’s dive into the process of adding custom command words: First, let's upload the following sketch to the Beetle board, this sketch will show you the exact command ID which is related to the custom voice instructions. /*! * @file i2c.ino * @brief Control the voice recognition module via I2C * @n Get the recognized command ID and play the corresponding reply audio according to the ID; * @n Get and set the wake-up state duration, set mute mode, set volume, and enter the wake-up state * @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com) * @licence The MIT License (MIT) * @author [qsjhyy]([email protected]) * @version V1.0 * @date 2022-12-30 * @url https://github.com/DFRobot/DFRobot_DF2301Q */ #include "DFRobot_DF2301Q.h" //I2C communication DFRobot_DF2301Q_I2C DF2301Q; void setup() { Serial.begin(115200); // Init the sensor while( !( DF2301Q.begin() ) ) { Serial.println("Communication with device failed, please check connection"); delay(3000); } Serial.println("Begin ok!"); /** * @brief Set voice volume * @param voc - Volume value(1~7) */ DF2301Q.setVolume(4); /** * @brief Set mute mode * @param mode - Mute mode; set value 1: mute, 0: unmute */ DF2301Q.setMuteMode(0); /** * @brief Set wake-up duration * @param wakeTime - Wake-up duration (0-255) */ DF2301Q.setWakeTime(15); /** * @brief Get wake-up duration * @return The currently-set wake-up period */ uint8_t wakeTime = 0; wakeTime = DF2301Q.getWakeTime(); Serial.print("wakeTime = "); Serial.println(wakeTime); /** * @brief Play the corresponding reply audio according to the command word ID * @param CMDID - Command word ID * @note Can enter wake-up state through ID-1 in I2C mode */ // DF2301Q.playByCMDID(1); // Wake-up command DF2301Q.playByCMDID(23); // Common word ID } void loop() { /** * @brief Get the ID corresponding to the command word * @return Return the obtained command word ID, returning 0 means no valid ID is obtained */ uint8_t CMDID = 0; CMDID = DF2301Q.getCMDID(); if(0 != CMDID) { Serial.print("CMDID = "); Serial.println(CMDID); } delay(3000); } Now let's talk to our sensor and add custom voice commands. First, we need to use this "Learning command word" command to add a new command. Here I have added 4 different commands. These are the commands and their related command IDs. Lights on = 5 Lights off = 6 Lights to red = 8 Lights to green = 7 Integrate Neo Pixels with Voice Sensor Here’s a simple example that tests our neo pixel led: // NeoPixel Ring simple sketch (c) 2013 Shae Erisson // Released under the GPLv3 license to match the rest of the // Adafruit NeoPixel library #include <Adafruit_NeoPixel.h> #ifdef __AVR__ #include <avr/power.h> // Required for 16 MHz Adafruit Trinket #endif // Which pin on the Arduino is connected to the NeoPixels? #define PIN 0 // On Trinket or Gemma, suggest changing this to 1 // How many NeoPixels are attached to the Arduino? #define NUMPIXELS 8 // Popular NeoPixel ring size // When setting up the NeoPixel library, we tell it how many pixels, // and which pin to use to send signals. Note that for older NeoPixel // strips you might need to change the third parameter -- see the // strandtest example for more information on possible values. Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); #define DELAYVAL 500 // Time (in milliseconds) to pause between pixels void setup() { // These lines are specifically to support the Adafruit Trinket 5V 16 MHz. // Any other board, you can remove this part (but no harm leaving it): #if defined(__AVR_ATtiny85__) && (F_CPU == 16000000) clock_prescale_set(clock_div_1); #endif // END of Trinket-specific code. pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED) } void loop() { pixels.clear(); // Set all pixel colors to 'off' // The first NeoPixel in a strand is #0, second is 1, all the way up // to the count of pixels minus one. for(int i=0; i<NUMPIXELS; i++) { // For each pixel... // pixels.Color() takes RGB values, from 0,0,0 up to 255,255,255 // Here we're using a moderately bright green color: pixels.setPixelColor(i, pixels.Color(0, 150, 0)); pixels.show(); // Send the updated pixel colors to the hardware. delay(DELAYVAL); // Pause before next pass through loop } } Here is the neo-pixel response. Finally, let's integrate the voice sensor with our neo-pixel. #include "DFRobot_DF2301Q.h" #include <Adafruit_NeoPixel.h> #define PIN 0 // Neo Adafruit_NeoPixel strip = Adafruit_NeoPixel(8, PIN, NEO_GRB + NEO_KHZ800); //I2C communication DFRobot_DF2301Q_I2C DF2301Q; void setup() { Serial.begin(115200); strip.begin(); strip.setBrightness(100); strip.show(); while ( !( DF2301Q.begin() ) ) { Serial.println("Communication with device failed, please check connection"); delay(3000); } Serial.println("Begin ok!"); DF2301Q.setVolume(7); DF2301Q.setMuteMode(0); DF2301Q.setWakeTime(15); uint8_t wakeTime = 0; wakeTime = DF2301Q.getWakeTime(); Serial.print("wakeTime = "); Serial.println(wakeTime); DF2301Q.playByCMDID(23); // Common word ID } void loop() { uint8_t CMDID = 0; CMDID = DF2301Q.getCMDID(); if (0 != CMDID) { Serial.print("CMDID = "); Serial.println(CMDID); } if (CMDID == 5) { strip.clear(); // Set all pixel colors to 'off' for (int i = 0; i < 12; i++) { // For each pixel... strip.setPixelColor(i, strip.Color(255, 255, 255)); strip.show(); } } else if (CMDID == 6) { strip.clear(); for (int i = 0; i < 12; i++) { // For each pixel... strip.setPixelColor(i, strip.Color(0, 0, 0)); strip.show(); } } else if (CMDID == 7) { strip.clear(); for (int i = 0; i < 12; i++) { // For each pixel... strip.setPixelColor(i, strip.Color(255, 0, 0)); strip.show(); } } else if (CMDID == 8) { strip.clear(); for (int i = 0; i < 12; i++) { // For each pixel... strip.setPixelColor(i, strip.Color(0, 255, 0)); strip.show(); } } } This script sets up the Beetle ESP32 C3 to control a Neo Pixel strip and changes the color based on voice commands received from the DFRobot Gravity sensor. Conclusion Integrating the DFRobot Gravity Voice Recognition Sensor with Neo Pixel lights controlled by a Beetle ESP32 C3 offers endless possibilities for creating interactive and responsive environments. Whether it’s for home automation, art installations, or educational purposes, this combination of technology brings both functionality and creativity to your projects. I hope this blog post inspires you to create your voice-controlled lighting system. If you have any questions or need further guidance, feel free to reach out!
  3. In the world of embedded systems and IoT devices, power consumption is a critical factor that can make or break the success of a product. The Nordic Power Profiler Kit II (PPK 2) is an indispensable tool for developers looking to optimize the power usage of their devices. While the official nRF Connect Power Profiler provides a user-friendly GUI, there’s a growing need for automation in power monitoring. This is where Python comes into play, offering a way to control PPK 2 programmatically. Unofficial Python API for PPK 2 An unofficial Python API for PPK 2 has been developed to fill the gap left by the official tool. This API allows for automated power monitoring and data logging within Python applications, making it possible to integrate power profiling into automated test environments. Key Features Real-time power measurement: The API enables real-time measurement of device power consumption, which is crucial for identifying power spikes and optimizing energy usage. Data logging: It supports data logging in user-selectable formats, allowing for long-term power consumption analysis. Cross-platform support: The API is designed to work across different platforms, ensuring that developers can use it regardless of their operating system. Get PCBs for Your Projects Manufactured You must check out PCBWAY for ordering PCBs online for cheap! You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop. Also, check out this useful blog on PCBWay Plugin for KiCad from here. Using this plugin, you can directly order PCBs in just one click after completing your design in KiCad. Let's start with UNIHIKER: The UNIHIKER is a single-board computer that boasts a 2.8-inch touchscreen, providing a tactile and visual interface for your applications. It’s powered by a Quad-Core ARM Cortex-A35 CPU and comes with 512MB RAM and 16GB Flash storage. The board runs on Debian OS, ensuring a familiar and versatile environment for Linux enthusiasts In this tutorial, we are going to automate the power profiling with the UNIHIKER Single Board Computer. Install Python API in UNIHIKER: Connect UNIHER to the PC and open the Mind+ IDE. Next, connect the UNIHIKER to Mind+ via serial port. Next, run the following command in the terminal and install the ppk2 library. pip install ppk2-api Now you can see the zip file in the UNIHIKER file storage. Once installed, you can start by importing the necessary classes and initializing the PPK2_API object with the appropriate serial port. Here’s a basic example to get you started: import time from ppk2_api.ppk2_api import PPK2_API # Initialize the PPK2_API object with the correct serial port ppk2_test = PPK2_API("/dev/ttyACM3") # Replace with your serial port # Set up the power profiler ppk2_test.get_modifiers() ppk2_test.use_source_meter() # Set source meter mode ppk2_test.set_source_voltage(3300) # Set source voltage in mV # Start measuring ppk2_test.start_measuring() # Read measured values in a loop for i in range(0, 1000): read_data = ppk2_test.get_data() if read_data != b'': samples = ppk2_test.get_samples(read_data) print(f"Average of {len(samples)} samples is: {sum(samples)/len(samples)}uA") time.sleep(0.001) # Adjust time between sampling as needed # Stop measuring ppk2_test.stop_measuring() This script sets the PPK 2 to source meter mode, starts measuring, and prints out the average current consumption over several samples. It’s a simple yet powerful way to begin automating power profiling for your projects. Demo Let's unzip the zip file and open the folder so that you can see the example sketches. here is the example script. In this sketch, it will automatically detect the connected PPK2 devices and it will power up the DUT as well as measure the 100 samples. import time from ppk2_api.ppk2_api import PPK2_API from unihiker import GUI # Import the unihiker library import time # Import the time library from pinpong.board import Board # Import the Board module from the pinpong.board package from pinpong.extension.unihiker import * # Import all modules from the pinpong.extension.unihiker package ppk2s_connected = PPK2_API.list_devices() if(len(ppk2s_connected) == 1): ppk2_port = ppk2s_connected[0] print(f'Found PPK2 at {ppk2_port}') else: print(f'Too many connected PPK2\'s: {ppk2s_connected}') exit() ppk2_test = PPK2_API(ppk2_port, timeout=1, write_timeout=1, exclusive=True) ppk2_test.get_modifiers() ppk2_test.set_source_voltage(3300) ppk2_test.use_source_meter() # set source meter mode ppk2_test.toggle_DUT_power("ON") # enable DUT power ppk2_test.start_measuring() # start measuring for i in range(0, 100): read_data = ppk2_test.get_data() if read_data != b'': samples, raw_digital = ppk2_test.get_samples(read_data) print(f"Average is:{sum(samples)/len(samples)}uA") final=sum(samples)/len(samples) time.sleep(0.01) ppk2_test.toggle_DUT_power("OFF") # disable DUT power ppk2_test.stop_measuring() Conclusion The Nordic PPK 2, combined with the power of Python and UNIHIKER, opens up new possibilities for automated power profiling. Whether you’re looking to integrate power profiling into your CI/CD pipeline or simply want to streamline your testing process, the unofficial Python API for PPK 2 is a valuable addition to your toolkit. I hope this blog post provides a clear overview of how to control the Nordic Power Profiler Kit II with Python and UNIHIKER. If you have any questions or need further assistance, feel free to ask!
  4. In this article, will see how we can integrate the Beetle ESP32 C3 with home assistance. Beetle ESP32 C3 The Beetle ESP32-C3 is based on the ESP32-C3, a RISC-V 32-bit single-core processor. Despite its tiny size (only 25×20.5 mm), it packs a punch with up to 13 IO ports broken out, making it ideal for various projects without worrying about running out of IO options. Key Features: Ultra-Small Size: The Beetle ESP32-C3 measures just 25×20.5 mm (0.98×0.81 inch), making it perfect for space-constrained projects. Built-in Lithium Battery Charging Management: Safely charge and discharge lithium-ion batteries directly on the board. No need for additional modules, to ensure application size and safety. Easy Screen Connectivity: The matching bottom plate simplifies project assembly and screen usage. Dual-Mode Communication: Supports Wi-Fi and Bluetooth 5 (LE). Reduces networking complexity. Compatible with both Bluetooth Mesh and Espressif WiFi Mesh for stable communication and extended coverage. Get PCBs for Your Projects Manufactured You must check out PCBWAY for ordering PCBs online for cheap! You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop. Also, check out this useful blog on PCBWay Plugin for KiCad from here. Using this plugin, you can directly order PCBs in just one click after completing your design in KiCad. Installing ESP Addon in Home Assistance First, we need to add the ESP addon to our Home Assistance system. Open the home assistance. Next, navigate to the settings and open the add-ons. Here selects ESP home and install it. Then open the web ui. ESPHome on the Beetle ESP32 C3 ESPHome is an open-source firmware that allows you to configure and manage your ESP devices easily. Open the ESP home web UI and add a new device. Then open the ESPHOME web and follow the instructions to flash ESP Home firmware. Next, connect Beetle to the PC and select then burn. Wait until it finishes. Next, enter the WiFi credentials to configure with WiFi. Then click visit device, you can see this kind of web page. Connecting Beetle ESP32 C3 to Home Assistant Once your FireBeetle ESP32 C3 is online with the ESPHome firmware, Home Assistant will automatically discover it. You can see the device under the settings menu. Next, open the ESP home and add a new device Then enter all the details, and next select the wireless option. You can see the device status as Online. Here you can edit the beetle behavior. Controlling Devices and Automation With the Beetle ESP32 C3 integrated into Home Assistant, you can: Control smart switches, lights, or other devices connected to your Beetle. Set up automation based on sensor data (e.g., turn on lights when motion is detected). Monitor temperature, humidity, and other environmental factors using Beetle sensors. With the Beetle ESP32 C3 integrated into Home Assistant, you can: Control smart switches, lights, or other devices connected to your Beetle. Set up automation based on sensor data (e.g., turn on lights when motion is detected). Here is the simple code snippet to control the onboard LED on the Beetle. switch: - platform: gpio name: "test_lights Onboard light" pin: 10 inverted: True restore_mode: RESTORE_DEFAULT_OFF Here is the complete sketch. Then install it. Next, open the devices again and select the esp home. Here you will see your device details and it will show the switch status. From here you can control the onboard LED. Troubleshooting and Tips If you encounter issues: Check your ESPHome configuration for errors. Verify that your Beetle ESP32 C3 is connected to the correct Wi-Fi network. Use Home Assistant’s logs and developer tools to debug any problems. Conclusion Integrating the Beetle ESP32 C3 with Home Assistant expands your smart home capabilities. Whether you’re building custom sensors, controlling lights, or automating tasks, this combination empowers you to create a personalized and efficient home environment. Happy tinkering! 🏡🔌
  5. Things used in this project Hardware components Seeed Studio MR60BHA1 60GHz mmWave Module - Respiratory Heartbeat Detection × 1 DFRobot FireBeetle ESP32 IOT Microcontroller (Supports Wi-Fi & Bluetooth) × 1 DFRobot I2C 16x2 Arduino LCD Display Module × 1 Seeed Studio MLX90614 × 1 IR Sensor Module × 1 Linear Regulator (7805) × 2 Bridge Rectifier Diode, Miniature × 1 Capacitor 470 µF × 1 LED (generic) × 1 TaydaElectronics MINI RELAY SPDT 5 PINS 12VDC 10A 120V CONTACT × 1 9V 1A Switching Wall Power Supply × 1 Through Hole Resistor, 470 ohm × 1 Resistor 4.75k ohm × 1 DC Power Connector, Jack × 1 Buzzer × 1 Software apps and online services Arduino IDE Blynk Hand tools and fabrication machines Soldering iron (generic) Solder Wire, Lead Free Solder Flux, Soldering Story The MR60BHA1 60GHz mmWave Module is a versatile sensor that utilizes Frequency Modulation Continuous Wave (FMCW) detection to accurately measure breathing rate and heart rate, ensuring a completely private and secure environment, free from external interference. Equipped with a built-in standard algorithm and onboard antenna, the unit delivers simultaneous signal output with exceptional precision. It serves as an ideal solution for developing high-accuracy, self-regulating, privacy-protected, and secure biotic radar systems in consumer electronics, healthcare, and industrial applications. Block Diagram Beyond heart rate and respiration detection, the radar sensor can detect human presence in the operating area, enabling the creation of an automated device and appliance control system that conserves energy during unoccupied periods. Additionally, the system incorporates an IR temperature sensor to measure body temperature, allowing for illness and stress detection. Upon detecting significant vital variations, the buzzer activates as an alert. Simultaneously, all details are displayed on an LCD display and a mobile phone app via the ESP32 Wi-Fi module. The project involved various components, which can be identified in the Below provided image. Components Identification Get PCBs for Your Projects Manufactured This project was successfully completed because of the help and support from NextPCB. Guys if you have a PCB project, please visit their website and get exciting discounts and coupons. NextPCB offers high-quality, reliable PCB starting at $1.9, and multilayer starting at $6.9. Also, everyone can enjoy free PCB assembly for 5 boards! Also, NextPCB is having a year end sale in which anyone can register through their website and get a $30 Coupon which can be used for ordering PCBs. You can also try HQDFM free online PCB Gerber viewer to check your PCB design and avoid costly errors. Seeed Studio MR60BHA1 60GHz mmWave Module 1 / 2 The Seeed Studio MR60BHA1 60GHz mmWave Module is a versatile sensor module that utilizes Frequency Modulation Continuous Wave (FMCW) detection technology to accurately measure vital signs, including breathing rate and heart rate. It operates in a completely private and secure environment, free from external interference, making it an ideal solution for privacy-sensitive applications. Equipped with a built-in standard algorithm and onboard antenna, the unit delivers simultaneous signal output with exceptional precision. It serves as an ideal solution for developing high-accuracy, self-regulating, privacy-protected, and secure biotic radar systems in consumer electronics, healthcare, and industrial applications Key Features: Non-contact sensing for comfort and privacy High-accuracy, self-regulating, privacy-protected, and secure Low power consumption for extended battery life Compact size and lightweight for easy integration Applications: Consumer Electronics: Smart home automation, wearable devices, sleep monitoring Healthcare: Patient monitoring, vital signs detection, illness and stress detection Industrial Applications: Presence detection, safety monitoring, automation control Additional Features: IR temperature sensor to measure human temperature Buzzer to alert when vital variations are found LCD display and mobile phone app for data visualization Enhanced Health and Wellness Monitoring: The MR60BHA1 60GHz mmWave Module can be used to develop a comprehensive health and wellness monitoring system. By combining heart rate, respiration, and temperature measurements, the system can provide valuable insights into an individual's overall health and well-being. Automated Device and Appliance Control: The MR60BHA1 60GHz mmWave Module can also be used to create an automated device and appliance control system. By detecting the presence of a human in the operating area, the system can automatically turn on lights, adjust thermostats, and control other devices. Privacy-Protected and Secure: The MR60BHA1 60GHz mmWave Module operates in a completely private and secure environment, ensuring that personal health data is protected. The sensor does not require any physical contact with the user, and all data is processed locally on the device. Interfacing the MR60BHA1 60GHz mmWave Module with the ESP32 requires establishing a communication link between the two devices. This can be achieved using a Serial interface(Interface 1). For an implementation using the serial interface, refer to the following : Connect the MR60BHA1's TX pin to the ESP32's RXD (16)pin. Connect the MR60BHA1's RX pin to the ESP32's TXD(17) pin. Connect the MR60BHA1's GND pin to the ESP32's GND pin. Connect the MR60BHA1's 3.3V pin to the ESP32's 3.3V pin. Interface 2 is typically used for firmware upgrades on the MR60BHA1 60GHz mmWave Module. Interface 1 is typically used for data communication between the module and a host device. The following table summarizes the recommended use of each interface: However, there may be some cases where it is not recommended to use Interface 2 for firmware upgrades. For example, if the module is already running the latest firmware version, then there is no need to upgrade it. Additionally, if the module is experiencing instability or other problems, then it may be best to avoid upgrading the firmware until the problems have been resolved. In general, it is always a good idea to consult the user manual or other documentation for the MR60BHA1 60GHz mmWave Module before attempting to upgrade the firmware. This will help to ensure that the upgrade is performed safely and correctly. Please note that upgrading the firmware may void the warranty on the module. It is important to read and understand the warranty information before proceeding with any firmware upgrades. For More Technical details on MR60BHA1 60GHz mmWave Module follow the link https://wiki.seeedstudio.com/Radar_MR60BHA1/ Radar module operating range The radar module beam coverage is shown. The radar coverage is a three-dimensional sector of 80° horizontally and 80° tilted. Due to the radar beam characteristics, the radar has a relatively long range in the direction normal to the antenna face, but a shorter range if it deviates from the antenna normal. When the radar is mounted on top or at an angle, the radar beam range and the effective radiation space will reduce the radar range, which needs to be taken into account when using the radar. Installation method As the radar works mainly based on the respiratory heart rhythm causing undulating movements on the surface of the large muscles, the undulation of the human chest and back will be more pronounced, so this radar needs to be installed in the correct position to the human chest or back. Based on the radar mode of action, the following mounting options are considered for radar installation. (A) Overhead installation The radar beam is positioned vertically downwards towards the body, with the center of the radar beam corresponding to the position of the body's chest cavity. In this installation mode, a distance of ≤ 2 m is required between the radar and the body to be measured. (B) Tilt mounting With tilt mounting, the radar is fixed to a wall or bedside, the radar is mounted at an angle (as shown below) and the radar beam is directed at the body at an angle, with the center of the radar beam corresponding to the position of the human chest cavity. In this installation mode, the radial distance between the radar and the body to be measured is ≤ 2 m. (C) Horizontal installation The radar is placed horizontally (as shown in Fig Below), the radar is fixed to a wall, or placed on a table, the radar beam is directed toward the human body and the center of the radar beam corresponds to the position of the human thorax. The distance between the radar and the human body to be measured in this installation mode is ≤ 2 m. How the Project Works The project comprises an MR60BHA1 60GHz mmWave module for respiration, heart rate, and human presence detection, along with an MLX90614 sensor for contactless body temperature measurement. This project caters to two sectors: wellness monitoring and home or office automation. The ESP32 microcontroller serves as the project's central processing unit (CPU) and WiFi module. The MR60BHA1 sensor is connected using the ESP32's UART channels and the MLX90614 sensor is connected using ESP32's I2C Channels(SDA, SCL). To measure body temperature, the user needs to bring their hand near the sensor. A proximity sensor is deployed near the MLX90614 sensor to detect the presence of a hand and initialize the body temperature measurement. The measured temperature details will be displayed on the LCD panels and Blynk mobile application in Celsius units. To initiate heart rate and respiration rate measurement, the user must first deactivate the human presence detection switch. Once deactivated, the user should press the measurement button, and the ESP32 will initiate the measurement process by emitting a buzzer alert. The algorithms require a few seconds to collect and process the data, so please expect some minor delays before the accurate readings are displayed on the LCD screen and the Blynk mobile application. To activate the automation system based on human presence, the human presence detection switch must be activated. Once the switch is activated, the MR60BHA1 transitions into human presence detection mode. When human movements are detected within the radar's operating range, the ESP32 sends a pop-up notification to the Blynk app alerting the owner. Subsequently, an LED bulb will be turned on using a relay, demonstrating the MR60BHA1's capability in automating equipment. This human presence detection system also serves as a security product. The entire project is powered by a 12-volt DC power adapter. Considering the power requirements of the sensors, microcontroller, and other components, the voltage is regulated to 5 volts using a 7805 voltage regulator and to 3.3 volts using an AMS1117 voltage regulator. Project Code: #include "Arduino.h" #include <Wire.h> #include <LiquidCrystal_I2C.h> #include <Wire.h> #include <Adafruit_MLX90614.h> #include <WiFi.h> #include <WiFiClient.h> #include <BlynkSimpleEsp32.h> #define BLYNK_PRINT Serial #define BLYNK_TEMPLATE_ID "TMPL3gy4Fq2LC" #define BLYNK_TEMPLATE_NAME "Project" #define BLYNK_AUTH_TOKEN " char auth[] = "cxwnZjdeqqhWcGuObkEZ5OVt1WC_227g"; char ssid[] = "wifi"; char pass[] = "123456788"; Adafruit_MLX90614 mlx = Adafruit_MLX90614(); #define RXD2 16 #define TXD2 17 #include <60ghzbreathheart.h> LiquidCrystal_I2C lcd(0x27, 16, 2); BreathHeart_60GHz radar = BreathHeart_60GHz(&Serial2); unsigned long delay_Intial = 0; const long delay_interval = 1000; unsigned long measure_Intial = 0; const long measure_interval = 20000; int Human_pesence_pin = 27; int Human_presence; int Heart_rate_measure_button_pin = 26; int Heart_Button = 0; int IR_Sensor_pin = 33; int IR_Status; int relay = 32; int Buzzer = 25; void _delay() { delay_Intial = millis(); while((millis() - delay_Intial) <= delay_interval) { } } void Measure_Breath_Heart_rate() { radar.Breath_Heart(); //Breath and heartbeat information output if(radar.sensor_report != 0x00) { switch(radar.sensor_report) { case HEARTRATEVAL: Serial.print("Sensor monitored the current heart rate value is: "); Serial.print(radar.heart_rate, DEC); Serial.println(); lcd.clear(); lcd.setCursor(0,0); lcd.print("Heart Rate: "); lcd.print(radar.heart_rate); Blynk.virtualWrite(V0,radar.heart_rate); break; case BREATHVAL: Serial.print("Sensor monitored the current breath rate value is: "); Serial.print(radar.breath_rate, DEC); Serial.println(); lcd.setCursor(0,1); lcd.print("Breath_rate: "); lcd.print(radar.breath_rate, DEC); Blynk.virtualWrite(V1,radar.breath_rate); break; } } } void human_presence() { radar.HumanExis_Func(); //Human existence information output if(radar.sensor_report != 0x00){ switch(radar.sensor_report){ case BODYVAL: Serial.print("The parameters of human body signs are: "); Serial.println(radar.bodysign_val, DEC); Serial.println("----------------------------"); if(radar.bodysign_val >=15) { Blynk.virtualWrite(V3,20); measure_Intial = millis(); delay(1000); Blynk.virtualWrite(V3,0); while((millis() - measure_Intial) <= measure_interval) { digitalWrite(relay,HIGH); lcd.clear(); lcd.setCursor(0,0); lcd.print("Presence Found"); lcd.setCursor(0,1); lcd.print("Lights ON"); _delay(); } digitalWrite(relay,LOW); lcd.setCursor(0,1); lcd.print("Lights OFF"); _delay(); } break; } } } void HR_BR() { measure_Intial = millis(); while((millis() - measure_Intial) <= measure_interval) { Measure_Breath_Heart_rate(); } } void Measure_IR_Temperature() { Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C"); lcd.clear(); lcd.setCursor(0,1); lcd.print("Body Temp: "); lcd.print(mlx.readObjectTempC()); Blynk.virtualWrite(V2,mlx.readObjectTempC()); _delay(); } void setup() { Serial.begin(115200);//RX0,TX0 OF ESP32 Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2);//RX2,TX2 OF ESP32 pinMode(Heart_rate_measure_button_pin,INPUT); pinMode(IR_Sensor_pin,INPUT); pinMode(Human_pesence_pin,INPUT); pinMode(relay,OUTPUT); pinMode(Buzzer,OUTPUT); Wire.begin(); lcd.begin(); lcd.backlight(); mlx.begin(); radar.ModeSelect_fuc(1); Blynk.begin(auth, ssid, pass); } void loop() { Heart_Button = digitalRead(Heart_rate_measure_button_pin); IR_Status = digitalRead(IR_Sensor_pin); Human_presence = digitalRead(Human_pesence_pin); lcd.clear(); digitalWrite(relay,LOW); digitalWrite(Buzzer,LOW); Blynk.virtualWrite(V0,0); Blynk.virtualWrite(V1,0); Blynk.virtualWrite(V2,0); Blynk.virtualWrite(V3,0); switch(IR_Status) { case 1: Measure_IR_Temperature(); break; case 0: break; lcd.clear(); } switch(Heart_Button) { case 1: digitalWrite(Buzzer,HIGH); _delay(); digitalWrite(Buzzer,LOW); _delay(); Serial.println("Heart_rate_monitoring_system_acitve"); HR_BR(); break; } switch(Human_presence) { case 1: Serial.println("Human_presence_detection_active"); human_presence(); break; case 0: digitalWrite(relay,LOW); break; } Blynk.run(); }
×
  • Create New...