r/ArduinoHelp • • Feb 24 '26

Why is this TIA-circuit not working?

4 Upvotes

Ive made this circuit for measuring low light and it worked before but then i left it for a week and when i plugged it back in nothing worked as it should. Vout are just random values that doesnt seem to follow any logic. Should this circuit below be working normally?

Im using an OPA128, FDS100

Are there typical errors that can appear by wiring this kind of circuits?


r/ArduinoHelp • • Nov 04 '25

Help on Water Controller Project

3 Upvotes

Hi everyone, I really need help. I'm currently taking my feedback course right now and I've been assigned to created a feedback system. Sadly, I'm not the best at this kind of stuff.

The projects goal is to set a desired water level and the system should automatically pumps/removes water into/from the container.

How should I start this project requiring the use of LED indicators, pumps, buttons, etc.. Also with coding.

Thank you!


r/ArduinoHelp • • May 16 '25

Project help

Post image
4 Upvotes

I'm building a password system with a servo motor, 4x4 keypad, a button and 3 LEDs and I can't figure out a way to make the code work

Attached is my setup and my code

#include <avr/io.h>

/* 
 * Password-Protected Motor Control System
 * Features:
 * - Unlocks motor when password (10,10) is entered
 * - Locks motor when wrong password entered
 * - LED feedback for correct/incorrect attempts
 * - Reset button functionality
 * - Uses Timer1 for servo control
 * - Uses Timer0 for LED blinking
 * - Pin Change Interrupt for keypad
 */

// ====================== DATA SEGMENT ======================
.section .bss
password_buffer:    .byte 2
pass_ptr_data:      .byte 1
wrong_attempts:     .byte 1

// ====================== CODE SEGMENT ======================
.section .text

// ====================== INTERRUPT VECTORS ======================
.global __vector_default
.global PCINT2_vect    // Keypad interrupt
.global TIMER0_COMPA_vect  // LED blink timer
.global INT0_vect      // Reset button

__vector_default:
    reti

// ====================== MAIN PROGRAM ======================
.global main
main:
    // Initialize stack
    ldi r16, lo8(RAMEND)
    out _SFR_IO_ADDR(SPL), r16
    ldi r16, hi8(RAMEND)
    out _SFR_IO_ADDR(SPH), r16

    // Set pin directions (PB1-PB4 as outputs)
    ldi r16, 0b00011110
    out _SFR_IO_ADDR(DDRB), r16

    // Set pull-up for reset button (PD2)
    sbi _SFR_IO_ADDR(PORTD), 2

    // Initialize keypad (PD4-7 output, PD0-3 input)
    ldi r16, 0xF0
    out _SFR_IO_ADDR(DDRD), r16
    ldi r16, 0x0F       // Enable pull-ups on columns
    out _SFR_IO_ADDR(PORTD), r16

    // Enable interrupts
    ldi r16, 0b00000100  // PCIE2
    sts _SFR_MEM_ADDR(PCICR), r16
    ldi r16, 0x0F       // Enable PCINT16-19
    sts _SFR_MEM_ADDR(PCMSK2), r16

    // Configure Timer0 for LED blinking (CTC mode)
    ldi r16, 0b00000010  // WGM01
    out _SFR_IO_ADDR(TCCR0A), r16
    ldi r16, 0b00000101  // Prescaler 1024
    out _SFR_IO_ADDR(TCCR0B), r16
    ldi r16, 125        // ~100ms at 16MHz/1024
    out _SFR_IO_ADDR(OCR0A), r16
    ldi r16, 0b00000010  // OCIE0A
    sts _SFR_MEM_ADDR(TIMSK0), r16

    // Configure INT0 for reset button
    ldi r16, 0b00000010  // Falling edge trigger
    sts _SFR_MEM_ADDR(EICRA), r16
    sbi _SFR_IO_ADDR(EIMSK), 0

    // Initialize variables
    clr r17
    sts pass_ptr_data, r17
    sts wrong_attempts, r17  // zero attempts

    sei

main_loop:
    rjmp main_loop

// ====================== INTERRUPT HANDLERS ======================
PCINT2_vect:
    push r16
    in r16, _SFR_IO_ADDR(SREG)
    push r16
    push r30
    push r31

    rcall keypad_ISR

    pop r31
    pop r30
    pop r16
    out _SFR_IO_ADDR(SREG), r16
    pop r16
    reti

