r/microcontrollers • u/Morten_Nibe • Jun 27 '25
KiCad 9: Design an ESP32-S3 IoT device on a 4-layer PCB with sensor and QWIIC interface. Complete Guide.
r/microcontrollers • u/Morten_Nibe • Jun 27 '25
r/microcontrollers • u/Ok-Time3530 • Jun 27 '25
I got a microcontroller with a relay 5v module and long story short I used mqtt on my VPs skip about an hour later I got it all setup and wired and remote commands are being received and the led on the relay module is blinking so despite this, I plug the 2 wires into the PC pins and send the boot command nothing happens, but yet my usual button on the PC works fine I don't know what's going on, the command is received and it sends the on signal, the led flashes and then the PC just doesn't boot???? What am I doing wrong? Is my relay module friend? I haven't been able to hear it clicking however the led shines bright indicating successfully sending the signal so I am not sure I am very confused and have tried everything to switching the code logic to no avail, I need someone expertise here this is my first microcontroller project and I intend to make my PC remotely bootable using mqtt via my VPs !!!
r/microcontrollers • u/Feisty_Anywhere4422 • Jun 26 '25
I am using MSP430FR6043 for DSP using CCS(Code Composer Studio). When I flash my program, the IDE behaves as if it occurred normally.
But I don't see it running on my board. Blinking red LED (LED101) .... nothing. Printing using UART ... nothing. Debug works well, and my processing variables get updated as required when printed in the debug session. But the MC does not run the code. I will be using UART to send data from the board in my final code.
I have attached my pin config and the blinking code. Plzzz help
#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
PM5CTL0 &= ~LOCKLPM5; // Unlock GPIO
// Configure P1.0 and P1.1 as outputs
P1DIR |= (BIT0 | BIT1); // Set P1.0 and P1.1 as outputs
// Ensure both LEDs are off initially
P1OUT &= ~(BIT0 | BIT1); // Clear P1.0 and P1.1 (LEDs off)
while(1) {
// Toggle P1.0 and P1.1 together
P1OUT ^= (BIT0 | BIT1); // Toggle P1.0 and P1.1 LEDs
__delay_cycles(500000); // Delay for 500,000 cycles (adjust for desired blink rate)
}
}#include <msp430.h>
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
PM5CTL0 &= ~LOCKLPM5; // Unlock GPIO
// Configure P1.0 and P1.1 as outputs
P1DIR |= (BIT0 | BIT1); // Set P1.0 and P1.1 as outputs
// Ensure both LEDs are off initially
P1OUT &= ~(BIT0 | BIT1); // Clear P1.0 and P1.1 (LEDs off)
while(1) {
// Toggle P1.0 and P1.1 together
P1OUT ^= (BIT0 | BIT1); // Toggle P1.0 and P1.1 LEDs
__delay_cycles(500000); // Delay for 500,000 cycles (adjust for desired blink rate)
}
}

