r/arduino • • Sep 23 '26

Hardware Help Looking for motor recommendations

7 Upvotes

I’m new to Arduino, and I’m working on making a small puppet for a project. I just need to quickly move light parts back and forth to mimic twitching, but ideally the motors need to be as silent as possible.

I’ve used servos in the past but I know those can be quite noisy so I was wondering what folks had for recommendations. I will probably be using an Arduino uno, and the load would barely be a pound? At most. This is still early prototyping.

Thanks!


r/arduino • • Sep 23 '26

can I change timer frequency with W5500 ethernet board (arduino nano)

3 Upvotes

Hello, so simple question; I'm using an arduino to control actuators/motors and learning to control it via ethernet. (using OSC and I'm pretty happy of having figured it out in an afternoon with limited programmation knowledge).

I've done this many times with usb serial and I usually change the frequency of the timers so the PWM frequency is higher than audio rate (and thus not audible; because this is a musical project).

trouble is the ethernet board (W5500) uses pins 10 through 13 and so 2 PWM pins that are sets via the 3 timers (this is an arduino nano but I could use a different one; like a mega if I need to)

so the question is will changing the timers screw with the ethernet transmission?

I usually do something like this (don't remember the frequency but I think it's above 20khz)

TCCR0B = (TCCR0B & 0xF8) | 0x01;
TCCR1B = (TCCR1B & 0xF8) | 0x01;
TCCR2B = (TCCR2B & 0xF8) | 0x01; 

reference says:

  • D3 and D11: Controlled by Timer 2.
  • D5 and D6: Controlled by Timer 0.
  • D9 and D10: Controlled by Timer 1.

so timer 0 should be fine but 1 and 2 could cause trouble.