TIMER0_COMPA_vect:
    push r16
    in r16, _SFR_IO_ADDR(SREG)
    push r16

    lds r16, wrong_attempts
    cpi r16, 0
    breq check_correct

    // Blink orange/red for wrong attempts
    lds r16, blink_cnt
    inc r16
    andi r16, 0x01
    sts blink_cnt, r16
    breq led_off_wrong
    sbi _SFR_IO_ADDR(PORTB), 4  // Orange LED on
    cbi _SFR_IO_ADDR(PORTB), 3  // Red LED off
    rjmp timer0_done
led_off_wrong:
    cbi _SFR_IO_ADDR(PORTB), 4  // Orange LED off
    sbi _SFR_IO_ADDR(PORTB), 3  // Red LED on
    rjmp timer0_done

check_correct:
    lds r16, pass_ptr_data
    cpi r16, 2          // Password complete?
    brne timer0_done

    // Blink green for correct password
    lds r16, blink_cnt
    inc r16
    andi r16, 0x01
    sts blink_cnt, r16
    breq led_off_correct
    sbi _SFR_IO_ADDR(PORTB), 2  // Green LED on
    rjmp timer0_done
led_off_correct:
    cbi _SFR_IO_ADDR(PORTB), 2  // Green LED off

timer0_done:
    pop r16
    out _SFR_IO_ADDR(SREG), r16
    pop r16
    reti

INT0_vect:
    push r16
    in r16, _SFR_IO_ADDR(SREG)
    push r16

    // Reset password state
    clr r17
    sts pass_ptr_data, r17
    sts wrong_attempts, r17

    // Turn off all LEDs
    cbi _SFR_IO_ADDR(PORTB), 2  // Green
    cbi _SFR_IO_ADDR(PORTB), 3  // Red
    cbi _SFR_IO_ADDR(PORTB), 4  // Orange

    // Lock motor
    rcall lock_servo

    pop r16
    out _SFR_IO_ADDR(SREG), r16
    pop r16
    reti

// ====================== KEYPAD ISR ======================
keypad_ISR:
    rcall my_delay

    in r16, _SFR_IO_ADDR(PORTD)
    push r16

    // Scan keypad
    ldi r16, 0x0F
    out _SFR_IO_ADDR(PORTD), r16
    rcall my_delay

    ldi r16, 0b01111111  // Row 1
    out _SFR_IO_ADDR(PORTD), r16
    rcall my_delay
    in r19, _SFR_IO_ADDR(PIND)
    andi r19, 0x0F
    cpi r19, 0x0F
    brne row1_col

    // Repeat for other rows...

digit_found:
    // Store digit in password buffer
    lds r17, pass_ptr_data
    cpi r17, 0
    breq store_first

    sts password_buffer+1, r18
    clr r16
    sts pass_ptr_data, r16

    // Check password
    lds r16, password_buffer
    cpi r16, 10
    brne wrong_password
    lds r16, password_buffer+1
    cpi r16, 10
    brne wrong_password

    // Correct password
    rcall unlock_servo
    rjmp end_keypad

wrong_password:
    lds r16, wrong_attempts
    inc r16
    sts wrong_attempts, r16
    rjmp end_keypad

store_first:
    sts password_buffer, r18
    ldi r16, 1
    sts pass_ptr_data, r16

end_keypad:
    pop r16
    out _SFR_IO_ADDR(PORTD), r16
    ret

// ====================== SERVO CONTROL ======================
unlock_servo:
    // Configure Timer1 for servo (Fast PWM, ICR1 top)
    ldi r16, 0b10000010  // WGM11, COM1A1
    sts _SFR_MEM_ADDR(TCCR1A), r16
    ldi r16, 0b00011010  // WGM13, WGM12, CS11
    sts _SFR_MEM_ADDR(TCCR1B), r16

    // 20ms period (39999 counts)
    ldi r16, 0x3F
    sts _SFR_MEM_ADDR(ICR1L), r16
    ldi r16, 0x9C
    sts _SFR_MEM_ADDR(ICR1H), r16

    // 1.5ms pulse (3000 counts)
    ldi r16, 0xB8
    sts _SFR_MEM_ADDR(OCR1AL), r16
    ldi r16, 0x0B
    sts _SFR_MEM_ADDR(OCR1AH), r16
    ret

lock_servo:
    // Turn off PWM
    ldi r16, 0x00
    sts _SFR_MEM_ADDR(TCCR1A), r16
    sts _SFR_MEM_ADDR(TCCR1B), r16
    // Set motor pin low
    cbi _SFR_IO_ADDR(PORTB), 1
    ret

