Go Down

Topic: Am I underestimating the power of Arduino ? (Read 676 times) previous topic - next topic

Rednex

Hi !

I am thinking of making an ethernet connected arduino board that can monitor 3 analog pins, save the data to an SD card, and let a PC fetch the files every few minutes. Is the Arduino powerful enough ?

Simplified:
Monitor 3 analog pins
Log the data to an SD card
ethernet connected
Somehow getting the data from the arduino to the PC, via simplified web server ?

p.s. maybe the datalogging part isn´t nessecary. I aren´t familiar with if the arduino can monitor the analog pins and still read and write from the SD card  :-/

Coding Badly


Some details about your application would help answer your questions.  For example... Why do you want the PC to have access to the data?  Why did you choose ethernet as opposed to serial?  How many readings per second do you expect to collect from the analog inputs?

Ran Talbott

There are two issues I know of that might cause problems for you.

First,  the Wiznet modules that most people use for Arduino Ethernet don't work quite as expected on the SPI bus:  they don't release the MISO line when they're not selected.  I'm pretty sure I've seen postings from folks who've done a workaround for this:  try a forum search for something like "miso wiznet".  Perhaps with "fix" of "kluge" added if that returns too many results.

The other problem is that the interfaces to Ethernet and SD are not very fast:  I've seen postings from people saying they only got a few K per second.  If you have a lot of data,  you might need to dig into some library code to do some optimizing:  I would expect the hardware to be able to do better.  It might also be that the people posting those low figures weren't optimizing their application code:  e.g.,  printing their data a byte at a time,  instead of doing fewer library calls by accumulating data into a buffer and calling write().

So the answer to your question is "It's probably powerful enough,  but you need to be more specific".

Grumpy_Mike

Yes the speed is vital. You can do all this with an arduino but not say at audio rates.

Rednex

Thanks for the quick answears !

As I live in Iceland, I want to make a seismometer and put it in my backyard. It will be about 30m from our house to get away from most of the rumble from cars, people and so on. That´s why I thougt ethernet would be a good choice.
It will have to send information at what, 25Hz, or something like that to get enough readings to plot a graph, if I don´t store it first on a SD card.
I want the PC to fetch the data to make a web page so I could access it where ever I am.

pluggy

At 30m you would probably get away with raw serial especially if you ran it at 9600 Baud.  I run one at 50m from another arduino using software serial on one of them.  The other has an ethernet shield so I can transfer the data across town to my server (grandiose name for a hacked Seagate Dockstar NAS box ;) ) which plots the graphs.  

The 'server' webpage is at http://pluggy.is-a-geek.com/  - the church graphs near the bottom are what it gets across town, the different data is collected from 1 Arduino with etherent and another (actually a RBBB, not a full arduino) at the opposite side of the building over serial.  I use CAT 5 and use a couple of the spare cores to power the remote unit down the same cable.  

The church end data can be accessed directly at http://majestic81.plus.com/  

The previous poster is correct : the Ethernet shield is slow, its faster than serial at 9600 but not as fast as at 115200 baud.  (around 4k a second). The above church end link is 'appropriate' to its capabilities.....

Rednex

Pluggy, that´s awesome !

It will also be about 50m to my computer, 30m from the house + 20m to the other side of the house.

I was thinking of making a small wind generator to power the equipment, but running the power through the cat5 cable is a much simpler solution. "Will I go the easy way or the hard way?"  ::)

I haven´t really experimented with logging data so I don´t know what speeds I will require. What do you think ?

pluggy

#7
Dec 04, 2010, 03:01 pm Last Edit: Dec 04, 2010, 03:02 pm by stephen_t Reason: 1
Its suck it and see time, the distance plain old serial will run depends on the environment its running through as well as the cables you use.  I the data you need to transfer can be squeezed into a 9600 baud serial stream ( ~ 1k a second) I'd go for it. 50 m of cat 5 isn't much to lose if it doesn't work considering you were looking at a small power station to run it......  

I wouldn't try to pull too much current through cat5 it does have a resistance using long lengths of it.  I get 4.5 volts at the far end from the 5v pin with the arduino,a few low power sensors and an LCD without backlight.  Its happy enough.

Ran Talbott

For 50m,  I'd use a serial-based Arduino with RS-232,  or an RBBB with RS-485.  RS-485 buffer chips are cheap,  and reliable for very long distances.  Feed 8-9V down 1 or 2 pairs of the Cat5,  and use local regulation to get a clean 5V.

Go Up