(I'm trying to figure out a way how to do this in general before attacking different instruments and particular cases so no idea how much outputs I'll need and of them how much I'll need to be PWM; just trying to cover all the bases).


r/arduino • • Sep 23 '26

Beginner's Project Newbie to hands-on electronics building a programmable LED picture — need advice on diffusers, strip choice, board and power draw

5 Upvotes

I want to build a programmable LED picture with Arduino — not a picture with backlighting, but an actual addressable LED strip (probably WS2812B) diffused behind some kind of panel, creating different animated effects.

I've got a few specific questions I'd love advice on:

  1. Diffuser — I can't get acrylic (milky/frosted acrylic sheet) where I live. What are some working alternatives? I already asked an AI for suggestions, but nothing it came up with is actually available to me locally.
  2. Strip — I'm planning on WS2812B, but is there something better suited for this kind of project?
  3. Board — thinking something like an Uno, but cheaper if possible. Any recommendations?
  4. Power consumption — how much does something like this actually draw, and are there ways to cut it down?

The size of the piece will depend on whatever I end up finding for the diffuser.

Heads up, I'm a total beginner with hands-on stuff (soldering, wiring, etc.), but not a beginner when it comes to coding — so the software side isn't a concern, it's really the physical build I need help with.

If anyone's done something similar — please show me the result! I feel like I don't fully grasp what this will actually look like in the end, and I'd like to check my expectations against reality


r/arduino • • Sep 23 '26

Open-source ESP32 gateway for LiTime Bluetooth battery telemetry

2 Upvotes

I built an open-source ESP32 gateway for Bluetooth-enabled LiTime batteries and wanted to share the project with folks who enjoy microcontroller builds.

Project page:

https://litime-gateway.tjt-media.online

GitHub:

https://github.com/TristanEDU/litime-esp32-gateway

Stable release:

https://github.com/TristanEDU/litime-esp32-gateway/releases/tag/v0.1.0

What it does:

- Uses an ESP32 to read LiTime battery telemetry over Bluetooth LE

- Serves a local browser dashboard from the ESP32

- Shows SOC, voltage, current, power, capacity, temperatures, and per-cell voltages

- Provides a setup Wi-Fi access point for first-time configuration

- Optionally connects outward to a Cloudflare Worker for read-only remote viewing

- Does not require inbound port forwarding

- Does not expose charge/discharge controls

Some of the interesting Arduino/ESP32 pieces were BLE scanning/client behavior, keeping Wi-Fi + TLS/WebSocket stable at the same time, and avoiding reconnect/heap trouble during long-running operation.

This is monitoring-only. It is not a BMS replacement, shunt replacement, charger controller, disconnect, or safety system.

I would appreciate feedback from anyone who has built long-running ESP32 BLE gateway projects, especially around reliability and reconnect patterns.


r/arduino • • Sep 22 '26

Look what I made! I made a D&D dice roller using ESP32

105 Upvotes

I made this dice roller for my girlfriend's birthday. It lets you roll different types of dice and has 3D animations for each die that is calculated and rendered in real time.

This was a fun project to make, especially figuring out the way to render the shapes.

You can find the code and the 3D models here


r/arduino • • Sep 23 '26

Beginner's Project Beginner Trying to Learn How to Use Arduino

4 Upvotes

Hello, I’m a beginner trying to learn how to use arduino in order to use it for a project where I need to get weights of some samples and get the input data from the weights and use it to generate some information regarding the weights. I was hoping to get this data and connect it with a browser application to display. I have experience in javascript and node, but I wasn’t sure whats the best library to use and if there are any good tutorials out there that will help me get started. Also what hardware is needed? I know I need the arduino board, but is there anything else?


r/arduino • • Sep 22 '26

Software Help still cant upload the code

Thumbnail
gallery
21 Upvotes

hi there, i have a pro mini and i tried two different uart adapters and holding down the reboot and the arduino but non of them works and gives me this errorq


r/arduino • • Sep 22 '26

Beginner's Project Trying to make an obstacle avoiding robot.

Thumbnail
gallery
27 Upvotes

Not enough power.

Ultrasonic sensor wants 5 volts. Arduino won't turn on if it's plugged in because the green batteries are 4.8 volts.

Got 2 18650 batteries for the wheels. Tried getting the ultrasonic sensor on 12 volts by putting in 3 resistors and an led so it doesn't burn out, didn't work. And if it did, it would just take away necessary power from the wheel.

I haven't even wired the servos yet because there isn't enough power to go around.

I think I'm just going to have to this L and buy a bunch of 9 volt batteries.

Yes I know the build it janky, no I don't have a 3d printer or know how to model.

...

Elegoo 2560 mega kit

Aliexpress wheels/DC motors.

Li-On 18650 batteries.

Amazon basics rechargeable batteries.


r/arduino • • Sep 22 '26

Help with my robot arm

Thumbnail
gallery
14 Upvotes

I’m trying to power my arduino from my bench top power supply, the arduino is only getting power when my thumb sticks are pressed up or right. Any help?


r/arduino • • Sep 23 '26

Getting Started Im new and any help you be appreciated

1 Upvotes

Ive bought myself my first ever esp32, its the ESP32 S3 from freenove, the specific item is FNK0104S i believe, i am just getting into this and have no idea about coding at all really, i have played with freenoves flasher and flashed some things onto the device like an image viewer and timer but im wondering if there is an easier way then going through Arduino IDE, something like freenoves flasher but maybe community built or something with just more effort put in then a couple of apps, or whatever they are called on esp, as i said im new.
Any advice at all related to my question or simply just beginner advice would be greatly appreciated 😁

PS. I have looked up flashers but from what i have found not all sketches work on all ESPs so im reluctant to mess something up without knowing a sketch will work on my specific hardware/device.


r/arduino • • Sep 21 '26

Hardware Help Ants! How to prevent

Thumbnail
gallery
1.1k Upvotes

I have an environmental sensor out in a wetland, and I thought I sealed it pretty well, but somehow ants get in. I don’t really really object to ants except that they bring dirt into the enclosure.

Is there anyway anyone has found to prevent ants from entering in the first place?

UPDATE -- The ants were coming in through a small keyhole in my RJ45 cable gland. The RJ45 connector was trashed with dirt all over it, so I replaced it and caulked the keyhole. I kicked all the ants out in the wetland. The sensors are working great now!


r/arduino • • Sep 23 '26

Hardware Help TFT Screen not working with my code, but the screen will work with a test program.

2 Upvotes

I am working of connecting an Adafruit 1.9 inch ST7789 screen to a Sparkfun ESP32 Thing Plus. I keep running into this issue with the TFT screen not displaying anything from my code. The kicker is that I can run a test program using the same pin assignments just fine, so I know I have the screen connected correctly. I know the issue is with my code, but I have spent the last two nights trying to figure out what is wrong with my code.

This is my code:

#include <Arduino.h>
#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>
#include <Adafruit_ImageReader.h>
#include <RTClib.h>
#include <SdFat_Adafruit_Fork.h>
#define ENCODER_OPTIMIZE_INTERRUPTS
#include <Encoder.h>


namespace Pins
{
constexpr byte TFT_CS = 5;
constexpr byte TFT_DC = 17;
constexpr byte TFT_RST = 16;
constexpr uint8_t TFT_SCLK = 18;
constexpr uint8_t TFT_MISO = 19;
constexpr uint8_t TFT_MOSI = 23;
constexpr byte PAUSE_BTN = 27;
// constexpr byte RED_LED = 4;
constexpr byte BUTTON = 12;
constexpr byte ENCODER_A = 36;
constexpr byte ENCODER_B = 39;
}  // namespace Pins


Adafruit_ST7789 tft =
    Adafruit_ST7789(&SPI, Pins::TFT_CS, Pins::TFT_DC, Pins::TFT_RST);
RTC_DS3231 rtc;
Encoder myENC(Pins::ENCODER_A, Pins::ENCODER_B);


enum PomodoroState
{
    STATE_IDLE,
    STATE_WORKING,
    STATE_BREAK,
    STATE_LONGBREAK,
    STATE_WAITING
};
const char* stateLabels[] = {"------IDLE------", "-----WORKING-----",
                             "---SHORT BREAK---", "---LONG BREAK----",
                             "-----WAITING-----"};


struct SessionSettings
{
    // double timerMinutes;
    uint16_t timerMinutes;
    double breakMinutes;
    // NOTE This will be changed to something the user can select themselves.
    int beforeLongBreak = 0;


} session;
struct PomodoroSystem
{
    PomodoroState current = STATE_IDLE;
    PomodoroState previousState;
    int shortBreakCounter = 0;
    int sessionCounter = 0;
    unsigned long pauseBtnPressed;
    unsigned long pauseBtnDebounce = 500;
    unsigned long pauseInterval = 1000;


    bool timerActive = false;


} tomato;


struct TimerConfig
{
    unsigned long interval = 1000;
    unsigned long prevTime = 0;
    unsigned progressBarTime = 0;
    unsigned long btnDebounce = 300;
    unsigned long btnPress;
    DateTime endTime;
} timer;


struct AnimationConfig
{
    double scaleFactor = 5.333;
    double timerMinutesconvert;
    double rawProgressBar;
    unsigned long progressBarTime = 0;
    int countdownBarWidth;
    int remainingWidth;
    int barX;
    uint16_t countdownBarColor;
    boolean setDuration = false;
} animation;


int encoderCounter = 0;
long oldPosition;


String Months[12] = {"January",   "February", "March",    "April",
                     "May",       "June",     "July",     "August",
                     "September", "October",  "November", "December"};
void readEncoder();
void drawSelectionBar();
void drawCountdownBar(DateTime timerEnd, uint16_t totalDuration);
void updateDisplay(DateTime dt, unsigned long currentTime, double tomCurrent);
void stateMachine();
void setTimer(int alarmNumber, double totalminutes);
void setBreakTime(double workSessionDuration);
bool hasAlarmFired(int alarmNumber);


void setup()
{
    Serial.begin(115200);
    SPI.begin(Pins::TFT_SCLK, Pins::TFT_MISO, Pins::TFT_MOSI, Pins::TFT_CS);


    pinMode(Pins::BUTTON, INPUT_PULLUP);
    // pinMode(Pins::RED_LED, OUTPUT);
    pinMode(Pins::PAUSE_BTN, INPUT_PULLUP);
    tft.init(170, 320);  // Init ST7789 170x320
    tft.setTextWrap(true);
    tft.fillScreen(ST77XX_BLACK);
    // digitalWrite(Pins::RED_LED, HIGH);
    delay(250);
    // digitalWrite(Pins::RED_LED, LOW);
    tft.fillScreen(ST77XX_BLACK);
    tft.setRotation(3);
    tft.setTextSize(3);
    tft.setTextColor(ST77XX_WHITE, ST77XX_BLACK);
    tft.setCursor(0, 85);
    tft.drawRoundRect(0, 125, 320, 30, 20, ST77XX_WHITE);
    tft.drawRoundRect(0, 124, 320, 30, 19, ST77XX_WHITE);
    tft.drawRoundRect(0, 123, 320, 30, 18, ST77XX_WHITE);


    if (!rtc.begin())
    {
        Serial.println(F("RTC NOT FOUND"));
        while (true)
        {
            tft.setCursor(0, 0);
            tft.println("RTC NOT FOUND");
            delay(1000);
        }
    }


    if (rtc.lostPower())
    {
        tft.setCursor(0, 0);
        tft.println("RTC Lost Power");
        delay(1000);
    }


    // rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));


    rtc.clearAlarm(1);
    rtc.clearAlarm(2);
    myENC.write(0);
    oldPosition = 0;


    tomato.current = STATE_IDLE;
    session.timerMinutes = 0;
    tomato.timerActive = false;
    timer.prevTime = millis();
    Serial.println("--- POMODORO TIMER STARTED ---");
}


void loop()
{
    DateTime currentDT = rtc.now();
    unsigned long currentTime = millis();
    if (animation.setDuration == false)
    {
        readEncoder();
        drawSelectionBar();
    }
    else
    {
        if (tomato.current == STATE_BREAK)
        {
            drawCountdownBar(timer.endTime, session.breakMinutes);
        }
        else
        {
            drawCountdownBar(timer.endTime, session.timerMinutes);
        }
    }
    updateDisplay(currentDT, currentTime, tomato.current);
    stateMachine();
    if (digitalRead(Pins::BUTTON) == LOW &&
        (currentTime - timer.btnPress > timer.btnDebounce) &&
        session.timerMinutes > 0)
    {
        timer.btnPress = currentTime;
        tomato.current = STATE_WORKING;
        tomato.timerActive = true;
        animation.setDuration = true;


        setTimer(1, session.timerMinutes);
        setBreakTime(session.timerMinutes);
    }
}
void readEncoder()
{
    long rawPosition = myENC.read();
    long newPosition = rawPosition / 4;


    if (newPosition != oldPosition)
    {
        if (newPosition > oldPosition)
        {
            session.timerMinutes += 5;
        }
        else if (newPosition < oldPosition)
        {
            session.timerMinutes -= 5;
        }
        if (session.timerMinutes < 0)
        {
            session.timerMinutes = 60;
        }
        else if (session.timerMinutes > 60)
        {
            session.timerMinutes = 0;
        }
        Serial.print("Encoder Detent: ");
        Serial.print(newPosition);
        Serial.print(" | Timer Set For: ");
        Serial.print(session.timerMinutes);
        Serial.println(" Minutes");


        oldPosition = newPosition;
    }
}
void drawSelectionBar()
{
    animation.timerMinutesconvert = session.timerMinutes;
    animation.rawProgressBar =
        animation.timerMinutesconvert * animation.scaleFactor;
    animation.countdownBarWidth = (int)animation.rawProgressBar;


    if (animation.countdownBarWidth > 312)
        animation.countdownBarWidth = 312;
    if (animation.countdownBarWidth < 0)
        animation.countdownBarWidth = 0;


    tft.fillRoundRect(4, 127, animation.countdownBarWidth, 22, 14, ST77XX_BLUE);


    int remainingWidth = 312 - animation.countdownBarWidth;
    if (remainingWidth > 0)
    {
        tft.fillRect(4 + animation.countdownBarWidth, 127, remainingWidth, 22,
                     ST77XX_BLACK);
    }
}
void drawCountdownBar(DateTime timerEnd, uint16_t totalMinutes)
{
    DateTime now = rtc.now();


    int32_t endSeconds = static_cast<int32_t>(timerEnd.unixtime());


    int32_t nowSeconds = static_cast<int32_t>(now.unixtime());


    int32_t secondsRemaining = endSeconds - nowSeconds;


    uint32_t totalSeconds = static_cast<uint32_t>(totalMinutes) * 60UL;


    // Prevent division by zero
    if (totalSeconds == 0)
        totalSeconds = 1;


    // Once the timer expires, show zero remaining
    if (secondsRemaining < 0)
        secondsRemaining = 0;


    float fractionRemaining =
        static_cast<float>(secondsRemaining) / static_cast<float>(totalSeconds);


    if (fractionRemaining > 1.0f)
        fractionRemaining = 1.0f;


    animation.countdownBarWidth = static_cast<int>(fractionRemaining * 312.0f);


    if (fractionRemaining >= 0.66f)
        animation.countdownBarColor = ST77XX_GREEN;
    else if (fractionRemaining >= 0.33f)
        animation.countdownBarColor = ST77XX_YELLOW;
    else
        animation.countdownBarColor = ST77XX_RED;


    tft.fillRoundRect(4, 127, animation.countdownBarWidth, 22, 14,
                      animation.countdownBarColor);


    animation.remainingWidth = 312 - animation.countdownBarWidth;
    Serial.print("animation.RemainingWidth is ");
    Serial.print(animation.remainingWidth);
    Serial.print("  ");
    Serial.print("animation.countdownBarWidth is ");
    Serial.println(animation.countdownBarWidth);
    if (animation.remainingWidth > 0)
    {
        tft.fillRect(4 + animation.countdownBarWidth, 127,
                     animation.remainingWidth, 22, ST77XX_BLACK);
    }
}


void updateDisplay(DateTime dt, unsigned long currentTime, double tomCurrent)
{
    tft.setCursor(0, 0);
    tft.print(Months[dt.month() - 1]);
    tft.print(" ");
    if (dt.day() < 10)
        tft.print("0");
    tft.print(dt.day());
    tft.print(" ");
    tft.print(dt.year());


    if (currentTime - timer.prevTime >= timer.interval)
    {
        timer.prevTime = currentTime;


        tft.setCursor(0, 45);
        // Format: HH:MM:SS
        if (dt.twelveHour() < 10)
            tft.print("0");
        tft.print(dt.twelveHour());
        tft.print(":");
        if (dt.minute() < 10)
            tft.print("0");
        tft.print(dt.minute());
        tft.print(":");
        if (dt.second() < 10)
            tft.print("0");
        tft.print(dt.second());
        tft.print(dt.isPM() ? " PM" : " AM");
    }


    tft.setCursor(0, 80);
    tft.println(stateLabels[tomato.current]);
    tft.println();
}
void stateMachine()
{
    // TODO create and impliment Long Breaks


    if (tomato.current == STATE_WAITING)
    {
        unsigned long pauseTime = millis();
        if (digitalRead(Pins::PAUSE_BTN) == LOW &&
            (pauseTime - tomato.pauseBtnPressed > tomato.pauseBtnDebounce))
        {
            tomato.pauseBtnPressed = pauseTime;
            Serial.println("Timer Resuming....");
            if (tomato.previousState == STATE_WORKING)
            {
                tomato.current = STATE_BREAK;
                setTimer(2, session.breakMinutes);
            }
            if (tomato.previousState == STATE_BREAK)
            {
                tomato.current = STATE_WORKING;
                setTimer(1, session.timerMinutes);
            }
        }
        return;
    }
    if (tomato.current == STATE_WORKING)
    {
        if (hasAlarmFired(1) && animation.countdownBarWidth == 0)
        {
            rtc.clearAlarm(1);
            // TODO add function to display a picture when the timer is up
            // TODO add sound or buzzer when timer is up
            tomato.previousState = tomato.current;
            tomato.sessionCounter++;
            Serial.println(String("sessionCounter is at ") +
                           tomato.sessionCounter);
            if (tomato.sessionCounter >= session.beforeLongBreak)
            {
                // digitalWrite(Pins::RED_LED, HIGH);
                Serial.print("The Session Counter is at ");
                Serial.println(tomato.sessionCounter);
                tomato.sessionCounter = 0;
                tomato.current = STATE_IDLE;
                animation.setDuration = false;
            }
            else
            {
                tomato.current = STATE_WAITING;
            }
        }
    }
    else if (tomato.current == STATE_BREAK)
    {
        if (hasAlarmFired(2) && animation.countdownBarWidth == 0)
        {
            tomato.previousState = tomato.current;
            rtc.clearAlarm(2);
            tomato.current = STATE_WAITING;
        }
    }
}


void setTimer(int alarmNumber, double timerDuration)
{
    uint32_t durationSeconds = static_cast<uint32_t>(timerDuration * 60.0);
    DateTime targetTime = rtc.now() + TimeSpan(durationSeconds);
    timer.endTime = targetTime;
    if (alarmNumber == 1)
    {
        rtc.setAlarm1(targetTime, DS3231_A1_Hour);
    }
    else
    {
        rtc.setAlarm2(targetTime, DS3231_A2_Hour);
    }
}
void setBreakTime(double workSession)
{
    session.breakMinutes = (workSession <= 30) ? 3 : session.breakMinutes;
    session.breakMinutes =
        (workSession > 30 && workSession < 45) ? 5 : session.breakMinutes;
    session.breakMinutes = (workSession >= 45) ? 10 : session.breakMinutes;


    session.beforeLongBreak = (workSession <= 30) ? 4 : session.beforeLongBreak;
    session.beforeLongBreak =
        (workSession > 30 && workSession < 45) ? 3 : session.beforeLongBreak;
    session.beforeLongBreak = (workSession >= 45) ? 2 : session.beforeLongBreak;


    Serial.println(String("Break Time is ") + session.breakMinutes);
    Serial.println(String("Number of work sessions befor long break is ") +
                   session.beforeLongBreak);
}


bool hasAlarmFired(int alarmNumber) { return rtc.alarmFired(alarmNumber); }

This is the code for the test program that I have been able to working on the screen:

#include <Adafruit_GFX.h>
#include <Adafruit_ST7789.h>
#include <SPI.h>

constexpr uint8_t TFT_CS = 5;
constexpr uint8_t TFT_DC = 17;
constexpr uint8_t TFT_RST = 16;
constexpr uint8_t TFT_SCLK = 18;
constexpr uint8_t TFT_MISO = 19;
constexpr uint8_t TFT_MOSI = 23;

Adafruit_ST7789 tft(TFT_CS, TFT_DC, TFT_RST);

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

    SPI.begin(TFT_SCLK, TFT_MISO, TFT_MOSI, TFT_CS);

    // Change this to match your actual panel.
    tft.init(170, 320);

    tft.setRotation(0);
    tft.fillScreen(ST77XX_RED);
    delay(1000);

    tft.fillScreen(ST77XX_GREEN);
    delay(1000);

    tft.fillScreen(ST77XX_BLUE);
}