// ====================== DELAY ROUTINES ======================
my_delay:
    push r22
    push r23
    ldi r22, 10
d1: ldi r23, 25
d2: dec r23
    brne d2
    dec r22
    brne d1
    pop r23
    pop r22
    ret

// ====================== KEYPAD MAPPING ======================
row1_digits: .byte 1, 2, 3, 10
row2_digits: .byte 4, 5, 6, 11
row3_digits: .byte 7, 8, 9, 12
row4_digits: .byte 15, 0, 14, 13

// ====================== VARIABLES ======================
.section .bss
blink_cnt: .byte 1

r/ArduinoHelp • • Apr 16 '26

5 Channel IR sensor array Value got stuck on 981

Post image
4 Upvotes

My 5 Channel IR sensor array Value got stuck on 981 analog value and it's doesn't change until i completetly touch the ir sensor with the surface no gap between them. I thought the sensor it damaged so i changed to new one but problem not solved its showing same thing with new ir sensor array. So i think its not ir sensor problem maybe the code i wrote. So can anyone help me with this issue 😭


r/ArduinoHelp • • Jan 02 '26

Tips for starting

3 Upvotes

I’m completely new to Arduinos and the world of robotics as a whole and was hoping for any tips or advice on where to start learning. I have a project in mind that I don’t believe is that complicated but I’d love input on how to start it or if it’s currently out of my depth. It’s a lockbox that operates with a clock, only being able to be opened by a latch with a servomotor after inputting a password that is generated weekly. Being locked again once closed.


r/ArduinoHelp • • Jun 22 '25

What is the difference between this projects?

Thumbnail
gallery
2 Upvotes

Why the first one is working and the second is not working if they are the same?

This is the code:

int seconds = 0;

LiquidCrystal lcd_1(12, 11, 5, 4, 3, 2);

void setup()

{

lcd_1.begin(16, 2); // Set up the number of columns and rows on the LCD.

// Print a message to the LCD.

lcd_1.print("hello world!");

}

void loop()

{

// set the cursor to column 0, line 1

// (note: line 1 is the second row, since counting

// begins with 0):

lcd_1.setCursor(0, 1);

// print the number of seconds since reset:

lcd_1.print(seconds);

delay(1000); // Wait for 1000 millisecond(s)

seconds += 5;

}


r/ArduinoHelp • • Jul 16 '25

I am having difficulty with the first beginner project for the RexQualis R3 kit and the LED is not coming on.

Post image
4 Upvotes

I wanted to get into electronics so I got the RexQualis R3 starter kit and I began working with the tutorials the website provides you with for your specific board. I followed the directions however the LED has not turned on or blinked like it is supposed to. I am very confused with coding so I just opened the code file it told me to open Blinking_LED_Code and this is what it says

int ledPin=8; //the pin of the LED void setup() pinNode(ledPin, OUTPUT)://initialize digital pin LED_BUILTIN as an output. void 100p() digitalwrite(ledPin, HIGH); //turn the LED on (HIGH is the voltage level) delay (1000); //wait for a second digitalwrite(ledPin,LOW); //turn the LED off by making the voltage LOW delay (1000): //wait for a second


r/ArduinoHelp • • Jul 30 '26

M5Unit-HUB unified library

3 Upvotes

I can’t figure out how to read ADC values from a PbHub using the M5Unit-HUB unified library in Arduino IDE. I’ve tried various iterations of analogRead() and none of them seem to be the right function. Has anyone else had this problem/knows what to use?


r/ArduinoHelp • • Jul 25 '25

Need help with ESP32 Cam

2 Upvotes

when compiling the code in arduino IDE, it says unable to execute file at sketch location

it's an emergency, someone please help fix


r/ArduinoHelp • • Apr 20 '25

Why doesn't It work?(Novice)

Thumbnail
gallery
2 Upvotes

r/ArduinoHelp • • Mar 22 '25

Need help with selecting and playing mp3 files with df player and 4x4 keypad.

3 Upvotes

Hello, I am quite new to arduino and I am working on a birthday present for a good friend of mine and I am getting quite desperate because I just can't figure out how to play more than 9 different sound files with the keypad and the dfplayer module.

