r/ArduinoHelp • • Jan 22 '23

Lipo battery, not sure what the voltage at full and empty is

2 Upvotes

Hey,

I want to buy this Lipo battery: https://www.amazon.co.uk/gp/product/B09DPR4V6L

But I'm not certain what the voltage is when it's full and empty.

It says that the battery is 3.7V, but what does this mean? Is 3.7V = full? There's also this document on the Amazon page: https://m.media-amazon.com/images/I/71w020Fp-3L._AC_SL1500_.jpg which tends to indicate that:

0% = 3.0V and 100% = 4.28V

So what is full and what is empty?

Thanks


r/ArduinoHelp • • Dec 02 '22

Arduino pro micro not detected by computer anymore ?

2 Upvotes

My board isn't detected anymore when plugged in.

It used to work correctly, then after fixing a component's soldering, it stopped working entirely. I removed everything, cleaned the board and cleaned the solder from the ports, and it still don't work. The led turns on, but it's not detected. Is it dead ? Or can I fix it ?


r/ArduinoHelp • • Nov 18 '22

NSFW build: Complete novice help - Nano sends commands to UNO that controls a PWM dual motor controller NSFW

2 Upvotes

Hi all,

I'm making an saddle style vibrator (see r/ProjectCowgirl or r/OpenSaddleVibrator). In the project, there's a controlbox with a Nano in it, with two potentiometers and buttons for input control. From there, the signal goes to a UNO, which then communicates with a dual motor PWM controller.

Any help and input would be much appreciated here..

I'm having a load of trouble getting it working. Below is a wiring diagram that I'm using:

Link to documentation for 7A/160W Dual H-Bridge Motor Controller: https://www.handsontec.com/dataspecs/module/7A-160W%20motor%20control.pdf

// Nano code:
// Master code for Arduino Nano for the Saddle Vibrator by Jands87
// https://www.thingiverse.com/thing:3554455
// Version 1.0 (14.4.19) - Note this has been edited for minor spelling corrections by Stumro. There is essentially no change to the code function other than directed pins.

#include <Wire.h>

const int pot0 = A0;              // pin designation for pot0
const int pot1 = A1;              // pin designation for pot1
const int butt0 = 2;              // pin designation for button0
const int butt1 = 3;              // pin designation for button1
const int  LED = 13;              // LED showing debugging mode

byte motor0;
byte motor1;
byte button0;
byte button1;
byte debugflag;

void setup()
{
  Wire.begin(8);                  // join i2c bus with address #8
  Wire.onRequest(requestEvent);   // register event

  Serial.begin(9600);             // set serial baud to 9600
  Serial.println("Slave");        // print on screen position of board

  pinMode(butt0, INPUT_PULLUP);   // set both inputs to internal pull ups
  pinMode(butt1, INPUT_PULLUP);
}

void loop()
{
  motor0 = map(analogRead(pot0), 0, 1023, 0, 255);  // map will return byte size data
  delay(10);
  motor1 = map(analogRead(pot1), 0, 1023, 0, 255);
  button0 = !digitalRead(butt0);                    // read in button status and invert
  button1 = !digitalRead(butt1);
  delay(500);                                       // 0.1-sec interval as a test interval

  if ((digitalRead(butt0) == 0) && (digitalRead(butt1) == 0)) {   // enter debug mode if both buttons pressed when powered on
    if (debugflag == 0) {
      debugflag = 1;
      digitalWrite(LED, HIGH);
      button0 = 0;
      button1 = 0;
      delay(1000);
    }
    else {
      debugflag = 0;
      digitalWrite(LED, LOW);
      button0 = 0;
      button1 = 0;
      delay(1000);
    }
  }
}