void loop() {}

I know about the ESP32 pin multiplexing, is there something I need to do for setting the pins for i2c communication.


r/arduino • • Sep 23 '26

Hardware Help GRBL CNC Shield Z-limit switch always showing active (Pn:Z) — even after swapping switch/port

2 Upvotes

Hi everyone,
I'm having an issue with the Z-limit switch on an Arduino + CNC Shield running GRBL.
GRBL is reporting the Z-limit input as permanently active (Pn:Z), even when the physical Z-limit switch is not pressed. Even pressing the switch does nothing. I have all of the switch’s set up as NC.

What I've tested
The physical limit switch works correctly on the Y-limit input. I moved that same known-working switch from the Y port to the Z port, but the Z input still appears permanently active. This makes me think the problem isn't the physical switch.

I also have a 2nd Cnc shield and arduino and it has the exact same issue.

Helppp please thanks


r/arduino • • Sep 23 '26

Guys whats wrong with my sim800l??

1 Upvotes

My sim800l is connected to a network its blinking with 3s interval and but it doesn't make call no reply to AT commands......what should i do noww and 2g service are available btw

Please guys i need your help so please skip this if you dont know abt it just give a upvote so it wull suggest to other people pls🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻


r/arduino • • Sep 22 '26

Look what I made! I built an ESP32-C3 board that prints my GitHub week on a thermal receipt, powered entirely from one USB-C plug

