i am completely new to hardware programming and micro controllers and i am unable to figure out what search-engine search-term to use to find the answer i am looking for.

the project

i am working on a project that will use an arduino to control the opening and closing of a window; in a shed. the project i am trying to achieve is further described here.

the question

i want to know what are the limitations of wire length in an arduino project and what do i need to have to be able to extend that wire length capacity?

i currently have those "common" 20cm wires you get off ebay... which i dont think will be long enough.

  • 2
    If 20 cm is not long enough, what is long enough then? 2 m, 200 m, 20 km? Feb 12 '20 at 21:21
  • for this example lets say 3m... i plan the window to be on the roof... i figure my options are to either "stick" the arduino on a wall nearby or have long cables to the floor. i think the second option better achieves safety for the arduino because i could put the arduino inside some waterproof box on the floor. i dont expect it to get wet inside... but i cant guarantee that.
    – X0r0N
    Feb 12 '20 at 21:33
  • What kind of motor are you going to use to open and close the window? What type and voltage? The distance will depend on that.
    – haresfur
    Feb 12 '20 at 21:39
  • i dont mean to advertise amazon products or anything... but something like this is a type of motor that seems easy to control... (i have micro servo SG90 working as expected. my expectation is that the large one will work similarly (of course with more power requirements))... i do not think the window will be too heavy... but this motor seems sufficient... perhaps my expectation here are too optimistic. feel free to advise on anything you think i may not have considered.
    – X0r0N
    Feb 12 '20 at 21:51

The stepper motor 28byj-48 seems to be a 5V motor (datasheet). I've seen it being used with a A3967 driver, which means that it does not draw more than 750 mA of current.

I'll go with the length you mentioned in the comments:

for this example lets say 3m

The rest is Physics: the resistance of a wire is

R = p * l/A

where l is the length of the wire and A is the area (dependent on the diameter).

A voltage drop calculator can now tell you how much voltage is left at the end of the wire.

I would have estimated a 0.75 mm² (AWG 18), but you might even be fine with 0.5mm² (AWG 20) according to the calculator. But: better safe than sorry.

Also from the comments:

i have micro servo SG90 working as expected. my expectation is that the large one will work similarly (of course with more power requirements)

A stepper motor needs a totally different setup than a servo. The servo is connected with simple 4 pins, the stepper needs a motor driver (H-bridge). Connecting the stepper motor directly to the Arduino may destroy your board.

  • thanks for you reply... i have decided to not use the stepper as described in a previous post. i think the mechanical requirements are simpler with the use if a servo motor because i do not need continuous rotation to open a window and i have a working proof of concept working with cheap SG90 servo you can get with some "cheap" arduino kit.
    – X0r0N
    Feb 12 '20 at 22:01
  • @X0r0N: be aware: the SG90 can hold ~1 kg in 1 cm distance, 100 g in 10 cm distance and 10 g in 1 m distance. You'll need a much more powerful servo. Feb 12 '20 at 22:04
  • i think so too... my plan is to use this one or similar.
    – X0r0N
    Feb 12 '20 at 22:06

Wire length is hard to define. It depends if it is in your case powering a motor or has control signals connected directly to the Arduino. Take a good look at the answer provided by Thomas Weller, by sizing the wire appropriately you can get extremely long lines for motors and other types of loads, you have some voltage to work with. The wires connected to the Arduino are also antennas and can pick up a lot of nasties in a very short run, especially around motors. These antennas on the inputs are high impedance making them more sensitive to noise. Regardless of which wires you are looking at they need to be properly conditioned for your environment and application.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.