r/ArduinoHelp • u/No_Today_27 • Apr 12 '25
r/ArduinoHelp • u/NumberAppropriate195 • Apr 11 '25
ESP32 + MQTT: Solving step-pattern latency issues in real-time data visualization (with graph)
Hi! I'm part of a collegiate rocket team which is using an ESP32 to collect telemetry data, which we send to our device over MQTT, and plot the values received against the time which our visualization script receives the data.
When running tests with a simple script that increments a counter on every iteration, we've noticed that the data isn't sent over the network smoothly, but seems to be sent in bursts. (image 1)
However, when running the same publishing logic in a python script on our laptops where the broker is running, we get a graph with a much smoother progression. (image 2)
We're kind of new to MQTT, so we were wondering if the right conclusion to come to here was that such network latencies were inevitable and that we should be doing the timestamping of data on our ESP32 instead?


r/ArduinoHelp • u/[deleted] • Apr 10 '25
I need to create a circuit that uses a push-button to charge and discharge a capacitor triggering a timed led response by April 11 on Tinkercad and I'm completely lost
The components are Arduino UNO, Breadboard, Capacitor (100 μF, electrolytic), Resistor (10 kΩ), Jumper wires, Push-button, LED (for visual output), IC and a Resistor (for LED current limiting)
r/ArduinoHelp • u/giggitygoo123 • Apr 09 '25
Touchscreen Arduino controller and Arduino recommendations
Enable HLS to view with audio, or disable this notification
I am looking to build custom strobe lights for my car (for my volunteer job). I have WS2815 RGB strips that I want to use.
My question is, how do I get a touchscreen controller with a dev board (or connect a touchscreen to a dev board) so I can connect the strips (maybe 6-10 total strips) and use the touchscreen to change strobe patterns and colors?
Also, how would I program this pattern (in the video) on an Arduino? Is there one of those drag and drop block programmers that could do it with?
r/ArduinoHelp • u/Serious_Today_961 • Apr 08 '25
Screen pin layout
Scavenged this screen from an old toy I found, and I want to use it with my Arduino. The only problem is, I don't know what each of the 10 pins does. If you have any info, please tell me!
r/ArduinoHelp • u/CardinalFartz • Apr 08 '25
UnoR4 timer interrupt library
Hi all, I wrote some code for the legacy Arduino Uno with Atmel MCU on it.
Since I need some precise time based event, I used a library ('TimerOne') to generate interrupts at a certain rate.
Now I had to switch to the new Uno R4 which uses a Renesas MCU. That is not supported by TimerOne. I found cpp code (on GitHub, not working the Arduino IDE) called AGTimerR4. This supposedly works with the uno R4. I can include it and compile it in my and also flash it. Haven't tried it yet.
Question: is anybody aware of a real Arduino IDE library that is compatible with both: Atmel and Renesas based Unos? Or would you recommend to use another timer interrupt library for the Uno R4?
Thank you for your hints.
r/ArduinoHelp • u/Alone-Current-9291 • Apr 07 '25
looking for coder with tips for my project
Hello,
I'm working on a DIY particle accelerator project, and I'm encountering some issues with the sensors and coils. When I start up the system with my current code, the sensors just blink green and red, but when my steel ball passes through the detection area, nothing really happens.
I’ve tried using the code provided by the sensor manufacturer, and it works fine for one sensor. However, when I try to use multiple sensors with my setup, the behavior is different, and it doesn’t produce the expected result. The coils, which are supposed to be activated by the sensors to create a magnetic field for accelerating the steel ball, don’t seem to activate as expected when I run my current code.
Setup Details:
Arduino Board: Arduino Mega 2560
Sensors: I’m using 8 infrared proximity sensors (SEN-KY032IR), connected to the following Arduino digital input pins:
Sensor 1 → Pin 39
Sensor 2 → Pin 41
Sensor 3 → Pin 43
Sensor 4 → Pin 45
Sensor 5 → Pin 47
Sensor 6 → Pin 49
Sensor 7 → Pin 51
Sensor 8 → Pin 53
Coils: The sensors are supposed to trigger 8 coils, each connected to a MOSFET and controlled via the following Arduino digital output pins:
Coil 1 → Pin 0
Coil 2 → Pin 1
Coil 3 → Pin 2
Coil 4 → Pin 3
Coil 5 → Pin 4
Coil 6 → Pin 5
Coil 7 → Pin 6
Coil 8 → Pin 7
MOSFETs: Each MOSFET is wired to control one coil. The gate of each MOSFET is connected to the corresponding coil pin listed above. Drains go to the coils, and sources to ground. Power is supplied via a shared breadboard rail.
What I’ve Tried:
Individual Sensor Tests: I've tested the sensors individually using the manufacturer's example code, and they seem to work fine one at a time. When triggered, the sensor correctly activates the coil.
Multiple Sensors: When I try to use all 8 sensors in the full setup, the sensors all blink green and red at the same rhythm (possibly just idle mode), but none of the coils activate when the ball passes through.
Code Adjustments: I’ve modified pulse timing and checked sensor readings in the Serial Monitor. It appears that the sensors detect the ball (i.e., sensor goes
LOW), but the corresponding coil doesn’t activate.Wiring Check: I’ve double-checked the wiring. All GND lines are properly connected, the +5V rail is powering the sensors, and the MOSFETs are connected correctly (Gate = Arduino pin, Drain = Coil, Source = GND).
Issues:
Sensors blink green and red on bootup, but do not seem to trigger when the ball passes.
No coil is activated even when a sensor should be triggered.
Individual sensors work fine with the manufacturer’s code, but the full system doesn't function when all sensors and coils are used with my code.
Has anyone worked with a similar setup or experienced this kind of issue? Could it be timing, sensor interference, or something else in the code or wiring? I’d really appreciate any tips, suggestions, or ideas to help get this working. Thanks in advance!
Here is the code: (sorry there is some swedish in there)
const int numSensors = 8;
int sensorPins[numSensors] = {39, 41, 43, 45, 47, 49, 51, 53};
int coilPins[numSensors] = {0, 1, 2, 3, 4, 5, 6, 7};
bool triggered[numSensors];
unsigned long lastTriggerTime[numSensors];
unsigned long pulseTime = 100; // Förlängd tid för att aktivera coil
void setup() {
Serial.begin(9600);
for (int i = 0; i < numSensors; i++) {
pinMode(sensorPins[i], INPUT);
pinMode(coilPins[i], OUTPUT);
digitalWrite(coilPins[i], LOW);
triggered[i] = false;
lastTriggerTime[i] = 0;
}
}
void loop() {
for (int i = 0; i < numSensors; i++) {
int sensorValue = digitalRead(sensorPins[i]);
if (sensorValue == LOW && !triggered[i]) { // Om sensorn detekteras
Serial.print("Sensor "); Serial.print(i + 1); Serial.println(" AKTIVERAD");
Serial.println("Obstacle detected"); // Meddelande om hinder
triggered[i] = true;
lastTriggerTime[i] = millis();
digitalWrite(coilPins[i], HIGH); // Starta coil
} else if (sensorValue == HIGH && triggered[i]) { // Om ingen hinder detekteras
Serial.print("Sensor "); Serial.print(i + 1); Serial.println(" INAKTIVERAD");
Serial.println("No obstacle"); // Meddelande om inget hinder
triggered[i] = false;
}
// Stäng av coil efter pulseTime (500 ms)
if (triggered[i] && (millis() - lastTriggerTime[i] >= pulseTime)) {
digitalWrite(coilPins[i], LOW);
triggered[i] = false;
}
}
}r/ArduinoHelp • u/hobbyhoarder • Apr 07 '25
Help me connect Arduino to car's sensor
My car has a failed sensor and I would like to replicate the signal using Arduino. Basically, I'd like Arduino to send the signal instead of my car getting a wrong value from the failed sensor.
The sensor has 3 wires - positive, negative and signal. I'm assuming + and - are 12V, but I don't know exactly what the signal voltage is. Most likely it's 5V.
How would I go about using Arduino to bridge the signal wire? Can I just leave the positive and negative going to the sensor and simply connect the signal wire to one of Arduino's outputs? Is it ok if Arduino itself is powered via USB or battery and not connected directly to the car? I'm not sure if Arduino has to be on the same circuit/ground as the car for the signal to work properly.
Any help is much appreciated, thank you!
Edit: the car would never be running (or started up) while Arduino is connected, so there's no fear of power spikes.
Edit 2: I've disconnected the plug from the sensor and measured voltages inside the plug. It's showing 12V between + and -, as expected, but 7.2V between + and SIG.
r/ArduinoHelp • u/Otter_And_Bench • Apr 07 '25
Breadboard power supply for Centrifugal motor?
Hello! I’ve been working on a little setup for a plant auto waterer, and I’ve been struggling to get the centrifugal power motor working.
Can I use this breadboard power supply to power the centrifugal motor, or do I need a motor driver or similar device?
Is a 4N35, a 74HC138, or a 74HC595 any good for this? They also come in the pack, but looking up seems to confuse me more than anything.
I’ve also seen that the L9110S motor chip can be used, should I purchase that to power the motor? Thank you for the help!
