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 should I configure the ADC on my STM32F407VG to properly acquire data from an LM35?

hey guys, I'm initializing the ADC peripheral to read data from the temperature sensor while referencing the STM32F4 reference manual , how should I configure the ADC on my STM32F407VG to properly acquire data from an LM35 temperature sensor? Are there any recommended libraries or code examples available for ADC initialization on the STM32F407VG? the factors to consider include the resolution and sampling rate required for accurate temperature readings. @Middleware & OS

Would you recommend buying an authentic STLink over a Chinese STLink V2?

good morning ,Would you recommend buying an authentic STLink over a Chinese STLink V2? I'm working with an STM32F4 series MCU for a project involving real-time data acquisition and processing. Are there significant differences in performance or reliability that justify the higher cost of the authentic STLink?
Solution:
I say you get the original version of it, to avoid any future issues. I got an stlink 2 years ago and most times my system couldn't detect the device, it always gives an error message. So I go for the original
attachment 0

Is it normal that I can't upload code when my W5100 Ethernet Shield is on my Arduino Uno?

Guys Is it normal that I can't upload code when my W5100 Ethernet Shield is on my Arduino Uno? I have to remove it every time I want to upload, and I'm not sure if that's normal. Moreover, I can't get the example sketches to work, so I suspect it might be faulty. :/
Solution:
I suggest check whether the pins of an Ethernet shield goes properly into the pins of arduino. The shield uses SPI pins that are Pin# 10,11,12,13 and I don't think it has anything to do with UART pins Tx, Rx because while uploading code in arduino Tx, Rx will be used by arduino. So its possible there must be issue with ethernetshield

Seeking Feedback and Suggestions on Custom ESC Design for Drone Integration

Hey everyone, Iโ€™m excited to share my current project and would love to get your thoughts and suggestions. Iโ€™m building an ESC (Electronic Speed Controller) from scratch and will then integrate it into a custom-designed drone....
Solution:
Hi, I reached character limit on discord, so I've added my comments on this doc. Cheers! https://docs.google.com/document/d/11dqii1o3Np3LmN8Pq6OEqnvy3KBDijHr5KIcKhlCioc/edit?usp=sharing...

How to delay() easily when you don't have delay()?

