Go Down

Topic: temperature sensors and relais (Read 2419 times) previous topic - next topic

agent smith

Hello everybody!
I'm about to start my first project with Arduino board, but before beginning I'd like to know if it's feasible and how much knowledge it requires.

I need to read from a VB.net software through Ethernet connection three temperatures from sensors located several meters from the board, as well as driving four low current relais.
I'd like to know:
- can i do it with one board?
- from a sketch programming point of view is it much complicated to transmit via Ethernet than USB?
- which sensor do you suggest? I read about LM35 and AD595. Remember the thermocouple must be placed severa meters from the board, need 0.1°C precision and the least complicated circuit - after all it's a DIY project :)

Thank you for the help!

MikMo

Ok let's see if i understand this correct.

You want to read some temperatures and control some relays with Arduino, and send the information to a VB.net application on a PC ??

You can read 3 temperatures an control 3 relays with one Arduino board. But to control the relays you need some extra components like (just a simple transistor and diode pr. relay).

Arduino does not have build in ethernet from the start, it can be added, but if the PC with the VB app. is close to the Arduino board, i would use the serial port.

The USB port on Arduino is actually not a USB port, but a serial port in disguise, which is good news for you because programming serial communication in VB.net is MUCH easier than programming USB stuff.

The LM35 sensor does (as far as i remember) not have the precision you need. The other one you mention i don' know.

Try to search the forum og the web for Arduino + tepmerature sensor
and Arduino + relay (or relais) to find more info

agent smith

Thank you MikMo!
You've understood exactly as I thought it.
What about the Ethernet shield module? As it's in mass production and already with a class in Arduino language, it should be quite easy to drive, altough not as a COM port...

MikMo

Ethermet is possible, but i don't understand what you need it for :-) unless your Arduino board wil be positioned far from the PC with the VB.net app.  Programming TCP/IP and all the other stuff required is much harder than using the built in serial port class in VB.net. Unless of course, you already have experience in that area (I don't).

agent smith

You're right.. it will be placed quite far from the PC controller and there's already an ethernet network in place.
I wonder if I can put the temperature sensors at least a few meters from the Arduino board or there's a need to keep together the thermocouple + temperature chip and reach the board with some digital bus or just an analogue voltage input (and i guess in this case I have to take account for the voltage drop)....

scootabug

I'm not that up to speed with the Ethernet breakout for the Arduino but TCP/IP has been simplified dramatically in Dot Net.  Especially if you just want server/client communication just using strings...plenty of samples on the Code Bank at www.vbforums.com.

I would still opt for serial though, it's exceptionally easy.  I wrote a little test application in under 3 minutes to test serial in and out with the Arduino via serial.

agent smith

I'm not an expert of TCP/IP but I suppose it's manageable when you have to send only few data like a temperature or a boolean value... it would be only one packet to manage.
But of course I'll start on serial :)

It seems now it's a good moment to order the board and get dirty the hands a little bit.. then I'll ask you more :D

Thank you MikMo and Scootabug for replying!

bi0m3trics

As other have said, I'm not exactly sure what you'll be using this for, but from beginning to end, I was able to get an arduino, 4 DS18S20+PAR (temp sensors), some 4.7k pull-up resistors, and a 20x4 lcd up and running in under 30 minutes using what I read here: http://forums.fungizmos.com/viewtopic.php?f=6&t=2

The sensors are cheap ($2-4 each, depending on where you buy them), use parasitic power, and you can even request free samples directly from Maxim here: http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2815  - click the "ordering info" link and you'll figure it out

Hope this helps!

agent smith

Thank you Bi0m3trics for reply!
seems very easy to use these devices. Do you have an idea how long can be the 1-wire bus in parasite mode?
Is it possible to run multiple 1-wire buses with just one sensor per bus?
I think the wires would be shorter.


A n00b question: If i put the Ethernet shield, the various Arduino input and output pins will be still free or some of them are used by the shield? In other words, is it possible to run both the Eth shield and the 1-wire bus?

FREAK0N

Hi, sorry to jump in with my question. but looks like you guys know about it :D
If i have a serial device, connected to a PC with a serial to Ethernet adapter, do i need to program reading from serial or from ethernet?

bi0m3trics

#10
Dec 18, 2008, 01:11 am Last Edit: Dec 18, 2008, 01:13 am by bi0m3trics Reason: 1
>an idea how long can be the 1-wire bus in parasite mode?
I've run a bus with two sensors (connected to a DS9490R) around 100 feet using one wire in Cat5E, and had no problems in parasitic mode.

>Is it possible to run multiple 1-wire buses with just one sensor per bus?
I've personally never needed more than 4 ds18s20 on a single bus. I've read of other getting like 5-7,8, and I've seen a post of on the OWFS site (http://owfs.sourceforge.net/WRT54G.html) where someone got 10 of them working on one bus.

This article is a good read too... http://hackaday.com/2008/12/10/parts-1-wire-temperature-sensor-ds1822/


>is it possible to run both the Eth shield and the 1-wire bus?
Depends on which ethernet shield you buy... the (official?) arduino shield uses digital pins 10-13 (SPI) to communicate with the W5100 on the ethernet shield. These pins cannot be used for general i/o, but the rest are open for business. Similarly, ladyada's uses digital pins 2-7 to connect to the XPort...


Grumpy_Mike

Quote
>Is it possible to run multiple 1-wire buses with just one sensor per bus?


I have done this but not on the Arduino but there is no reason why not.

Quote
do i need to program reading from serial or from ethernet


If it plugs into the PC as a serial device that's what it is programmed as. The Ethernet just acts as a physical conduit.

Sheldon Stokes

Careful, those DS18S20 chips do not meet your precision requirements.  They are 9 bit devices, and cover a 180 deg range for a precision of about 0.33 deg.  

Sheldon

Rusty in Texas

#13
Dec 18, 2008, 09:21 pm Last Edit: Dec 18, 2008, 09:22 pm by Fe2o3Fish Reason: 1
Careful Sheldon, that's not how the DalSemi part works.  You don't
simply divide 180° temp range by 9-bits (or 512) to get the device's
precision.  To quote the data sheet:
It has an operating temperature range of -55°C to +125°C and
is accurate to ±0.5°C over the range of -10°C to +85°C.


The 18S20 always reads to the nearest 0.5°C -- that's its default
precision.  Outside that range its precision is still 0.5°C but its
ACCURACY is more like 1.0°C or more depending on how far away
you get from the -10°C to +85°C range.

Now, tricks can be done with numbers from the device's scratchpad
memory to get the precision or resolution down to 1/16°C but the
accuracy is still to the closest 0.5°C.

'agent smith's requirement for 0.1°C precision can be met BUT... does
s/he want precision or accuracy???  There is a substantial difference!
Getting that level of accuracy can be costly and is not obtainable with
DalSemi's current list of temperature sensors.

ata

hello,
i have an ethernet shield associated to a freeduino board ,i want to read temperature over the internet , can anyone help me how to connect the three pin of the sensor DALLAS 18B20 directly to the board, is it correct to connect the first pin GND to GND, second pin DQ to analog 0, third pin VDD to 5 VOLT.and what about the full code that i must write in the Arduino Software to get access to the ip and read the temp.

Thank you very much in advance!


Go Up