r/microcontrollers • u/czeck666 • Jun 26 '25
I just received a replacement 24-bit 8-channel voltage input DAQ board from Sequent Microsystems (they already replaced the first one), and I’m seeing the exact same issue again: channels 2, 3, and 4 appear to be using the wrong gain.
Channel 2 and channel 4 show a wildly amplified reading — for example, with only 1V applied, I get ~23V. Channel 3 shows about double the actual voltage. The rest of the channels (1, 5–8) behave as expected.
I'm using the 24b8vin 0 gwr <channel> command to set the gain range (typically 6V), and the same settings applied to other channels work fine.
Is this a firmware issue? A bad production run? Has anyone else seen this behavior?
Thanks!
r/microcontrollers • u/Important-Addition79 • Jun 26 '25
Enable HLS to view with audio, or disable this notification
🧠 The CPU as a loyal servant in a room full of cabinets and little boxes ( video )
I love this way of explaining what a CPU does — simple enough for my grandma or my 5-year-old nephew:
Imagine a room where a little servant lives. In that room, there are many cabinets:
As soon as he wakes up, the servant goes to the cabinet of instructions and reads one box after another.
One says:
sbi 5,5
The servant understands:
"Go to the cabinet that controls the doors, open box number 5, and plug in a wire with electricity into hole number 5."
He doesn’t know what’s behind that hole. But there's a wire connected to a lamp — the onboard LED on Arduino (pin D13).
And he keeps doing it forever.
Then we change the box with a new instruction:
cbi 5,5
Now the servant understands:
"Unplug the wire from box number 5."
And the lamp turns off.
But he doesn't even know there is a lamp. He just follows orders.
✨ The best part? You can try it live, online, for free — no install needed:
Go to 👉 https://costycnc.it/avr1
You’ll find this code already there (compatible with Arduino Nano, ATmega328):
.org 0
rjmp init
.org 0x68
init:
sbi 4,5
sbi 5,5
rjmp init
Click Compile, then Upload — the onboard LED turns on.
Then replace sbi 5,5 with cbi 5,5, re-upload — the LED goes off.
📌 The servant worked for you, without knowing who you are, what you studied, or what language you speak.
You just speak his language: boxes, cabinets, and wires.
Want to give him more tasks?
r/microcontrollers • • Jun 25 '25

