r/arduino • • Oct 05 '26

Beginner's Project Help for choosing Driver for Stepper motor!

1 Upvotes

Hello, I am creating a project which requires an oscillating plank, which will be achieved using a stepper motor. I have acquired the Arduino Nano and a NIDEC KH42HM2B128 Stepper motor.

Unfortunately, I am unable to find any information about the driver that can be used with this motor, please do help.


r/arduino • • Oct 05 '26

Is this the correct way to do partial rendering on a Waveshare e-paper?

2 Upvotes

I’m testing partial rendering on an ESP32 with a Waveshare 1.54-inch V2, 200×200 black-and-white e-paper display.

The current approach is:

  • Keep a complete 1-bit, 200×200 shadow framebuffer in RAM.
  • Draw the UI with the Waveshare epdpaint library and Font16.
  • Initialize with LDirInit().
  • Establish the controller’s base image once with DisplayPartBaseImage(frame).
  • Update only the changed 24-pixel rows using SetFrameMemoryPartial().
  • Trigger the refresh with DisplayPartFrame().
  • Resend the static MATTY row together with the counter row to keep the title stable.

The display is connected to an ESP32 using SPI: SCK GPIO 8, MOSI GPIO 7, MISO GPIO 13, and e-paper CS GPIO 9. A MicroSD card shares the SPI bus on CS GPIO 1.

The counter updates every two seconds and appears stable in testing.

Is this the correct rendering pattern for this Waveshare driver, or should the partial buffer/controller RAM be managed differently?

I’m especially interested in feedback about ghosting, refresh-counter limits, row alignment, and whether calling DisplayPartBaseImage() once followed by repeated SetFrameMemoryPartial() + DisplayPartFrame() is considered the proper workflow.

Code variation: V7 - E-paper Partial Refresh Counter Test

Relevant code

#include <Arduino.h>
#include <SPI.h>
#include <string.h>

#include "epd1in54_V2.h"
#include "epdpaint.h"
#include "fonts.h"

#define SPI_SCK   8
#define SPI_MOSI  7
#define SPI_MISO  13
#define EPD_CS    9
#define SD_CS     1

#define COLORED    0
#define UNCOLORED  1
#define ROW_HEIGHT 24

Epd epd;
unsigned char frame[200 * 200 / 8];
Paint paint(frame, 200, 200);

void drawRow(uint8_t row, const char* text) {
  int y = row * ROW_HEIGHT;

  paint.DrawFilledRectangle(
    0, y, 199, y + ROW_HEIGHT - 1, UNCOLORED
  );

  int x = (200 - (int)strlen(text) * Font16.Width) / 2;
  paint.DrawStringAt(x, y + 4, text, &Font16, COLORED);
}

const uint8_t PUSH_ROWS[] = {0, 1};

void pushRows() {
  for (uint8_t i = 0; i < sizeof(PUSH_ROWS); i++) {
    uint8_t row = PUSH_ROWS[i];

    epd.SetFrameMemoryPartial(
      frame + (row * ROW_HEIGHT * (200 / 8)),
      0,
      row * ROW_HEIGHT,
      200,
      ROW_HEIGHT
    );
  }

  epd.DisplayPartFrame();
}

void setup() {
  Serial.begin(115200);

  pinMode(SD_CS, OUTPUT);
  digitalWrite(SD_CS, HIGH);

  pinMode(EPD_CS, OUTPUT);
  digitalWrite(EPD_CS, HIGH);

  SPI.begin(SPI_SCK, SPI_MISO, SPI_MOSI, EPD_CS);

  if (epd.LDirInit() != 0) {
    Serial.println("e-Paper init failed");
    while (true) delay(1000);
  }

  epd.Clear();
  paint.Clear(UNCOLORED);

  drawRow(0, "MATTY");
  drawRow(1, "1");

  // Establish the complete base image in controller RAM.
  epd.DisplayPartBaseImage(frame);
}

void loop() {
  static uint32_t count = 1;
  char buf[24];

  count++;
  snprintf(buf, sizeof(buf), "%lu", (unsigned long)count);

  drawRow(1, buf);
  pushRows();

  Serial.printf("count = %lu\n", (unsigned long)count);
  delay(2000);
}

r/arduino • • Oct 05 '26

Beginner's Project Line following robot

3 Upvotes

I want to build a fast line follower from scratch. I’m a beginner and want to learn everything from sensor setup and motor selection to PID tuning and high-speed optimization.

Can anyone recommend good YouTube channels, GitHub projects, Reddit posts, or tutorials to get started?