Thumbnail
gallery
3 Upvotes

The goal was an object with no screen and no button that just hands me a summary of my GitHub week : stars, followers, a 7-day commit histogram, top languages and repos on a 58 mm thermal receipt, once a week. Hardware is a 4-layer KiCad board (33.55 × 50.05 mm) around an ESP32-C3-MINI-1:

  • AP33772S USB-PD sink negotiates 9 V @ 2 A and switches it to both the print head and an AP63203 buck that makes the 3.3 V rail
  • PCA9306 translates I²C between the C3's 3.3 V and the AP33772S's internal 5 V
  • The C3's native USB goes straight to the connector, so the same cable does PD, flashing and the serial console

Three firmware bits that took the most work:

  1. The PNG decoder. There's ~70 KB of free heap during a job, so the image is decoded as a stream: IDAT chunks copied out, original buffer freed, inflate in 512-byte chunks, PNG filters reconstructed row by row, and 32-line strips pushed to the printer as they're completed.
  2. Failing without wasting paper. The MCU is powered downstream of the PD switch, so a brownout takes it down mid-print and when the retry backoff lived in RAM, the board came back, reprinted, browned out again, and fed out paper on every cycle. Backoff and last-printed slot now live in NVS.
  3. Power and console share the connector, so printing and watching are mutually exclusive. Every attempt writes a report to flash that's dumped on the next boot, next to the reset reason. It showed a full TLS print job uses ~5 KB of stack; I had allocated 64 KB.