void requestEvent()
{
  Wire.write(motor0);              // data item-1 as ASCII codes
  Wire.write(motor1);              // data item-2 as ASCII codes
  Wire.write(button0);             // data item-3 as ASCII codes
  Wire.write(button1);             // data item-3 as ASCII codes
  Wire.write(debugflag);           // data item-3 as ASCII codes

  if (debugflag == 1) {
    Serial.print(motor0);           // data item-1 as ASCII codes
    Serial.print(",");              // local separator
    Serial.print(motor1);           // data item-2 as ASCII codes
    Serial.print(",");              // local separator
    Serial.print(button0);          // data item-3 as ASCII codes
    Serial.print(",");              // local separator
    Serial.print(button1);          // data item-3 as ASCII codes
    Serial.print(",");              // local separator
    Serial.println(debugflag);      // display debug status
  }
}
// Uno code:
// Master code for Arduino Uno for the Saddle Vibrator by Jands87
// https://www.thingiverse.com/thing:3554455
// Version 1.0 (14.4.19) - Note this has been edited for minor spelling corrections by Stumro. There is essentially no change to the code function other than directed pins.

#include <Wire.h>

byte inData[10];                                 // incoming data array for data from controller (make larger than you need)

const int  motor0 = 6;                           // pin designation for motor0
const int  motor1 = 9;                           // pin designation for motor1
const int  LED = 13;                             // LED showing debugging mode

bool  button0 = 0;                               // internal variables for button0 on controller
bool  button1 = 0;
bool  button1flag = 0;                           // check flag to see if button is being held down, debounce
bool  rampmode = 0;                              // flag for ramping mode on motor0
bool  flag = 0;                                  // dead man switch for connection, stop motors if no data
bool  debugflag = 0;                             // set 1 for debugflag mode to print serial updates

void setup()
{
  delay(600);                                    // allow controller to start first
  Wire.begin();                                  // join i2c bus (address optional for master)
  Serial.begin(9600);                            // set serial baud to 9600
}

void loop() {

  flag = 0;                                      // set connection flag to off to show data to stop motors if no data arrives
  Wire.requestFrom(8, 5);                        // request 5 bytes from slave device #8
  while (Wire.available()) {
    for (int i = 0; i <= 4; i++) {
      inData[i] = Wire.read(); - '0';            // read 1 byte from the wire buffer in to "inData[i]"  -'0' is to convert back to int from char  
    }
    button0 = inData[2];                         // check to see if any buttons have been presed
    button1 = inData[3];
    
    if (inData [4] == 1){
      debugflag = 1;                             // enter debug mode
      digitalWrite(LED, HIGH);                   // LED showing debugging mode, HIGH);
    }
    else
    {
      debugflag = 0;                             // exit debug mode
      digitalWrite(LED, LOW);                    // LED showing debugging mode, HIGH);
    }
    
    flag = 1;                                    // set connection flag to on to show data has arrived.
  }

  if (flag == 0) {                               // deadman (no connection) switch to stop motors
    for (int i = inData[0]; i == 0; i--) {       // decrease motor0 and motor1 speeds until stopped
      analogWrite(motor0, 0);
      delay(10);
    }
    for (int i = inData[1]; i == 0; i--) {
      analogWrite(motor1, 0);
      delay(10);
    }
  }


  if (flag == 1) {                                // only continue if controller is connected (deadman switch check)

    // ***************** BUTTON 0 ROUTINES *****************

    if (button0 == 1) {                           // process button routine if button0 has been pressed
      button0press();
    }

    // ***************** BUTTON 1 ROUTINES *****************

    if (button1 == 1) {                           
      button1flag = 1;                            // set button flag to make sure it does not continuously run the routine (debounce)
    }

    if ((button1 == 0) && (button1flag == 1)) {   // if button has been released reset button0 flag and process routine
      button1flag = 0;
      if (rampmode == 0) {
        button1press();
      }
      else if (rampmode == 1) {
        rampmode = 0;
      }

    }

    // ****************** MOTOR  ROUTINES ******************

    if ((button0 == 0) && (button1 == 0)) {       // no buttons have been pressed - set motor speed
      if (rampmode == 1) {
        inData[0] = 255;
      }
      analogWrite(motor0, inData[0]);             // PWM to output motor0 port
      delay(10);
      analogWrite(motor1, inData[1]);             // PWM to output motor1 port
    }
  }
  if (debugflag == 1) {
    showSerial();
    delay(1000);
  }
  else if (debugflag == 0) {
    delay(100);
  }
}

void button0press() {                             // button0 has been pressed
  inData[0] = 255;                                // set motor0 speed to 100%
  analogWrite(motor0, inData[0]);                 // PWM to output motor0 port
}

