how far can you run a sensor from the arduino

so I wanna have an Arduino in my server rack in my home and have like 4 humity temperature sensors in my basement and maybe couple upstairs and want to know how far you can run these before its too much for the Arduino to handle and burn out and if there is way to booster single like you do for a network switch you do ever 300 feet to repeat the signal

and how many sensors can you add to the ardiuno as id like to add barameter temperature humidity sensor for outside

and I read you can run app on your phone to see sensors of the Arduino using a webserver.. my other question is can you run 1 website and show multiple arduinos same time

You will not burn out your Arduino by having distant sensors. You may have to use shielded cable, you may have to keep sensor wiring away from other wiring, you may have to cross other wiring at 90 degrees, you may have to average several sensor measurements to get one reading. In short, you may have to take these and other measures to mitigate electrical noise but the only way to know is to try.

The number of sensors that you can add depends upon the type of Arduino, the model of the sensor, and the software.

Being able to display multiple Arduinos on a website depends upon the electrical connections used, the web server software, and the Arduino software.

ok wow lot to know
ok so im a beginner with all this stuff don't have a Arduino I read the word Arduino is from the orginal company and the others make the same just have to label it different

so how do I know which model I need or software or able to access multiple webservers on 1 webpage

how I know these measures and what
and why you need several sensor measurements to get 1 reading
im hoping you guys the experts and know everything about these things and sensors etc least that's what I hoping if I wrong I wrong (:
I new so please bear with me

ok wow lot to know

Yes. That's the exact problem. You're asking a question that would require a book to answer. Especially when you factor in the whole web server aspect. That's a whole other complex topic.

What you probably need is some sort of off the shelf product, designed to do what you want -- some sort of environmental monitoring system. I don't know of one, personally, but perhaps someone else has an idea.

In may day -- back decades ago -- the problem of distant sensors might be solved with 4-20mA lines. These days, something like SPI, or I2C, might be used if the lines aren't more than 20 feet long, or some other digital-serial solution like RS485, or even Ethernet, which can work with longer runs. I suppose you could also use something like WiFi, but that seems like overkill to me--ala: The more complex a system, the more things to go wrong.

For a website, perhaps a Raspberry Pi running something like "LAMP" or "XAMPP". I'm versed in PHP, so that's what I would use to build the site, along with Javascript, jQuery, JSON and AJAX, for a seemless realtime display update. Maybe a Python app would monitor the I2C connections, and send that data via CURL and HTTP to send POST requests to the PHP webserver script.

And, what-the-heck -- thinking in terms of a wireless solution, perhaps each sensor could be paired with an ESP module for a WiFi connected solution. That way, firmware in the module could send HTTP POST requests directly to the PHP script.

But, that's just me thinking out loud.

You may need to take an average of multiple readings to get one measurement if the readings are corrupted by electrical noise. Hopefully, the noise corrupts some readings upwards and some downwards so that the average gets you one good measurement. If you do not understand this then you probably have some learning to do.

Of course, this assumes that you get analog sensor readings. If you receive digital data (say, I2C or SPI) then you have a different problem.

You choose an Arduino based on how much you think you need of: RAM, FLASH, EEPROM, and pins. 5 volts versus 3.3 volts and special functions (such as more hardware serial ports) may also play a role. Did I mention how many ADC ports, how many PWM pins, price and availability? Ability to plug in "shields" may also matter.

I suggest that a beginner just start with something easy (perhaps an Uno) and start learning.

And, it occurs to me that the original question was never really answered: "how far can you run a sensor from the arduino"

The simple answer is: as far as you want! You can have your sensor on the other side of the planet, and monitor it via the Internet. Hell, there are sensors being monitored at the edge of the solar system -- on the two Voyager space probes!