Firmware is PlatformIO/Arduino on ESP-IDF, everything (KiCad, firmware, the Ruby service that renders the ticket, FreeCAD enclosure) is MIT: https://github.com/albanpetit/paperflux

Full write-up with schematics and the reasoning behind each block: https://albanpetit.com/post/paperflux/


r/arduino • • Sep 22 '26

Hardware Help Is this even possible? SD40 on CYD - ESP32

1 Upvotes

I have tried over 15 combos of wiring, and 30 scripts. Is this even possible? I can't get the esp to actually get a reading from the SCD30.

I have also tried running the SCD from separate 3.3v and 5v power sources, even with a shared esp/scd40 ground.

I just want to know if it's even possible... I'm not very good at this so it might be an obvious thing to you guys.

I'm currently trying, from the SCD40 sensor:
GND = GND from separate 3.3v power source, also tied to esp ground
VDD - 3.3v from separate power supply
SCL - IO23 on board (MOSI)
SDA - IO27 on board (CS)

Here's my exact hardware:

CYD - E32R28T 0 https://wiki.elegoo.com/oshw-parts-&-accessories/esp32-dispaly-introduction

SCD40 Sensor (with pull ups) - https://www.amazon.ca/Low-Power-Temperature-Detection-Battery-Powered-Monitoring/dp/B0H923TMXQ/ref=sr_1_2_sspa?crid=29ECIPH74Q3P3&dib=eyJ2IjoiMSJ9.zMj2Bx--ZUKhI_r5RENsmzTD2j_uhCvtbQ3xo_yzr5Kk4rLj4yb5WkSZh2jDZpkJ1MCPOYvlDdIRqj1iGYXs77p6uvSnGc5opMupw1IxplHruJ1RQdrYbBhm9Dd7Pn5WxftclFvXmnnjP0hkZrMD6UN9QO0oAqyl-KUycEV7PP8oO6EsqzV7dl4-tXB7ZALX1IFvzrZWERe8F2v1RCZKNSw2Vp0jtNJHwp_tTvhVgmYKOCSuzqOiWKQnP91zu_jidogRAUwr3snlKDReo5mGo8cMJ0AfsGQRY1cQqH8qZGY.8qMpRg10yV4f4xCJ6Cco9whE0-eqd_kC1W4Ha0334AE&dib_tag=se&keywords=scd40&qid=1790119151&sprefix=scd40%2Caps%2C114&sr=8-2-spons&sp_csd=d2lkZ2V0TmFtZT1zcF9hdGY&psc=1

