Adding Arduino to local network

I am in the middle of researching how to hook an Arduino up to a local network, but thought I would ask this question just to know if I am chasing a pipedream with one of my objectives or not.

So this is probably more an "is it possible" rather than "how do I"...

I have a local network running on a hub/router with DHCP enabled, which automatically assigns ips to devices on the network.
I have 2 Windows (7 and 10) pc's on the network and they can "see" each other and optionally access each other's files. In other words, a pretty standard wired LAN.

If I have an Arduino+Ethernet+SDCard "contraption", can I add the Aduino contraption to my network, such that it can be "seen" by the network pc's?

The objective is to be able is to browse any files on the SDCard with Windows explorer and to be open them with something like Notepad from either networked pc.

Pipedream or possible?

What Arduino? If it's a YUN then look here. If it's a pure AVR (UNO/MEGA) then I don't think it's possible using file sharing. Maybe you could serve up a web page on the Arduino and list/download from that.

I am using an iBoard ex - effectively an Arduino with on board Ethernet and SDcard.
It is based on the Leonardo.

aisc:
If I have an Arduino+Ethernet+SDCard "contraption", can I add the Aduino contraption to my network, such that it can be "seen" by the network pc's?

Yes.

aisc:
The objective is to be able is to browse any files on the SDCard with Windows explorer and to be open them with something like Notepad from either networked pc.

Pipedream or possible?

I don't think you can use the "Windows explorer" to browse the file, as you cannot setup a network file system on the Arduino (just 2 KB RAM on a UNO). So it will stay a dream to open files on your Arduino with the Windows text editor directly.

But you could create a "SD card webserver" on the Arduino and then use the "Internet Explorer" (or any other webbrowser) to browse the files on the SD card. Or to download them from the Arduino webserver to the harddisk of your Windows PC. After downloading/storing the file on your Windows PC you then could use the text editor to open the file.

Honestly, you'd probably be better served here to use a Raspberry Pi (or something similar) for a project like this.

Since these devices are basically small Linux machines, with an actual operating system, file handling capabilities, an SD card, built-in wired networking (or optionally wireless) - and it is very easy to add Samba (SMB) so that the filesystem (on an SD card, USB drive, etc) can be easily seen on the network.

You'll spend less time and money on the hardware side of things, though likely more on the software (configuration) side - especially if you don't have the experience of setting up Linux as a network file server.

Here's a couple of tutorials (many others can be found as well - search for "raspberry pi samba" and "raspberry pi file server"):

Share your Raspberry Pi's files and folders across a network

How to Turn a Raspberry Pi into a Low-Power Network Storage Device