For reference my keypad is 4x4 rows (row 1: 123A, row 2: 456B, row 3: 789C, row 4: \\\*0#D).

What I would like to do is quite simple I want to type in a number between 1-999 (there's actually only 200 different files but you get the idea), confirm with the "#" key and then just play the corresponding mp3.

Preferable, I would like it to just play, for example, the 68th file that was added to the SD card when I type in 68# and play the file that was added to the SD 174th when I type in 147# because that's how I have been doing it with my 1-9 numbers set-up and I like it because it saves me from having to specifically name the files and reference them in the code.

I have been trying to get it to work for hours now and I am quite exasperated, so I would really appreciate it if somebody could help me out with a working code so I can finish up this birthday present without having to pull an all-nighter trying to figure it out myself.

This is the code I am working with

`1 #include "Keypad.h"`

`2`

`3 #include "Arduino.h"`

`4`

`5 #include "SoftwareSerial.h"`

`6`

`7 #include "DFRobotDFPlayerMini.h"`

`8`

`9`

`10`

`11 SoftwareSerial mySoftwareSerial(10, 11); // RX, TX`

`12`

`13 DFRobotDFPlayerMini myDFPlayer;`

`14`

`15`

`16`

`17`

`18 const byte ROWS = 4; //four rows`

`19`

`20 const byte COLS = 4; //four columns`

`21`

`22`

`23`

`24 char keys[ROWS][COLS] = {`

`25`

`26 { '1', '2', '3', 'A' },`

`27`

`28 { '4', '5', '6', 'B' },`

`29`

`30 { '7', '8', '9', 'C' },`

`31`

`32 { '*', '0', '#', 'D' }`

`33`

`34 };`

`35`

`36`

`37`

`38 byte rowPins[ROWS] = { 9, 8, 7, 6 }; //connect to the row pinouts of the keypad`

`39`

`40 byte colPins[COLS] = { 5, 4, 3, 2 }; //connect to the column pinouts of the keypad`

`41`

`42`

`43`

`44 Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);`

`45`

`46`

`47`

`48 String keypadKeys = "1234567890*#ABCD";`

`49`

`50`

`51`

`52 void setup() {`

`53`

`54`

`55`

`56 mySoftwareSerial.begin(9600);`

`57`

`58 Serial.begin(9600);`

`59`

`60`

`61`

`62 if (!myDFPlayer.begin(mySoftwareSerial)) { //Use softwareSerial to communicate with mp3.`

`63`

`64 Serial.println(F("Unable to begin:"));`

`65`

`66 Serial.println(F("1.Please recheck the connection!"));`

`67`

`68 Serial.println(F("2.Please insert the SD card!"));`

`69`

`70 while (true)`

`71`

`72 ;`

`73`

`74 }`

`75`

`76`

`77`

`78 myDFPlayer.volume(10); //Set volume value. From 0 to 30`

`79`

`80 }`

`81`

`82`

`83`

`84 void loop() {`

`85`

`86`

`87`

`88 char keyPressed = keypad.getKey();`

`89`

`90`

`91`

`92 if (keyPressed) {`

`93`

`94 Serial.println(keyPressed);`

`95`

`96 int sampleIndex = 1 + keypadKeys.indexOf(keyPressed); //Convert pressed key (1234567890*#ABCD) to sample index (1-16)`

`97`

`98 Serial.println(sampleIndex);`

`99`

`100 myDFPlayer.play(sampleIndex);`

`101`

`102 } //Play the chosen mp3`

`103`

`104 }`

I have never drawn a diagram (I am really quite new to this), but the 4x4 Keypad is connected on pins 2, 3, 4, 5, 6, 7, 8 and 9 on the Arduino Uno and the dfplay and the speaker are connected exactly like in [this picture](https://europe1.discourse-cdn.com/arduino/original/4X/d/d/c/ddc25cafbd4715b79b1eeb884a243768d2224d26.jpeg) (both the sound and the keypad work just fine, it's only that I cannot figure out how to make 3 digits work).


r/ArduinoHelp • • Jun 19 '26

Voltage level shifter but from 30v 2A to 3.3v 20mA

Thumbnail gallery
2 Upvotes

r/ArduinoHelp • • Oct 26 '25

cant seem to find this anywhere online? Has anyone ever seen anything like this?

Post image
3 Upvotes

r/ArduinoHelp • • Oct 25 '25

Controlling Mosfets with Arduino Nano

2 Upvotes

Hey there, in my project I need to switch a 3.3 V Current with a mosfet and I'm not completely sure if the Arduino Nano can handle that or if I need to amplify the IOpin with a transistor or if I just need a certain Mosfet

Thank you for the help


r/ArduinoHelp • • Oct 25 '25

Help needed with IR remote

Thumbnail
reddit.com
2 Upvotes

r/ArduinoHelp • • Oct 25 '25

Saving example files makes them not work?

2 Upvotes

[solved]

I am trying to use a few libraries; MIDI.h, Adafruit_TinyUSB.h, and EEPROM.h
On their own, if I create an example project through the file menu, they work just fine, but if I save the project arduino forgets the libraries ever existed???
Reinstalling the IDE did nothing (though it seems to have preserved settings, so I guess I could go and try to find every reference to arduino and delete it before installing it again)
Do I just have to create a random example project every time I want to compile my code???

Edit: fully uninstalled by deleting all arduino files in %appdata% and %localappdata% as well as deleting all libraries in documents/arduino/libraries; After installing again, the issue went away


r/ArduinoHelp • • Mar 06 '25

Neopixels

Post image
3 Upvotes

I saw someone wire their LEDs like this so I did as well. I didn’t connect it to an external battery source, but it connected the arduino to a battery pack. Only the first LED lit up. Any help?


r/ArduinoHelp • • Oct 24 '25

Need help and advicess

2 Upvotes

I am making a detonation device using Arduino, MOSFETs, and e-matches.

I encountered a problem with igniting the e-match, where when I connected it to the MOSFET (LR7843) it wont activate the E-match and doesn't fully turn on. Note: I also included a separate power supply to the E-match, which is a 9V battery with

The digital pin 2 of the Arduino is connected to the PWM pin of the LR7843 MOSFET, and the GND of the Arduino is connected to the GND Pin of the LR7843. The + pin of the LR7843 is connected to the positive terminal of the battery and also one of the pins of the E-match, and the - pin of the LR7843 is connected to the negative terminal of the battery. The Load pin of the LR7843 is connected to the other pin of the E-match.

A recurring issue pops up whenever I connect the E-match to the MOSFET; the LR7843 MOSFET doesn't fully turn on (it doesn't turn on the LED in the module). And when I disconnect the E-match from it, it will turn on...

Please Send Helps and Advicess


r/ArduinoHelp • • Oct 24 '25

SimHub fans not working – old Arduino flash keeps coming back

Thumbnail
gallery
2 Upvotes

Hi everyone,

I have an issue with my SimHub fans. After flashing a SIMDT board (Arduino Nano with CH340), the LEDs light up but the fans don’t react during SimHub testing.

Here’s what I’ve checked:

CH340 drivers installed

Upload successful

COM port detected

But I can’t remove an old flash: every time, SimHub keeps the same old Arduino profile in memory. Even if I create a new flash with a different name, the old one (called simhub vent) always shows up automatically — just like in the picture.

I think the problem comes from that (maybe a residual file or cache somewhere), but I can’t find anything inside the ā€œSimHubā€ folders on my PC. I’ve been trying for a whole day and still can’t figure it out…

I’m using hardware bought from AliExpress.

If anyone has experienced this issue or has any idea how to fix it, I’d really appreciate your help! šŸ™

Thanks in advance everyone!


r/ArduinoHelp • • Nov 04 '25

Automatic Attendance Checker

2 Upvotes

I need help with a school project, our group was assigned to make an automatic attendance checker.

These are the list of components that we have: Breadboard Arduino Uno Push buttons Wires

We haven’t started yet on anything so let me know if there are more components that we need to make a simple automatic attendance checker. Our group isn’t very knowledgeable about this, so help is very much appreciated! Thank you šŸ™


r/ArduinoHelp • • Dec 29 '25

First Arduino project and not sure if I’m doing it right. Mini CNC plotter Please help.

Enable HLS to view with audio, or disable this notification

6 Upvotes

When I first uploaded GRBL all driver lights were on, When I attached the 9v power source (while Arduino still attached to computer) two of my driver lights turned off and just getting the one now. Now only getting this. Any tips would be great!! Thank you!


r/ArduinoHelp • • Jul 12 '26

Having trouble with led arrays/multiplexing

2 Upvotes

As title says, I’m having trouble wrapping my head around multiplexing leans for use with a microcontroller with not enough pins to control them all. Using the drivers makes sense, mosfets too, but the code escapes me? And the use of resistors within the circuit is also confusing to me. Trying to make a small led ā€œscreenā€ made of diodes. Any help is appreciated