Let me know if you need more info. I just keep getting SCD40 didn't respond from the esp, can't get a reading from it in any config. Continuity is all good and voltage is all good reading 3.3v on all VDD/SCL/SDA on the sensor.


r/arduino • • Sep 22 '26

Look what I made! My first ever Arduino project.

3 Upvotes

Any ideas on what I could build with this next?


r/arduino • • Sep 21 '26

Look what I made! Onewheel + WS2812 + ESP8266

161 Upvotes

Making my Onewheel more colorful with WS2812 and esp8266 :D Controlled via web interface but I’m considering switching to esp32 to add Bluetooth since the Onewheel board also communicates via BT. In the final version the electronics will be attached to the bottom of the front footpad.


r/arduino • • Sep 21 '26

Look what I found! My first ever project. (2023)

Post image
85 Upvotes

It was fun back then to make a project for experience.


r/arduino • • Sep 22 '26

Hardware Help Help with automated watering system

2 Upvotes

I think many of you already have tried out in some kind of form to develop an automated plant watering system and can help me understanding the following problem.

I use three different sensors (powered by the microcontroller): dht11 for temperature and RH, hc-sr04 for meausuring of the water level and hw-080 for soil moisture. For the water pump I use a DC Motor for 3V, which is being powered by an external source with the help of a relais.