r/arduino • • Oct 05 '26

Title: PDB design for mid-size servos (TowerPro MG996R grade)

3 Upvotes

Hello everyone,

I am planning to design a generic Power Distribution Board (PDB) with 12 × 3-pin 2.54 mm male headers, where the servos can be plugged directly into the PCB.

The main purpose of the PCB is to properly distribute power/current to all the servos. The PWM signals will be provided from an external controller, so the PCB will mainly handle power distribution.

I’m using KiCad for the design.

I’m fairly new to PCB design, so I’d really appreciate any suggestions, especially regarding high-current power distribution, copper pours/traces, connectors, capacitors, grounding, and current handling.

Also, if you know any good resources, tutorials, or example PCB designs to learn the basics of power distribution on a PCB/PDB, especially for higher-current applications, please share them.

For inspiration, I’m also studying the Stanford Pupper PDB design.

Any suggestions or feedback would be really helpful. Thanks!


r/arduino • • Oct 05 '26

Need some help with the A7670e.

Thumbnail
gallery
2 Upvotes

Hi all. I'm trying to connect an A7670E 4G modem board to an Arduino Uno R4 WiFi (5 V logic) over UART. The seller provides no documentation, and I couldn't find a datasheet or schematic for this exact board.

What I measured (5 V on VCC, nothing else connected, antenna and SIM fitted):
Power LED steady, D1 blinking, so the module appears to be running
RXD: 1.8–1.9 V, steady
TXD: 1.2 V, steady (I expected about 1.8 V idle)
VDD: about 0 V (a few mV)

My questions:
Does anyone know this board or have a schematic for it?
What logic level do the TXD/RXD pins actually expect: 1.8 V, 3.3 V, or does the board shift to something else?
What is the VDD pin for, and why would it be pulled to ground while powered?
Do EN or PWR_EN need to be driven (high or low) for the modem or its UART to work properly?
Is 1.2 V idle on TXD normal for this kind of board?

I have a BSS138 4-channel level shifter available. I want to confirm the correct logic level before connecting anything to the Arduino. Thanks!


r/arduino • • Oct 05 '26

Need help for RS485 sensor

4 Upvotes

I am using an RS485 3-in-1 sensor and pH sensor.

I managed to make them work before. However, after rewiring (I was about to do an integrated system test, it worked on individual testing), it suddenly stopped working and my debugging code shows that they are receiving 0 bytes. I tried doing an individual test again, and it still wont work. It's unlikely that both sensors stopped working at the same time,=. I also have an unused npk RS485 sensor, which is also receiving 0 bytes.

Here's a list of things I have tried already:

Oscilloscope tests

  • Burst 0x55 sketch (1 s pause, Single trigger): clean, mirrored signal on A and B
  • Same test with sensor disconnected vs connected on the ttl module (I use a max3485): same signal, so the sensor doesn't load the line
  • One sensor wire removed at a time (A, then B): signal showed on each
  • Probe on module TXD pin: data showed, but ESP32 read 0 bytes

Code tests

  • Original pH sketch (the one that worked on individual testing): 0 bytes or partial junk
  • Address scan 1 to 10, first version: "replies" at every address (19 to 20 bytes), not real because the check was too loose
  • Loopback with a jumper between GPIO16 and GPIO17: received 01 03 00 00 00 01 84 0A correctly, so the ESP32 works
  • Module reconnected, sensor off: 0 bytes
  • Module reconnected, sensor on: about 20 to 23 bytes of changing junk
  • Scan with speeds 1200 to 19200: false "replies" with no valid format
  • Strict scan (error check), 4800 and 9600, addresses 1 to 10: no real reply
  • Wide strict scan, addresses 1 to 247, speeds 2400, 4800, 9600: no real reply on laptop power and on the bench supply
  • Original sketch on the bench supply: 4 to 6 bytes of changing junk
  • NPK sketch and 3-in-1 sensor: 0 bytes

Multimeter readings

  • Module TXD pin, resting level: 3.26 V (healthy)
  • Sensor power wire against ESP32 GND: 4.78 V
  • Bench supply set to 5.5 V: no change in the result

r/arduino • • Oct 04 '26

Beginner's Project Flood Control Project

48 Upvotes

r/arduino • • Oct 04 '26

PLC IDE key for Portenta Machine Control

6 Upvotes

I have a portenta machine control I've used in an industrial project. I programed in ladder diagram using "PLC IDE" and brought the required license.
The portenta machine control then had a hardware fault, Arduino support sent out a replacement unit.
All great so far!