I wanted to have some delay between I2C read/write functions. Ended up using this. How good/bad is it and any pitfalls? `float temperature = readTemperature(); printf("Temperature: %.2f ยฐC\n", temperature); ...
Solution:
@Navadeep there are many disadvantages for using a for loop as you just did like, The actual delay duration can vary depending on the compiler optimization settings and the CPU speed. this means the delay might not be consistent across different systems or even different runs on the same system, The for loop delay is a busy-wait loop, meaning the CPU is doing nothing useful during this time but still consuming power. this can be inefficient, especially in battery-powered or resource-constrained environments, ...

Does anyone know if there are any special steps to using SPI1 on the STM32F407-DISC1 board?

Does anyone know if there are any special steps to using SPI1 on the STM32F407-DISC1 board. Specifically I am trying to interface with the onboard MEMS accelerometer. At the moment I have code that works for SPI2 and SPI3. Whenever I try to initialize SPI1 its RCC clock is enabled but the Cr1 of SPI1 is never set up.

I want to update/flash the firmware on an STM32G4 using another ESP32 microcontroller over I2C.

@Middleware & OS I want to update/flash the firmware on an STM32G4 using another ESP32 microcontroller over I2C. Besides the I2C pins for data transfer, which other pins on the STM32 does the microcontroller need to connect to? I think it needs to control both the BOOT and RESET pins. Is that right, or is just the BOOT pin enough?...
Solution:
@UC GEE G4 is nice for firmware update since it has dual bank support... I've done it before. Take a look into the chip errata, maybe there are still some issues. Why not try it out beforehand? Fw update is critical but finicky. Else, just put both in your layout!...

What specific considerations should I take into account when selecting an STM32F4 variant?

Hey guys, I'm selecting hardware components for a project and have chosen an STM32F4 microcontroller based on the project requirements. I'm considering using an LM35 temperature sensor. What specific considerations should I take into account when selecting an STM32F4 variant, and are there alternative temperature sensors with similar characteristics that might be more suitable? Key factors include available ADC channels, processing power of the STM32F4 variant, and the voltage output ranges and operating temperatures of alternative sensors. @Middleware & OS...

How to Apply FSMs for Control Flow in Cryptographic IP Design on FPGA?

@Middleware & OS I am working on an FPGA internship project that involves designing cryptographic IP. I'm comfortable with FSMs ie clock, receivers, packet encapsulation etc. but having trouble seeing how they can be applied in this context, which is believe is heavily math-based. Struggling to identify how FSMs can be used for control flow or logic within the cryptographic IP design....
Solution:
@UC GEE FSMs can be instrumental in handling various error scenarios that may occur during cryptographic operations. They can define states for error detection, recovery, and fault tolerance mechanisms, hence controlling the logic flow

trying to code a stm32 board and receiving this error how to fix it - Target no device found

i am trying to code a stm32 board and receiving this error how to fix it - Target no device found Error in initializing ST-LINK device. Reason: No device found on target....
Solution:
This is usually caused by issue with the ST-LINK debugger connection try troubleshooting, if everything is okay, then its a hardware fault

Seeking open-source project without ST HAL for learning low-level drivers & best practices.

@Middleware & OS I'm a Newbie in STM32 dev for few months now. Seeking open-source project without ST HAL for learning low-level drivers & best practices. Greetings Devs, Please, Any recommendations? I am interested in SPI/I2C for sensor data acquisition.๐Ÿ™...
Solution:
Hi @UC GEE ST provides STM32Cube MCU Packages for all STM32 series. This simplifies bare-metal programming. You can download these s/w packs from the official ST's site and then extract the folder. Later on, you can link CMSIS and ST's device-specific header files into your STM32CubeIDE. For example, if you're trying to program STM32F44RE MCU then download STM32CubeF4 software package from https://www.st.com/en/embedded-software/stm32cubef4.html. Don't forget to add the path in the `Project p...

How to Implement PID Control on STM32F4 to Maintain 1500 RPM for an ECU?

Hey guys, working on a project in which I have used STM32F4 to control an old ECU (which intended to be maintained at 1500 RPM) I'm planning to use PID control to maintain the fuel actuator so that it will maintain 1500 RPM, can anyone guide me in this?? @MCU, MPU & Firmware...
Solution:
Yes I have, in a few context as well. You are likely controlling your actuator with something like a pwm and you have some sort of sensor telling you how many RPM you are doing maybe some encoder setup. Once you habe those you can implment your PID control loop in your main loop or the thread that's doing this.

Can you give me good snippet of code for AT commands resender?

Hello, Can you give me good snippet of code for AT commands resender? Like I am sending to my UART interface data via terminal and I want to send it to UART2 where peripheral is attached. So I will get its response to my original UART. Everything I tried was problematic when larger amount of data was received.

Whatโ€™s the best option if I need a GUI? Anything for IPad?

@Middleware & OS So Iโ€™m hacking my path to embedded world and have a big project (big to my size and experience) including 2-3 boards: RPi 5 8GB, Nvidia Jetson Nano, OPi 5 Pro, and maybe RPi 3B I already look at future boards like another RPI 5 for Hailo 10, and possibly LattePanda Mu. It becomes cumbersome switching cables to work each device at a time - I used to work with. NC sometime in far past, but remember the latency a killer. ...
Solution:
@UC GEE this html file link has something about using tmux . Cus u should consider using SSH multiplexer tools like tmux or screen to manage connections to all your boards from that one terminal, https://man7.org/linux/man-pages/man1/tmux.1.html...