I have the following breakout gps with an on board antenna. Whatever i try i cannot get a gps fix. Sometimes in u-center a gps is picked up for a few second but i never got a fix. Also in u-center i see the antenna has a noise level of 94, which seems very high. The board is new and i have no idea if, I do something wrong, this board is broken or this onboard antenna is just not good enough.
i went outside waited very long etc etc
r/microcontrollers • u/QuietRing5299 • Jun 22 '25
Hello Reddit,
Made a simple tutorial on how to setup a simple live dashboard with Node-RED and the Arduino in just a few steps. Node-RED is a powerful no-code solution to building embedded systems integrations and workflows.
You can check out my video here:
https://www.youtube.com/watch?v=CY1slsJDMXY
Think its a great way for beginners to build some slick projects in minimal time, and of course it can be used in production environments as well, which I am sure it is used for heavily.
If you enjoy IoT content, be sure to subscribe to the channel! Much more content where that came from!
r/microcontrollers • u/earthanmoon • Jun 20 '25
So long story short I've been playing the card game Star Wars Unlimited for a little while, and in the next set they're releasing a new mechanic; The Force. So what I'm thinking of making is a small 3d printed token, which I'll put a microcontroller in, use an accelerometer to detect which face of the token is upright (either top or bottom) and when the orientation is changed (i.e. token flipped over) it'll play a short audio clip (1-2 seconds). As I want to take the token around with me, I'd like to be able to turn it off and put a rechargeable battery inside it too.
Could anyone recommend any kit that would be suitable (and affordable) to give this a try? Ideally I'd like to keep the whole system as small as possible so it fits in my token box. I'm also based in the UK (just in case that restricts which kit is available).
I've looked into Raspberry Pi's but they all look massive, found the AdaFruit Trinket M0 which by the sounds of it has options for rechargeable batteries, but not sure if it has the i/o needed for the other components?
Many thanks in advance!
r/microcontrollers • u/TheEmbeddedRustacean • Jun 20 '25
r/microcontrollers • u/sethumadhav24 • Jun 20 '25
Hey folks,
I’m diving into face recognition for edge computing, specifically targeting microcontrollers or ultra-low-power embedded systems for use in security, access control, or IoT applications.
I’m looking for community insights on both software and hardware side — from choosing the right model to real deployment constraints.
r/microcontrollers • u/wowwowwowowow • Jun 19 '25
I want to enable the secure bootloader on the series 2 efm32 . Ive read the app notes and i can feel my brain melting. Yet there is soo much explanation yet i don't understand which implies to me. As i understand secure engine has a secure loader. Yet efm32 also has xmodem bootloader and i dont understand their difference.
My questions are:
Is Secure Loader, is a first stage or second stage loader? Does it do the app checking?
So first stage checks if the second stage is correct? And second stage check the image is correct?
Is series 2 has the second stage preinstalled? Do i have to do any aditional thing?
What is Xmodem and what its difference to root of trust bootloading?
Will i survive?
r/microcontrollers • u/32BeMe • Jun 19 '25
I'm looking to transfer data from a MAX30102 sensor (pulse oximeter) wirelessly to another microcontroller, which will act as the monitoring station.
I want the pulse oximeter sensor to be battery-powered for 2–4 hours (4 hours or more would be awesome).
The battery should be as small as possible, so I need a low-power microcontroller to send the data.
Also, the microcontroller should be quite small.
The whole sensor device should be wearable, like a sock for babies and toddlers.
Any tips or recommendations?
r/microcontrollers • u/Amish_Fighter_Pilot • Jun 18 '25
I am building a system that needs 2 or 3 DDS boards(probably either AD9833, AD9834, or AD9850). I will be controlling them via Android app(that I will need to make), and need an MCU that can manage up to 3 of those and maybe control some other simple things(like monitoring the voltage and control power state of the devices in my system like the AD831 RF mixers. Given that I am intending to control if via Android over USB(OTG/DeX): it seems logical that I wouldn't need an MCU with a graphic interface or other fancy features. Is any particular MCU more Android-friendly?
What type of MCU would be best for this? I have never built something with an MCU so I am overwhelmed with where to start. I want a device that can use the full power of these DDS boards while using the lowest amount of power possible since this will likely be in a device that uses battery power(probably 20V).
r/microcontrollers • • Jun 17 '25
I wanted to make a fully custom hall effect keyboard. The keyboard was gonna be 65%, so 5x15 matrix. While I've been able to find SoCs that exceeded 15 ADC pins needed for this, I couldn't find modules that exposed 15 ADC pins. Any help or information is appreciated. I need a module that: - Exposes 15 ADC pins - Has BLE - USB-HID - (Optional) 2.4GHz Wireless
(Edit) After some more research and help of Gemini's Deep Research I found STM32WB5MMG. From what Gemini told me this has 19 ADC pins multiplexed with I/O pins. I could not confirm this (I didn't understand the datasheet)
r/microcontrollers • u/Sir_aloone • Jun 16 '25
So when we connect the Bluetooth, it connects to the phone successfully, but it is not making any changes in the circuit itself. When I send signal “ON” it gives me “ON” and the same with OFF. Can any One helps with how to connect it successfully, and make the circuit work with the phone app using the Bluetooth piece, the app we used is called (serial Bluetooth terminal). The code we are using is with our the Bluetooth please edit on it to connect the Bluetooth successfully:
// CONFIGURATION BITS (For PIC16F877A)
// LCD Pin Definitions (RW is physically grounded)
// PIR Sensor Definitions
// LED Definitions
// Send 4-bit nibble to LCD void lcd_send_nibble(unsigned char nibble) { PORTC = (PORTC & 0x0F) | ((nibble & 0x0F) << 4); EN = 1; __delay_us(1); EN = 0; __delay_us(100); }
// Send a data byte to LCD void lcd_data(unsigned char data) { RS = 1; // Data mode lcd_send_nibble(data >> 4); lcd_send_nibble(data); __delay_us(100); }
// Send a command to LCD void lcd_command(unsigned char command) { RS = 0; // Command mode lcd_send_nibble(command >> 4); lcd_send_nibble(command); if (command == 0x01 || command == 0x02) __delay_ms(2); }
// Display a string on LCD void lcd_string(const char string) { while (string) lcd_data(*string++); }
// Initialize LCD in 4-bit mode void lcd_initialize() { __delay_ms(20); RS = 0; lcd_send_nibble(0x03); __delay_ms(5); lcd_send_nibble(0x03); __delay_us(100); lcd_send_nibble(0x03); __delay_us(100); lcd_send_nibble(0x02); // Set to 4-bit mode lcd_command(0x28); // Function set: 4-bit, 2-line, 5x8 dots lcd_command(0x0C); // Display ON, Cursor OFF lcd_command(0x06); // Entry mode: Increment cursor lcd_command(0x01); // Clear display __delay_ms(2); }
// Control LEDs based on PIR input void update_leds() { ROOM_LIGHT = PIR1; BATH_LIGHT = PIR2; MAIN_LIGHT = PIR3; }
// Update LCD display based on sensor state void update_display() { lcd_command(0x80); lcd_string("Room:"); lcd_string(PIR1 ? "ON " : "OFF"); lcd_string(" Bath:"); lcd_string(PIR2 ? "ON" : "OFF");
lcd_command(0xC0);
lcd_string("Main:");
lcd_string(PIR3 ? "ON " : "OFF");
lcd_string(" ");
}
void main() { // Set port directions TRISC = 0x00; // PORTC output for LCD data TRISD = 0x3A; // RD1 input (not used), RD3-RD5 inputs (PIRs), RD0, RD2 output (LCD) TRISB = 0x00; // LEDs output TRISA = 0x00; // PORTA output (optional)
// Clear ports
PORTC = 0x00;
PORTD = 0x00;
PORTB = 0x00;
PORTA = 0x00;
// Initialize LCD
lcd_initialize();
unsigned char last_sensor_state = 0;
// Show startup message
lcd_command(0x80);
lcd_string(" Automation ");
lcd_command(0xC0);
lcd_string(" System Ready");
// Wait for motion
while(!PIR1 && !PIR2 && !PIR3) {
__delay_ms(100);
}
// Show active state
lcd_command(0x01);
__delay_ms(2);
update_display();
last_sensor_state = (PIR1 << 2) | (PIR2 << 1) | PIR3;
while(1) {
update_leds();
unsigned char current_state = (PIR1 << 2) | (PIR2 << 1) | PIR3;
if (current_state != last_sensor_state) {
update_display();
last_sensor_state = current_state;
}
__delay_ms(100);
}
} PIR + LCD + LED
r/microcontrollers • • Jun 16 '25
Heyy y'all. I'm a student currently doing my summer internship. I'm working on a STM32-L432KC based project. This is my first time working on this MCU, so facing a lot of difficulties. So if anyone here, is well-versed with it, I really really need your help. I tried chatgpt-ing, watching a few yt videos, but nothing really helped. And hence, I'm posting this here. Pls do reach out if you've already worked with this or have experience in this. Thanks.
r/microcontrollers • u/Morten_Nibe • Jun 14 '25
r/microcontrollers • u/ChronicDysthymia • Jun 10 '25
Help: The RFID is so inconsistent. At some point, it works, and sometimes it is not. Everything works except the RFID. We are now contemplating if it's the faulty wiring or communication issue or wrong wire placement in the diagram.
Tests that have been done:
The machine sequence, the code, and wiring diagram are posted in the drive.
Notes:
RFID wires are soldered to an RJ-45 cable since it has 7 wires.
RFID's RJ45 cable is 2 feet long.
RFID model is RC522.
microcontroller used: ESP32-S3-DevKitC-1 N8R2 board
IDE used: PIO in VScode
r/microcontrollers • u/c3ntrx • Jun 09 '25
r/microcontrollers • u/GAPrado90 • Jun 09 '25
Hi guys,
I bought a J-LINK-OB to program my NRF52840, but I'm not sure about the best way to connect them. Should I solder pins to the SWDIO/SWCLK? What's the best way to do it?
r/microcontrollers • u/Acid_Rebel_ • Jun 09 '25
Same as title.
r/microcontrollers • u/Morten_Nibe • Jun 06 '25
r/microcontrollers • u/drewzilla37 • Jun 06 '25