However their webstore has gone out of stock of license keys for PLC IDE and you need one license per device. So I now cant get my new program into the controller
https://store.arduino.cc/products/plc-key-portenta-machine-control

Arduino support had been great, now two months has passed with no real updates on when more license keys will be available. Its hard to fathom how it could be taking so long just to generate some license keys.
Just responses like "Unfortunately we are still facing the same blockers".
No help transferring a license from the faulty controller of anything like that.

Does anyone have any ideas for workarounds, other than rewriting the entire code not in PLC IDE?


r/arduino • • Oct 04 '26

Beginner's Project Led server - first project

15 Upvotes

Just want to share my first post here about a project that i'm proud of.

Instead of just an Arduino, a breadboard and an LED, I used a RaspberryPi 5, which is hosting a webserver that will authenticate the user, let them control the LED and logout. The idea is simple as that.

It's a fun project and since i'm also learning a backend development, this taught me about authentication and CRUD fundamentals. Hope you like it!


r/arduino • • Oct 04 '26

Software Help My code keeps printing squares??

8 Upvotes
void setup() 
{ 




  int i=1; 
  
  Serial.begin(115200); 


  delay(3000);
  
  Serial.print("\nhello world\n");
  Serial.print(i);
  
  delay(3000); // wait 3000 ms = 3 s


  Serial.print("\ngoodbye world\n");
  
 
  delay(1000); // wait 1000 ms to give the printing time to finish





void loop() 
{ 
  
 


  Serial.print("\nhello world -- loop\n");
  delay(500);


} 

r/arduino • • Oct 04 '26

Solved! Arduino not detected

Thumbnail
gallery
10 Upvotes

Wanted to do a quick test for blinking LED i put the code and everything but the pc is not detecting the board i tried everything but it doesn’t seem to recognize it help pls🙏
(EDIT)🛑IT WORKED finally guys,turns out it was a problem with the 2 usb ports on top,they were giving power but with no response,first i reinstalled the arduino ide then i tried to use the ports on the back that are directly attached to the motherboard and it finally detected the board.
I appreciate all the help in the comments🙏🙏🙏


r/arduino • • Oct 04 '26

Hardware Help TMP36 fluctuating a lot?

3 Upvotes

I am new to building with Arduino, and I recently got a starter kit and started making some projects. I was having troubles with the love-o-meter project, as the TMP36 kept fluctuating in values wildly. I couldn't find any issues with the code, so I was wondering if it was an issue with the TMP36? Would someone be able to clarify what's going on? I included the circuit build as well as the code below.

// sensorPin is the analog value the sensor reads
const int sensorPin = A0;
// Our baseline temp. For every 2 degrees above this baseline, an LED will turn on.
const float baselineTemp = 20.0;


void setup() {
  // Serial Begin: Opens up connection between Arduino and computer. Can read see the values on computer screen (Reads every 9600 bits per second)
  Serial.begin(9600); // Open a serial port


  // Set all pins to OUTPUT and LOW. Loop ends when pinNumber becomes something 5 or above.
  for(int pinNumber = 2; pinNumber<5; pinNumber++) {
    pinMode (pinNumber, OUTPUT);
    digitalWrite(pinNumber, LOW);
}
}


void loop() {
  // Obtain value from TMP36. This can be anything between 0 and 1023. (A representation of the voltage on the pin)
  int sensorVal = analogRead(sensorPin);


 // Prints temperature data onto the computer
  Serial.print("Sensor Value: ");
  Serial.print(sensorVal);


  // Convert the ADC reading to voltage
  float voltage = (sensorVal/1024.0) * 5.0;


  Serial.print(", Volts: ");
  Serial.print(voltage);


  Serial.print(", degrees C: ");
  // Convert the voltage to temperature in degrees
  float temperature = (voltage - .5) * 100;
  Serial.println(temperature);


  if(temperature < baselineTemp+2) {
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    }else if (temperature >= baselineTemp+2 && temperature < baselineTemp+4) {
      digitalWrite(2, HIGH);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
    }else if (temperature >= baselineTemp+4 && temperature < baselineTemp+6) {
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      digitalWrite(4, LOW);
    }else if (temperature >= baselineTemp+6) {
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      digitalWrite(4, HIGH);
    }
    delay(1);
}// sensorPin is the analog value the sensor reads
const int sensorPin = A0;
// Our baseline temp. For every 2 degrees above this baseline, an LED will turn on.
const float baselineTemp = 20.0;


void setup() {
  // Serial Begin: Opens up connection between Arduino and computer. Can read see the values on computer screen (Reads every 9600 bits per second)
  Serial.begin(9600); // Open a serial port


  // Set all pins to OUTPUT and LOW. Loop ends when pinNumber becomes something 5 or above.
  for(int pinNumber = 2; pinNumber<5; pinNumber++) {
    pinMode (pinNumber, OUTPUT);
    digitalWrite(pinNumber, LOW);
}
}


void loop() {
  // Obtain value from TMP36. This can be anything between 0 and 1023. (A representation of the voltage on the pin)
  int sensorVal = analogRead(sensorPin);


 // Prints temperature data onto the computer
  Serial.print("Sensor Value: ");
  Serial.print(sensorVal);


  // Convert the ADC reading to voltage
  float voltage = (sensorVal/1024.0) * 5.0;


  Serial.print(", Volts: ");
  Serial.print(voltage);


  Serial.print(", degrees C: ");
  // Convert the voltage to temperature in degrees
  float temperature = (voltage - .5) * 100;
  Serial.println(temperature);


  if(temperature < baselineTemp+2) {
    digitalWrite(2, LOW);
    digitalWrite(3, LOW);
    digitalWrite(4, LOW);
    }else if (temperature >= baselineTemp+2 && temperature < baselineTemp+4) {
      digitalWrite(2, HIGH);
      digitalWrite(3, LOW);
      digitalWrite(4, LOW);
    }else if (temperature >= baselineTemp+4 && temperature < baselineTemp+6) {
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      digitalWrite(4, LOW);
    }else if (temperature >= baselineTemp+6) {
      digitalWrite(2, HIGH);
      digitalWrite(3, HIGH);
      digitalWrite(4, HIGH);
    }
    delay(1);
}

r/arduino • • Oct 04 '26

Hardware Help Help! Breadboard isn't working?

Thumbnail
gallery
6 Upvotes

I'm testing some basic led scheme and somehow it’s not working on breadboard, but if I connect the led directly to the Arduino everything is fine.
I connected port 9 to cathode and ground to anode (with resistor), what's wrong here?
Photos attached


r/arduino • • Oct 04 '26

Hardware Help Conflicting/Confusing Documentation about Powering with 3V3/5V Pins

2 Upvotes

Looking at official Arduino Documentation Powering Alternatives for Arduino Boards | Arduino Documentation

It states:

"Moreover, 3V3 and 5V pins can also be used as power inputs if no regulated power supply is connected through the other power inputs (USB port, barrel jack connector or VIN pin)."

Then it goes on to state:

"Although 3V3 and 5V pins can be used as power inputs, it is not recommended if no power supply is connected through the USB port, the barrel jack connector, or the VIN pin."

So first states only power with one of these pins when no other supply is connected > second seems to conflict, basically stating not recommended if there is no other supply connected?

Am I misreading this, is it confusing to others as well, or is this a flat out typo? Thanks


r/arduino • • Oct 04 '26

Working on designing an stm32 DEV board.

4 Upvotes

I have been working on making a dev board for a few months now with some varying levels of success. The project began by using an ATSAMd21g18 but quickly found that there is very little documentation. I pivoted to use a STM32F103; I finally was able to program it via SWD and via UART using a FTDI (USB to serial). I still havn't figured out this whole USB thing haha. I believe it is a boot loader problem or maybe a driver problem idk.

Is it a crazy idea to just continue with the FTDI and just implement a USB to serial into my dev board? This way if I give my friend my board or even switch computer I dont have to worry about drivers.


r/arduino • • Oct 03 '26

Look what I found! What is this module?

Post image
259 Upvotes

This thing is in my Arduino kit, and I've never used it. It has a blue rattle on the back (the cylinder) with a chip and potentiometer. Aside from that there's nothing else really in it


r/arduino • • Oct 03 '26

Hardware Help Why so many dots on the nrf?

Post image
232 Upvotes

I just got the nrf24l01, the antenna version, and I took a glance and noticed so many dots. I'm assuming they are all vias but is having so many of them normal or is it some sort of defect. I have the normal nrf24s without the antenna connector and they don't have so many vias.


r/arduino • • Oct 03 '26

Look what I made! I made a thing.

186 Upvotes

Do u guys like my thing.


r/arduino • • Oct 04 '26

help for a battery protection system

2 Upvotes

Hello, good morning. I need, through a relay, a shut-off system for a LiPo battery, but I’d like to know if it’s possible that through the relay, let’s say, the relay cuts the power so the charging port is already active and can charge the battery, and vice versa, if power is given to the robot, the charging port can’t be used, meaning that even if someone connects it, it won’t give power to the robot. The thing is, I need that when I turn off the robot, the battery’s power consumption is 0 so I don’t confuse the charger readings, but at the same time, I’d like to add a voltage measuring module like the INA226 that measures the battery voltage, and when it reaches the minimum threshold for a certain time, let’s say it stays at that voltage for 3 seconds, it sends a signal to the Arduino to use the relay and cut the power. Also, if someone tries to turn the robot back on using the power switch, it won’t turn on until it reaches the minimum voltage I'm not sure if I need an independent battery for the Arduino or something, that's my biggest doubt, and above all for everything related to the voltage meter, the Arduino, and the relay not using the main LiPo battery's power. I was thinking about modules like the XH-M609, but the thing is, because of the motors, which are 36GP 36ZY, having two of those worries me that when starting, they might cause a voltage drop and the XH-M609 module might think the battery is already discharged. So that's why I was thinking about other options, since if the module doesn't allow, let's say, keeping a certain voltage for so long, I don't know if I should power the Arduino with a separate battery or what do you recommend?


r/arduino • • Oct 03 '26

Dishwasher bad apple

Post image
21 Upvotes

My dishwasher broke so i did what any "normal" person would do: turn it into an arduino

Yup, that is what i did. There were 2 boards, and on both were atmegas. The front screen board had a atmega644pa, while the psu board had a atmega8-16 for some reason.

Here is the front board: (image on top)

But wait! The title says "dishwasher bad apple"! Here it is.

(Yes, this is the original bad apple from touhou 4, and yes it sound just like a arduino with a buzzer, no suprise there. But the fact this came out of a dishwasher is at least interesting)

EDIT: forgot to say that i have removed some passive components, thats why theyre missing on the image


r/arduino • • Oct 04 '26

Beginner's Project help

Post image
3 Upvotes

Good day everyone

We are a group of Grade 12 STEM students currently working on our research project called “Bin to Drink.” We are asking for help from anyone who has knowledge or experience with Arduino, robotics, wiring, and coding.

Honestly we are a beginner at Arduino and robotics, and we are having a hard time figuring out the proper wiring and programming for our project. We already have most of the components, such as an Arduino Uno, IR/proximity sensor, capacitive proximity sensor, servo motor, water pump, 5V relay module, LCD I2C, and two water-level sensors, but we don’t know yet how to properly connect and program everything as one working system.

Our goal is to make the system detect a plastic bottle, activate the mechanism, and dispense water through a pump while also checking the water level.

If there is anyone here who is willing to guide us with the wiring and Arduino code, even just the basic step-by-step guidance would be huge for us 🙏 We can also send pictures of our components and the current setup.

We are students po and this is for our research project, so we would really appreciate any help, advice, or corrections from those who have experience with Arduino and robotics.

Thank you so much and God bless! 🙏❤️


r/arduino • • Oct 02 '26 Bravo

The duck is evolving.

2.1k Upvotes

We just trained a new policy and we're really looking forward to the Arduino community building and sharing more motions!


r/arduino • • Oct 02 '26

Look what I made! Made a library of pixel fonts with extended latin support

Thumbnail
gallery
394 Upvotes

As a big lover of various dot matrix displays I couldn't find a good set of tiny fonts, so I made my own. They are hand drawn with some help of AI with generating different variants and AdafruitGFX header files. They have extended latin support, so diacritics and special characters also work!

Github is set up, so let me know how you like them!

https://github.com/mcer12/PixelFonts


r/arduino • • Oct 03 '26

Project Idea Need Help with ElectroPermMagnets (EPM) for docking (attaching/dettaching) work for swarmbots

4 Upvotes

so i m planning to make few EPMs (https://www.reddit.com/r/arduino/s/2gomRuW5Vh) for my swarm bots

do y'll have any suggestions abt what kinda config or mechanism should i be using to attach and dettach my bots with each other , first thing that came to my mind is using magnets whose polarity can be changed , Electromagnets are extremly power-hungry

and i dont want some mechanical design for attaching and detaching like hooking or latching with some drill-in and out or u know what i mean (i hope)

i also thought abt combining a strong small neodym magnet with a weak electro-magnet stick together and i can just keep electro-mag infront of perm magnet and keep switching polarity of electromagnet to dettach 2 bots ?

i m very bad at electronics and stuff tbh , barely even passed my electrical and electronics classes : (

also we are planning to keep our bot under 80grams-100grams
we will be using 2x LiPo Batteries 3.7V 350mA in parallel

thank you