Now there comes my problem. When I compile my code with the external supply source on, then the upload falls. As a "fixture" I keep the external off while compiling the code. Afterwards I turn the supply on and everything works perfectly.

Dou you have any explanation for this behavior? I suspect, it has to be related with the induced voltage from the motor. Maybe is something else. Im thankful for every tip and/or explanation linked to this phenomena.


r/arduino • • Sep 21 '26

Using the ESP32-P4 together with the ESP32-C5 as our coprocessor

26 Upvotes

NFC reader. Tap a tag and see UID, type and data instantly. Native ST25R3916 chip, no external module.
Tested on my own cards know what your stuff is actually storing.


r/arduino • • Sep 21 '26

Look what I made! Syntesizer

40 Upvotes

I've made this before, built it again because it's 9:00pm and I have no ideas to built anything new.


r/arduino • • Sep 20 '26 Heartwarming Bravo

Look what I made! My Nixie inspired LCD clock

2.1k Upvotes

A while back I decided I wanted to try and build a Nixie clock. I have seen them being popular for a long time and I really liked the look. While looking more into different clocks and tubes I found the fake Nixie clocks using an IPS display instead of the real tubes. I kind of liked that idea that you could use the clock to show more than just the time. But I didn’t find any particular one that I thought looked nice enough.