void button1press() {                             // button1 button has been pressed
  rampmode = 1;
  for (int i = inData[0]; i <= 255; i++) {        // slowly ramp motor speed to 100%
    Serial.print(i);
    Serial.println(".");
    analogWrite(motor0, i);
    delay(10);
  }
  Serial.println();
}

void showSerial() {
  Serial.print("Masterboard Status: ");
  if (flag == 0) {                                // deadman (no connection) switch to stop motors
    Serial.println("Controller disconnected. (Debugging)");
  }
  else if (flag == 1) {
    Serial.println("Controller connected. (Debugging)");
  }
  Serial.print("Motor 0:");
  Serial.print(inData[0]);
  Serial.print(" / ");
  Serial.print("Motor 1:");
  Serial.print(inData[1]);
  Serial.print(" / ");
  Serial.print("Button 0:");
  Serial.print(button0);
  Serial.print(" / ");
  Serial.print("Button 1:");
  Serial.print(button1);
  Serial.print(" / ");
  Serial.print("Button 1 Flag:");
  Serial.print(button1flag);
  Serial.print(" / ");
  Serial.print("Ramp Mode:");
  Serial.print(rampmode);

  Serial.println();
  Serial.println();
}

Edit: included link to PWM documentation and the the UNO code.


r/ArduinoHelp • • May 02 '22

Help with LCD and 7 Segment display

2 Upvotes

hi everyone

I have a 7 segment display connected to an arduino and the code allows for a IR sensor to detect and display the number pressed on a remote. Is it possible to also connect a LCD to the circuit so that the number pressed on the remote is displayed on the 7 segment and LCD ?

Any help would br appreciated

thanks 😁


r/ArduinoHelp • • Feb 27 '22

How should I go about a "piston"?

2 Upvotes

So. At my job I have to sometimes sponge a concrete section. Let's say 8 feet by 20 feet. So 160 square feet. To sponge a panel, I have to constantly "dab" with a sea sponge. The sponge is barely bigger than my open palm. So to do a whole panel, I dab the sponge probably average (probs more) of 12 times per square foot. So 1920 dabs of the wrist in usually about half an hour. Obviously, I don't want to do this as it's a lot of fatigue on the wrist and elbow.

I want to make an arduino tool to do this for me. Not hand held, I plan to have a gantry (a 2x4) for the contraption to ride along. That part can be manually done with a rope and a pulley to go across the panel. The hard part is deciding what to use for a piston of sorts.

I need something that can lift/lower a wet sponge quickly and by a decent distance. Probably 2cm ish. by quickly, I'm thinking 4 dabs per second. A solenoid would obviously be simplest, but I have no idea how fast they can operate, or how much weight they can handle. My other idea is to use a DC motor, and make something similar to an air compressor piston. Where the DC motor spins one direction, and the pivot point rotates around the motor making the piston go in and out. That's a touch more complicated and will likely be lots of trial and error for speed/dab distance. I don't think servos can operate fast enough, and not sure on their max speeds.

Sorry if anything is not clear. Thanks all!


r/ArduinoHelp • • Feb 08 '22

Help with pin out/ programming the screen.

2 Upvotes

I don’t really know where to post this, but I have a screen off of an ender 3 pro that I am trying to reuse. I can connect it to the arduinos power and get it to turn on. However it boots off the ender 3 stuff that is on the screen. I am unsure how to go about programming it or how to get rid of the ender boot. It also has some rx and tx pins that I don’t know what to do with


r/ArduinoHelp • • Feb 05 '22

Arduino Millis function

2 Upvotes

How do I make serial input in arduino as a variable for millis()? To act as an adjustable timer? I've been trying to find codes but none seems to heed to my needs. Please help me, will appreciate it alot!


r/ArduinoHelp • • Dec 25 '21

Powering NodeMCU with doorbell power?

2 Upvotes

I plan to replace my ordinary doorbell with an elaborate NodeMCU-NodeRed automation chain. The chain should go like:

- person rings

- NodeMCU gets power, http-posts to Node Red flow

- NR flow does clever and funny things

- I go and open the door.

