DevHeads IoT Integration Server

DII

DevHeads IoT Integration Server

The DevHeads IoT Integration Server accelerates technology engineering by helping pro devs learn, share and collaborate.

Join

seeking-collabs

firmware-and-baremetal

middleware-and-os

edge-networking

pcb-and-analog

jobs

iot-cloud

code-review

devheads-feed

general-dev-chat

How to Fix "OSError: [Errno 5] EIO" in STM32 Water Quality Monitoring System?

Hello Guys I am trying to develop a real-time water quality monitoring system using an STM32 microcontroller, MicroPython, and various water quality sensors(pH sensor, Turbidity sensor)DS18B20. The system will use an AI model to predict water quality parameters such as pH, turbidity, and temperature, and display the results on an LCD screen. I have connected the pH sensor, turbidity sensor, and DS18B20 temperature sensor to the STM32, also connected the LCD screen to the STM32 using I2C. But am getting the error OSError: [Errno 5] EIO...

How to Resolve RuntimeError in TensorFlow Lite for Microcontrollers on ESP32?

Hello everyone, I'm deploying a natural language processing (NLP) model on an ESP32 microcontroller using TensorFlow Lite for Microcontrollers. During inference, I encounter the error RuntimeError: Internal error: Failed to run model at node 13 with status 1. This error seems to occur randomly during different stages of text processing, particularly when processing longer input sequences. I've already applied model quantization, reduced the complexity of the input text, and ensured that the inpu...

How to Resolve Synchronization Issues in Multi-Threaded ESP32 FreeRTOS Application?

I am developing a multi-threaded ESP32 application using FreeRTOS to manage multiple sensor data streams (temperature, humidity, motion) and control signals. I face synchronization issues leading to race conditions and data corruption. Despite using mutexes and semaphores, the application behaves unpredictably under heavy load, with tasks occasionally accessing shared resources simultaneously, causing inconsistent data states and crashes. Specifically, I am seeing error messages like "Task watchdog got triggered" and "Guru Meditation Error: Core 0 panic'ed (LoadProhibited)" when tasks attempt to read sensor data concurrently. How can I diagnose and resolve these issues to maintain system reliability and performance? Code: // Example of using mutex for thread safety in FreeRTOS on ESP32 #include <freertos/FreeRTOS.h>...

How to Fix LED Not Responding to PWM Signals on BeagleBone Black?

Hey guys, am developing a lighting control system using a BeagleBone Black running Embedded Linux using microcontroller(AM335x ARM Cortex-A8). The system needs to control the brightness of an LED using PWM. i have ensured that the Adafruit_BBIO library is correctly installed and imported in your script, adjusted the PWM.set_duty_cycle() values to ensure they are within the valid range (0-100). but i keep encountering errors such as the LED not responding to PWM signals. ```python import Adafruit_BBIO.PWM as PW import time ...
attachment 0

What is the best method to connect two ESP32 boards via wired solutions for exchanging data?

team, What is the best method to connect two ESP32 boards via wired solutions for exchanging data, including at least seven 16-bit registers and a couple of 5 boolean values?

I need a small suggestion related to stm32 courses

I need a small suggestion related to stm32 courses - i have completed embedded c course for basic stm32 programming , i want to move to advance level of stm32 i have 2 choices - stm32 embedded driver devlopment and FREE RTOS for stm32 . In what sequence should i go with ? first driver development then free RTOS or vice versa .

Fixing Loud Noise Issue with L298N Motor Driver and Arduino Uno for XY Laser Rig

Hi. I am trying to fix a problem, where when using the L298N motor driver with Arduino Uno makes a horrible loud noise. I have a laser burner XY axis rig which when operated using the built-in board does not make any strange noises. The above issue occurs when I try to connect its stepper motors via my combination of Arduino UNO and two L298N motor drivers. For details please see the images and diagram. Any suggestions on how to fix this, This is the code I'm using `` // Define motor control pins const int motor1DirPin = 8;...
attachment 0

How can I create and implement DDR memory in Verilog on an FPGA?

I want to create a DDR memory using Verilog and implement it on an FPGA. I wanted to ask for resources that could help me get started. I have no idea of how DDR RAM works, I browsed some sourcces and came across DFI protocol, DDR PHY IP, but I didn't understand much. I want a basic application note or white paper that can get me started on understanding the memories. The main goal is to create a whole processor with all features possible below. I have created a RISC processor with custom ISA, which is 16-bit. I want to increases its functionality. ...

Triggering Frequency Hopping on ADRV9002 Transceiver with External Signal

Hi devs @Middleware & OS I am working on a project where i want to evaluate the Hopping modes and timings on the ADRV9002 Transceiver. I use a GUI called TES also known as Argo navis. This is made by Analog devices and communicates with the ZCU102 FPGA running a Linux distro....

Why Do I Need to Halve Prescaler Values for TIMER 2 & 3 on STM32F4 to Get Correct Interrupt Periods?

Good day everyone, @Middleware & OS I'm using an STM32F4 with three timers and experiencing unexpected behavior with the timers' interrupts. - TIMER 1 (advanced control) generates an interrupt every 1ms with (\text{PSC} = 11) and (\text{ARR} = 13999) as expected. - TIMER 2 (general purpose) is supposed to generate an interrupt every 10ms. Calculations give (\text{PSC} = 39) and (\text{ARR} = 41999), but the interrupt occurs every 20ms. To achieve 10ms, I had to set (\text{PSC} = 19). - TIMER 3 (general purpose) should generate an interrupt every 65.535ms. Calculations give (\text{PSC} = 167) and (\text{ARR} = 65535), but the interrupt occurs every 131.064ms. Halving the PSC to 83 gives the correct 65.535ms period....
Solution:
Oh @Sterling Another possibility is that there might be a factor of 2 difference due to the internal clock tree configuration of the STM32F4. Sometimes, the timers might be running at a different clock frequency than you expect because of prescaler settings in the RCC (Reset and Clock Control) that affect certain timer groups differently.

Why Does CubeMX Generate Separate FLASH and RAM Linker Scripts?

just curious why does the CubeMX generate 2 linker scripts, one ending with FLASH and the second with RAM? Despite their name both linkers include sections in both types of memory
Solution:
FLASH.ld is for Normal operation (code in FLASH). And RAM.ldis for Debug/special use (code in RAM) programs use both memory type...

Looking for some guidance on setting up an FPGA development environment

Hi everyone, I’m looking for some guidance on setting up an FPGA development environment on my Apple MacBook M1 running macOS 14.5. , I have a shallow knowledge about Verilog programming . However, my experience with terminals and setting up development environments is quite limited. I can manage some basic terminal commands but I’m far from proficient. I am now really interested in diving deeper into HDL and working on FPGA projects. Here are a few specific questions I have:...
Solution:
Get a better computer. 8 GB of RAM is not enough memory for modern FPGA development tools. And you can also avoid emulating or having to run VMs by getting an x86 machine instead of ARM.

Arduino Uno Playing Slow Motion Sound from SD Card - Need Help!

Morning guys, I have connected an Arduino Uno with two speakers and a DFR0071 SD card module. The problem is when I play the recorded sound in .wav format, it plays in slow motion. Do you have any ideas? Because I'm completely stuck, thanks. Here is the code I am using: ```cpp...