So, it all comes down to technologies [and how much you're willing to spend -- I mean, you can get a CubeSat into orbit for around 40K--or less, based on this: Spaceflight - Schedule and Pricing]. And that, my friend, is a big subject. It might help if you told us how far away your sensors are likely to be.

Welcome to the forum.

Can you tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :slight_smile:

...and how many sensors can you add to the ardiuno ...

and further to ReverseEMF's "as far as you want" - you can run as many sensors as you want too, with port expanders and many various options of achieving said goal.

think of the Arduino as 'the brain' - it's up to you to design 'the body' around it - how many arms, how long they are, what gripping strength they are capable of, etc.

You will not burn out your Arduino by having distant sensors.

Well you might think that, but the next near-by lightning strike could prove you wrong. Long wire runs are antennas and can pick up substantial energy from a lightning discharge, requiring protection circuitry at the receiving end.

Wiring within one building tends to be shielded by the rest of the wiring in the building, which reduces the severity, but in general long runs mean more precautions may be needed to guard against interference
that can cause malfunction, resets or even electrical damage. Shielded cables can have the shield divert transients directly to a grounded metal enclosure, a very common technique for RF and TV antenna cables.

Of course a direct lightning hit is another matter, only switching to wireless links or fibre-optic can help in that

With long cable runs you should consider the cost of the cable v. low-cost ISM band transceivers - copper is not cheap.

This newbie was writing about a server rack in his home and sensors in the basement, so I tended to take a house as the lightning protection and avoided getting technical. You (MarkT) are quite correct about lightning; even running the wire in metal conduit may not provide sufficient protection from a near- or direct-hit.

Running wires outdoors (such as building-to-building) can be a problem.

With long cable runs you should consider the cost of the cable v. low-cost ISM band transceivers - copper is not cheap.

unless you're Down Under ! :stuck_out_tongue:

I wouldn't be so sure about a house shielding you from lightning, especially if the wires are partly in a basement, which is next to the ground where the currents flow.

Wire is pretty cheap, a roll of 100m of 4-core sensor wire costs me about 15 USD equivalent. However laying down wiring is where the cost is. Mounting it properly, drilling holes in walls, etc. It's a lot of work. Plus the antenna effect of long wires, which needs to be dealt with.

Then there's the problem of the sensor itself: how to communicate with it? Most sensors don't output a signal using a long distance protocol like RS485. They more likely will be using I2C, SPI or a one wire type of signal. All of which will require a relay if more than a few meters.

I'm not sure but I think the OP was thinking of extending the physical wires from a sensor to the Arduino. That being the case and assuming the sensor is likely to be I2C then I would say the connection (I2C) would be limited to the immediate area, typically on a single board or at least in the same housing. I believe one of the other posts stated this as well.

To the OP, I believe the other posts are assuming the I2C signal is converted into some other type of signal i.e. RS-485 or other interfaces meant to go a long distance.

As for lightning, I agree with MarkT but I don't worry about lighting in my home. At least not the Arduinos. There is not too much you can do for lighting in conducted systems, If my Arduinos get fried I'll simply replace them. I'm more worried about the TV, Sound system etc.

Personally if I were to undertake such a project, I would not consider wire connections. I would use one of two radio systems.

  1. Pro-Mini connected to a RFM69 radio. One could simply set the radios up as RS232 "extenders" or use one of the many protocols on the internet.

  2. NodeMCU linked to my router which can be then accessed a number of ways.

For the sensors, I would consider the Bosch BME280 (temperature, humidity and pressure).

For what it's worth, in my home I have an ESP8266/NodeMCU board periodically reading a DHT22 (DHT11?) temperature/humidity sensor. The sensor is physically a couple of inches from the processor board. I'd be nervous about reliability extending that further a few feet distance.

The ESP8266 is on the home wifi network and posts its readings to an internet MQTT webservice ("ThinkSpeak", but there are others. Many people use a local MQTT server for home automation). I can access readings from the sensor virtually anywhere in the world given an internet connection and a web browser.

The gist of this being that one wants the sensor close to the Arduino board, but can then use suitable protocols to distribute the acquired data as desired.