If you need to do other things, then the Pi can use it's GPIO fairly easily to control other devices; there's also ways and means to interface the Pi to an Arduino (because again - it's just a small Linux computer in the end) - from using GPIO and a shield to communicate, or more simply by using USB. But for most tasks, you can just interface your hardware directly with the Pi's GPIO pins (then you use one of a number of different libraries on the Pi to control the pins - the main one being a library used with Python).

jurs:
Yes.

I don't think you can use the "Windows explorer" to browse the file, as you cannot setup a network file system on the Arduino (just 2 KB RAM on a UNO). So it will stay a dream to open files on your Arduino with the Windows text editor directly.

But you could create a "SD card webserver" on the Arduino and then use the "Internet Explorer" (or any other webbrowser) to browse the files on the SD card. Or to download them from the Arduino webserver to the harddisk of your Windows PC. After downloading/storing the file on your Windows PC you then could use the text editor to open the file.

Noted and thanks for the input. The SD card webserver idea, may work for what I want to achieve as a final end goal.

cr0sh:
Honestly, you'd probably be better served here to use a Raspberry Pi (or something similar) for a project like this.

Thanks cr0sh. Yes, the Pi 2 is a viable alternative and I actually already have one on order.
But since I have the hardware for the Arduino approach, I may as well continue developing it.

aisc:
Noted and thanks for the input. The SD card webserver idea, may work for what I want to achieve as a final end goal.

But please also consider that the data rates you can achieve with SD card access with Arduino are MUCH SLOWER than the data rates when using an SD card with a computer.

The Arduino can access an SD card only in "SPI mode" which limits the data rate to about max. 250 kB/s read rate. When serving an Ethernet shield at the same time, which also uses the SPI interface, you will have to read and write the data, which divides the theoretical data rate by 2 down to 125 kB/s.

That would mean, if you would try to load a 1 MB image file from the Arduino SD card through the Arduino webserver into a webbrowser, this would need 8 seconds (1000 kB / 125 kB/s) minimum. So don't rely on Arduino if you want fast file loading time combined with big files retrieved from an Arduino webserver with SD card.

jurs:
But please also consider that the data rates you can achieve with SD card access with Arduino are MUCH SLOWER than the data rates when using an SD card with a computer.

The Arduino can access an SD card only in "SPI mode" which limits the data rate to about max. 250 kB/s read rate. When serving an Ethernet shield at the same time, which also uses the SPI interface, you will have to read and write the data, which divides the theoretical data rate by 2 down to 125 kB/s.

That would mean, if you would try to load a 1 MB image file from the Arduino SD card through the Arduino webserver into a webbrowser, this would need 8 seconds (1000 kB / 125 kB/s) minimum. So don't rely on Arduino if you want fast file loading time combined with big files retrieved from an Arduino webserver with SD card.

Noted. The primary function of the Arduino would be that of data logger to the SD Card and a remote database.
Accessing and reading the SD Card file would really only be for debugging.
For admin purposes the file may be downloaded.
In other words, once the system is up and running there would be no "accessing/reading" and downloading would only happen once per day or not at all.

Well I ran into un unexpected problem, my sketch is too big.

Sketch uses 29,006 bytes (101%) of program storage space. Maximum is 28,672 bytes.

So far it is only 137 lines long including comments and spaces and does not have all the functionality I need yet.
So would I be correct in assuming the libraries are probably the problem?
So far I am using 4 viz.

#include <VirtualWire.h> // RF library
#include <SD.h> // SD Card library
#include <SPI.h>
#include <Ethernet.h>

Looking at the board specs, it seems other than the Due only the ATmega2560 boards have large flash memory.

Not using any floating point math, so nothing to save there.

Rather than changing boards, would an alternative be to make custom libraries - I am thinking to delete the functions that I am not using from the libraries. Is this a sane idea?

That Raspberry Pi is looking real tasty now...

aisc:
Well I ran into un unexpected problem, my sketch is too big.

Sketch uses 29,006 bytes (101%) of program storage space. Maximum is 28,672 bytes.

An Arduino UNO would offer some bytes more of "free memory" than an LEONARDO.
As the UNO bootloader is just 0,5 KB in size, you'd be able to use max. 32256 Bytes with your sketch on an UNO.

aisc:
So far it is only 137 lines long including comments and spaces and does not have all the functionality I need yet.
So would I be correct in assuming the libraries are probably the problem?

Yes, the SD and Ethernet libraries will need most of the available sketch size. So if you need SD and Ethernet at the same time, it may need very optimized programming to include more than a handful of functions.

A few bytes could be saved when using the third party "SDFat" library instead of the SD library included with the Arduino IDE.

Also using an IDE version of 1.5.7 or above saves some bytes against earlier versions.

When yousing SD and Ethernet libraries at the same time, you normally would like to use an Arduino MEGA, which is able to load much bigger sketch size.

jurs:
An Arduino UNO would offer some bytes more of "free memory" than an LEONARDO.
As the UNO bootloader is just 0,5 KB in size, you'd be able to use max. 32256 Bytes with your sketch on an UNO.

Yes, the SD and Ethernet libraries will need most of the available sketch size. So if you need SD and Ethernet at the same time, it may need very optimized programming to include more than a handful of functions.

A few bytes could be saved when using the third party "SDFat" library instead of the SD library included with the Arduino IDE.

Also using an IDE version of 1.5.7 or above saves some bytes against earlier versions.

When yousing SD and Ethernet libraries at the same time, you normally would like to use an Arduino MEGA, which is able to load much bigger sketch size.

I am already using 1.5.7
I have an Uno and Mega, but would need to buy an Ethernet shield, which means 30 day delivery from eBay :(.

Is there a way to increase the flash size by adding hardware?

I think for now will disable the SDCard, and simply write direct to the database.
At least I can test my sketch for functionality.

Thinking about that piece of Pi..
My contraption (iBoard ex for now) acts as a host & data logger for several sensors using 433MHz RF communications.
Hypothetically speaking....how would I best implement a Raspberry into this scenario as host.

Bearing in mind the sensors are Arduino based, should I hang an Arduino off the Raspberry as a dongle with a transceiver, to send/receive RF messages, or should I dispense with the Arduino totally on the host side and hook the transceiver direct to the Raspberry? I know from research both methods are possible, and I would think coding "arduino to arduino" is probably easier - but does one setup have any performance benefits over the other?

Hi, what are these "arduino based sensors"? Do you mean these sensors are attached to remote arduinos which communicate the readings back to the iBoard, via rf, to be recorded on sd card?

I have a setup working with temp, humidity, atmospheric pressure, light level and eventually rainfall, wind speed and direction, attached to an Arduino communicating back to a pi over rf. The rf transceiver is connected directly to the pi's gpio port. The pi records readings to sd card and acts as a web server to allow the current and historical readings to be viewed on a web page with graphs. The software for the pi is called EasyIoT, and the arduino sketch can be downloaded and adapted for your sensor setup from a site called MySensors.

Paul

PaulRB:
Hi, what are these "arduino based sensors"? Do you mean these sensors are attached to remote arduinos which communicate the readings back to the iBoard, via rf, to be recorded on sd card?

Correct.

PaulRB:
I have a setup working with temp, humidity, atmospheric pressure, light level and eventually wind speed and direction, attached to an Arduino communicating back to a pi over rf. The rf transceiver is connected directly to the pi's gpio port. The pi records readings to sd card and acts as a web server to allow the current and historical readings to be viewed on a web page with graphs. The software for the pi is called EasyIoT, and the arduino sketch can be downloaded from a site called MySensors.

Thanks. This is pretty close to what I am doing so should be a great help.

Here are a couple of pictures of the current circuits:

The rf transceivers are nrf24l01+ and the one attached to the pi is a long-range version.

The sensor board started life as a nano 3 but is now a bare atmega328 running at 8MHz. This reduced battery consumption dramatically. 3xAA rechargeables lasted 3~4 days with the Nano 3, but the atmega has been running on the same charge for 2~3 months! I intend to get the sketch running at 1MHz which will allow the circuit to run at lower voltages, hopefully 2xAAA, for similar periods.

Check this post,you will find how to connect to network in it

PaulRB:
Here are a couple of pictures of the current circuits:

The rf transceivers are nrf24l01+ and the one attached to the pi is a long-range version.

The sensor board started life as a nano 3 but is now a bare atmega328 running at 8MHz. This reduced battery consumption dramatically. 3xAA rechargeables lasted 3~4 days with the Nano 3, but the atmega has been running on the same charge for 2~3 months! I intend to get the sketch running at 1MHz which will allow the circuit to run at lower voltages, hopefully 2xAAA, for similar periods.

BTW by RF I actually meant 433MHz RF, not Wifi - sorry my bad for not being clear.

FWIW I had visualized your setup somewhat differently before seeing the pics.
How do u interface with the Raspberry? - via your laptop/PC over LAN?

Sensors. org was not much use to me as I already have the sketches for my sensors, but it was still interesting to note that the sensors.org approach is to use an Arduino as an RF/Wifi dongle (gateway) to interface with the controller.

Still trying t wrap my head around what the iot software does...
Is it basically a graphical interface to add and view the status of the sensors?