So I decided to look into how I could make my own Nixie inspired LCD clock. I spent quite some time thinking about how to imitate a real tube closely. I decided to make a real grid instead of just pasting it on the image displayed. Each tube has a small round interface PCB in the base. It connects the LCD assembly to the main PCB and carries the power and display control signals.

The clock is controlled by an ESP32-S3 and the displays are ST7789 IPS LCDs using the TFT_eSPI Arduino library. All the existing LCD nixie clocks I found uses a quite small display 1-1.4". I wanted to have bigger numbers so I chose a 1.9" display.

The five displays share the same SPI bus and are selected individually using their CS pins.

I use an INMP441 microphone module to capture the audio for the EQ, and have a MAX98357 amplifier module to drive a speaker (for future use)

There is a wifi configuration page where you set wifi credentials and location that is used for time zone and weather info. The weather data comes from OpenWeather.

If you run a script on your PC on the same network you can get PC stats data displayed.

I designed the clock with physical switches to try and make it feel more retro for selecting different display modes.


r/arduino • • Sep 21 '26

Software Help Looking for a library that works with this thermal printer.

Thumbnail
gallery
0 Upvotes

I can write basic info through serial commands, but I can't change anything else about the font or formatting. The adafruit thermal printer library isn't compatible either.

The top is from the adafruit example print test.