I've read some tutorials and have a small sketch, but then it hit me: why do I need to put the NodeMCU into deep sleep state, when my doorbell most probably works with 12V power and I have a step down module, why not connect the NodeMCU directly to the door bell power?

MCU gets power, POSTS to Nodered, done. No need for optocouplers or resistors... or am I missing something?


r/ArduinoHelp • • Dec 08 '21

Arduino code vs commercial

2 Upvotes

When using Arduino, the IDE, What should I compare the code of Arduino to? OR, well since it’s more hobbyist vs commercial....

How much or many of the concepts of Arduino, match up to the commercial use in the real world, and also other libraries??


r/ArduinoHelp • • Dec 08 '21

32u4 Pro micro as FTDI for ESP-01

2 Upvotes

Soo i've been trying to use my pro micro as FTDI for ESP-01.
And as you might asume by me commiting this very post here, i've failed.

Arduino Pro Micro with ATmega32u4
ESP-01 / ESP8266

Connections look like soo:
Additionaly breakout i'am using has some kind of tiny condensator, idk why and for what.
I am trying to upload a blink as test, both arduino and ESP blink a fiev times before arduino.ide splits an error at me.
log from IDE

Known ideas:
- shorting RST and GND on Arduino -> no serial port for IDE to upload onto
- switching TX and RX wires -> No response from eighter ino or ESP

THANKS IN ADVANCE :>


r/ArduinoHelp • • Sep 15 '21

Need help for project for a school contest.

2 Upvotes

The project has 2 buttons, 2 leds and 2 buzzers. The idea is that when you press the button the light asociated with the button you pressed should stay on for a few seconds as well as the buzzer, that way the participants can know which one pressed first and needs to asnwer the question. The problem is how to determine wich one of both was pressed first and how to keep the light on for a while.

I've searched for a while this software because i know that is something that it is used in a lot of quizes and schools but where i live this is not as common.


r/ArduinoHelp • • Aug 08 '21

Do HM10 clones(BT05) compatible with IOS?

2 Upvotes

Ive tried using many apps, to which some of them i can connect to, although my output to the serial monitor is nothing. If this module is incompatible, what are the alternatives?

#include <SoftwareSerial.h>

// BLE Mod Setup
SoftwareSerial HM(3, 4); // RX, TX
char v;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  HM.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial.available())
  {
    v=Serial.read();
    HM.print(v);
  }
}

r/ArduinoHelp • • Aug 01 '21

LAFVIN arduino UNO smart car

2 Upvotes

So I got a LAFVIN smart car a while back and made the whole thing, I made it with a YouTube tutorial and the coding and stuff for the car where in the description. I wanted to open the file but I couldn’t in my country or region (the Netherlands) does anyone know a place where I can get the code for the LAFVIN smart car???


r/ArduinoHelp • • Jul 28 '21

Please help me reconfigure this Wiimouse project

2 Upvotes

Hello ArduinoHelp! I've only recently gotten into modding and found a good starter project to sink my teeth into. Making a mouse input device from an old Wii Nuncuck. It took some time to figure out the pins, especially with the joystick (this was the only project I could find that didn't use a nunchuck with a gyro in it and used a Teensy 2, which I already had, so I couldn't use the original wires that go to it's connector)

Anyways, I got the code loaded in and it works. Only thing is that it doesn't work really how I might want it to. I'd like to change the code to basically have the C button (I swapped this to Right Mouse, originally Left in the code) to be Right mouse on click, and Middle mouse on Hold for some amount of time, like 1-2 seconds. This would making scrolling much easier and seems like the simplest thing to change. I've tried looking up arduino codes for things like click vs hold, but I'm still so new, most things I found basically assumed you had a working basic knowledge

The code I used is here, provided by the OP of the post. The only thing I did was swap it so the Z button was Left mouse and the C button was Right mouse. Thanks in advance


r/ArduinoHelp • • Jul 23 '21

Resetting an Uno

2 Upvotes

This may be a stupid noob question. Sorry. Can I reset or re-use an already programmed Uno? Will resetting it delete the sketch? Can I run a blank setup in IDE? Noob here. Sorry.