Isolating X-Axis Readings from Accelerometer Interference

I am creating a project that will use the input from the x-axis accelerometer to control the output of LEDs. I have no problem reading the output from the x-axis, but I find that when I move my project in the y-axis, it affects the x-axis readings. My project needs to read the deceleration of the x-axis without any other interference. How do I isolate the x-axis reading? Any help would be greatly appreciated....
Solution:
A low pass filter smooths out rapid changes in data, so that will make x axis reading more stable U can using a formula: filteredValue = α * newReading + (1 - α) * oldFilteredValue Where α (alpha) controls smoothing: lower α = more smoothing U can add this code const float alpha = 0.2; float filteredX = 0;...
attachment 0

Issues with Fuel Injector Testing Bench Using Arduino Minima R4 at High Frequencies

Hi Devs I m trying to create a fuel injector testing bench with an Arduino minima r4. Running on low frequencies as in the first part of my code everything appears to be good, but in the higher frequencies I believe that the injectors doesn' t close at all. I believe this because except for 50 Hz I don t see any difference in the way injectors work? Can anyone spot a mistake on hardware that can cause that. In the software I m using Arduino built in DAC, it would be better using PWM for this application? `` #include <analogWave.h> ...

Real-Time Temperature Monitoring with ATmega2560, MCP9808, and Zephyr OS: Device Driver Not Found

hey guys who has implemented real-time temperature monitoring with an ATmega2560 microcontroller? I'm using a MCP9808 sensor, and Zephyr OS, and currently trying to fix the sensor initialization error. Despite configuring the I2C peripheral in Zephyr, integrating the MCP9808 sensor, and writing code to read sensor data, I encounter the error "Sensor: Device driver not found." Here's my code: ```#include <zephyr.h> #include <device.h> #include <drivers/i2c.h> #include <sys/printk.h>...
Solution:
make sure you've enabled the MCP9808 driver in your Zephyr configuration. Add these lines to your prj.conf file: CopyCONFIG_I2C=y CONFIG_SENSOR=y CONFIG_MCP9808=y...

Issue with word Data Type When Porting Arduino Library to STM32

Hi @Middleware & OS I am porting some Arduino library code to STM32 and encountering issues with the word data type. The compiler gives me the error: "expected expression before 'word'". Here is the code: ```c uint8_t au8Buffer[MAX_BUFFER]; uint16_t *au16regs;...
Solution:
@Sterling The issue arises because word is a specific data type and function in the Arduino environment, which may not be directly available or compatible with STM32 libraries.

Issues with Accurate Quadrature Encoder Readings on BeagleBone Black

Hey guys am developing a real-time control system for a robotics application using a BeagleBone Black running Embedded Linux. The system needs to read data from a quadrature encoder to determine the position and speed of a motor. However, I encounter an issue where the encoder readings are not accurate or are missed at higher speeds. I have connected the quadrature encoder to the BeagleBone Black's GPIO pins, verified that the encoder signals (A and B) are properly connected to the correct GPIO pins. Error: Missed encoder pulses Here's my code ...

I want to design a system that tracks the inertia of a moving device

Hi, I want to design a system that tracks the inertia of a moving device I'm willing to use the MPU-9250 sensor IMU and ESP32 as micro controllers and SIM7600 to collect GPS data And send them to the cloud, my question how do we combine the data of the IMU sensor and The GPS and how we can define if the object is moving or stopped using the imu sensor, do we need Machine learning?
Solution:
finding the difference between walking and running is tricky , yes the option can be machine learning ( like use past data of rate of change of co ordinates with respect to time of people of different height , and the change rate can be specified from the the current person height using the given data ) , But it will be simple if you add calibrating feature ( like during setup you can ask a person to run for 30sec and walk for 30sec , and by using the rate of change of co ordinates data of those...