How to Implement OTA Updates for ESP32 with FreeRTOS on Google Cloud IoT Core?

@Middleware & OS Hello guys am interested in over the air (OTA) firmware update of an ESP32 microcontroller running FreeRTOS and connect it to Google Cloud IoT Core for data monitoring, please i would need any form of guidance i can get i.e code examples or documentation and suggested libraries that can aid me in OTA updates for ESP32 with FreeRTOS...
Solution:
Your code should be identical or similar to ๐Ÿ‘‡ ```cpp #include <WiFi.h> #include <PubSubClient.h> #include <ArduinoOTA.h>...

utilize a microcontroller's GPIO pins to control peripheral devices in an IoT embedded software in C

Hello guys how can i utilize a microcontroller's GPIO pins to control peripheral devices in an IoT embedded software in C or Arduino, I want to control a LED by turning it on or off using a GPIO pin, can I be provided some general steps or considerations for using a GPIO pin to interact with peripheral devices in an IoT application. also, are there any specific libraries that can help me get started @Middleware & OS...
Solution:
You can use the following libraries Arduino Standard Library ESP8266/ESP32 Libraries FreeRTOS: For more advanced IoT applications requiring real-time capabilities, consider using FreeRTOS, which is available for several microcontrollers including STM32 and ESP32....

Does anyone have experience with directly mapping FPGA memory to the microcontroller's memory space

@Middleware & OS I'm redesigning an FPGA for faster SPI communication. The current design utilizes a DMA controller to read data from internal RAM, but I'm experiencing some performance issues. I suspect the current bottleneck might be the data transfer between the internal RAM and the DMA controller. I'm considering directly mapping the FPGA memory containing the data to the microcontroller's memory space for maybe a faster transfers.
I've reviewed some resources on memory-mapped I/O for FPGAs, but haven't found specific examples related to SPI communication. My question is :...
Solution:
Spartan 6 don't come with hard processors. Are you using their legacy ISE suite or Vivado? If you are on ARM Cortex Processor, it is likely that you're on a 7 series SoC. Take a look at https://discuss.pynq.io/t/tutorial-pynq-dma-part-1-hardware-design/3133 and follow up blog where designing with AXI DMA, configuration, streaming is described....

wanna use the flash bootloader of ST to flash my softwares using CAN-FD

Hello everyone, I'm using STM32H745 for a small project using the both cores M4 and M7. My question is : I want use the flash bootloader of ST to flash my softwares using CAN-FD, I can enter in boot mode (BOOT0 = HIGH) but I get no response from the board. ...
Solution:
This ST-Link V3 doesn't support CAN bootloader flashing. You'll likely need a host software with a CAN-FD interface to communicate with the bootloader. @wafa_ath

Is a quartz crystal and capacitors necessary to run ATmega 328P on a breadboard?

I would like to run my applications on an ATmega 328P (which is more economical compared to buying a Nano or Uno each time). Do I need to always use a quartz crystal and two capacitors (since, from what I understand, this setup is needed to program it) for it to function on a breadboard, or is simply powering it with 5V sufficient? Thank you in advance for your answers. Camila...
Solution:
The crystal just helps you when you want to use other functions in the MCU that exceeds the normal internal clock. So it depends on your application and the firmware written. But generally it will still work nevertheless.

Implementing Arduino Data Logging to Google Sheets for Valve Actions

Hello everyone, I want some expert opinions based on experience ๐Ÿ™‚. Although I have done some research but what way would you think it's best to implement data logging in Arduino ( the board I'm planning on using in my project) to record each action - in this case turning (ON a valve) to a spreadsheet like Google sheets....
Solution:
If you want to log events online somewhere, I'd reecon you go with some ESP32 or ESP8266 chip than going with Arduinio(atmega328). The ESP chip have built in wifi and bluetooth so you dont need to mess around with modules etc. You can still use the arduino IDE for programming them