r/ArduinoHelp • • Jul 22 '21

Homebuilt Uno

2 Upvotes

If I wanted to build an Uno, could I use an off the shelf Atmega328p? How difficult is it to load bootloader onto a blank IC?


r/ArduinoHelp • • Jul 20 '21

Need help with limits on robotic arm

2 Upvotes

hey, so im designing a robotic arm atm, and am trying to find a good way to have limits for my actuators. They are going to be driven with cheap steppers and im trying to go for a cleaner look so i would like to avoid using limit switches. I was thinking of embedding cheap potentiometers that I got from amazon, however i would have to gear them since their range of motion is limited (270 degrees i think). Does anyone know if this is a good idea (bare in mine this isnt going to be super precise and desktop size). If not, id like to hear some other ideas. thanks


r/ArduinoHelp • • Jul 04 '21

Is it possible to use a relay as an input switch?

2 Upvotes

I have this issue where the serial monitor isn't reading the state of the switch properly, the monitor only works when my hand/finger is near the cable or touching. When my finger is close or touching the wire (that is being read using a digital read line) the tx light is flashing and doing all sorts. Has anyone had a similar issue before?


r/ArduinoHelp • • Jun 30 '21

Help needed with an Arduino drink machine

Post image
2 Upvotes

r/ArduinoHelp • • Jun 29 '21

Traffic light project Problem

2 Upvotes

Some context. My project consists in 2 traffic lights, one should be always in green and the other red, and they should start changing when I press a button. so the first one goes to red while the last one changes to green.

Now my problem is that the lights change withouth the press of the button. they are constantly going back and foward. I dont believe its a sketch problem because I copied the sketch from a book, but I will check that regardless..

Has anyone had similar problems on a similar project?

Im looking for Ideas, thank you very much.


r/ArduinoHelp • • Jun 27 '21

A chandelier of bright paper lanterns that come on one by one

2 Upvotes

I’m a high school theater director. For a production of a play called Radium Girls I would like to construct a sort of chandelier of 75 or so paper lanterns — different sizes but not tiny, clustering in a space about 20’ wide.

I would like the lanterns to light up one-by-one over the course of about 90 minutes. They could come on randomly. Fading in would be nice.

Some notes:

  • These would need to be bright enough to be visibly on even with stage lighting on. They don’t have to be lighting the actors.

  • it would be ideal to have a single power source and a single controller, so no one has to clamber high above the stage to switch out batteries. Perhaps a stagehand, on a cue, pushes a button and the program runs on its own.

  • I have a supportive tech department on my side, and I do okay with programming Arduinos (I also teach computer science). So assume intermediate-level skills but no more.

  • Construction and rigging won’t be the problem.

  • Budget of about $300 at the most.

Is this possible? Thanks in advance.


r/ArduinoHelp • • Jun 25 '21

Esp8266 stepper motor sketch

2 Upvotes

Hello everyone I'm having some issues I'm trying to do a simple project I want to turn a stepper motor continuously at a certain speed I used my mega 2560 board that came in my kit and got it doing exactly what I wanted but when I went to put that same sketch on the esp8266 board it does half a turn stops for a split second then repeats I changed everything that needed to be changed as far as I know like my pin numbers and stuff for the esp8266 board but it just wont continue to rotate like it did on the mega 2560 board I'm at my wits end and help would be great it is a 28byj-48 motor.


r/ArduinoHelp • • Jun 23 '21

Stepper motor control

2 Upvotes

Hi everyone complete nub here I'm trying to make a project to where I use an ir remote to turn on and off a stepper motor and have it turn continuously until I hit the off button on the remote I have been trying for a week and just cannot figure it out at this point I even tried using a stock code from the library made for the stepper I'm using when I try to compile it to check it I get void error codes I'm at my wits end. Can someone please help me.


r/ArduinoHelp • • Jun 14 '21

Get 2 stepper motors running at the same time with different frequencies

2 Upvotes

Hello alll,

We are making an automatic wire stripper and cutter for a school project. We use an Arduino Mega, 2x shield and motor drivers and 2 stepper motors. Does anyone know how to control those 2 motors at different frequencies at the same time? You guys are our last help, no one else could help us.