Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 9
61  Using Arduino / Project Guidance / Looking for ideas on 19" rack mount for Arduino on: August 14, 2012, 02:44:10 pm
I am looking at creating a simple server room monitoring aruino and would like to place it in a 1U 19" rack in the server room.

The arduino is obviously small, and I would like to have 4 ethernet connectors on the front panel. Possibly with an LED display, which may or may not include buttons to control the display.

On the back I would like a power connector, and maybe another 4 or 8 ethernet connectors.

So my question is simply how can I make or purchase a "cheap" 19" 1U rack montable box to house this in that looks great?

The dimensions are obviously small

19" wide
1U Hight
6-10" deep

Since I want to put ethernet connectors on the front and back I will need a way to punch/cut the holes out but I would like to make it a professional looking unit and not one with wiggly hand cut lines.

Has anyone seen any products like this? or maybe some sort of plastic box that would work?

62  Using Arduino / Project Guidance / Re: beginner LED cube build, need help on: August 13, 2012, 02:06:18 pm
You have probably seen this Industructable

But it talks about the Arduino not being fast enough to run the animations due to the slow CPU speed of the maths involved.

Also this page (same article) talks about multiplexors for the IO

63  Community / Exhibition / Gallery / Re: Arduino Webserver with Temperature Monitor / Control on: August 12, 2012, 07:31:55 pm
Thanks Rob

Appreciate the quick response

64  Community / Exhibition / Gallery / Re: Arduino Webserver with Temperature Monitor / Control on: August 12, 2012, 02:29:44 pm
Hi looks good - I have a question on the PCB?

Did you order just one? or a few?

What was the cost? including shippping?

And who did it?

I want to get some board made but still not sure of where to get it done. I am in New Zealand.

Also what did you use for the board design?


65  Using Arduino / Project Guidance / Re: Temp DS18b20 + Humidity + Ethernet on: August 11, 2012, 04:44:27 pm
I went with my option #2

Here is the code I ended up with - it takes a while when the sketch starts up to read all the temperatures which could be handled in a better way but I am happy now as my ethernet web server response is instant (or close to it)

void checkTemperature()
        if (continueProcessingTemperatureMillis != 0)
if (millis() >= continueProcessingTemperatureMillis)
byte i;
byte present = 0;
byte type_s;
byte data[12];
byte addr[8];
float celsius;

present = ds.reset();[temperatureSensorToProcess]);   
ds.write(0xBE);         // Read Scratchpad

for ( i = 0; i < 9; i++) {           // we need 9 bytes
data[i] =;
//Serial.print(" CRC=");
//Serial.print(OneWire::crc8(data, 8), HEX);

// convert the data to actual temperature

unsigned int raw = (data[1] << 8) | data[0];
if (type_s) {
raw = raw << 3; // 9 bit resolution default
if (data[7] == 0x10) {
// count remain gives full 12 bit resolution
raw = (raw & 0xFFF0) + 12 - data[6];
} else {
byte cfg = (data[4] & 0x60);
if (cfg == 0x00) raw = raw << 3;  // 9 bit resolution, 93.75 ms
else if (cfg == 0x20) raw = raw << 2; // 10 bit res, 187.5 ms
else if (cfg == 0x40) raw = raw << 1; // 11 bit res, 375 ms
// default is 12 bit resolution, 750 ms conversion time
celsius = (float)raw / 16.0;

temperature[temperatureSensorToProcess] = celsius;

if (temperatureSensorToProcess >= temperatureSensorCount)
temperatureSensorToProcess =0;

nextTemperatureRead= millis() + MS_TEMPERATURE_DELAY;
continueProcessingTemperatureMillis = 0;
if (millis() >= nextTemperatureRead)
ds.write(0x44,1);         // start conversion, with parasite power on at the end

continueProcessingTemperatureMillis = millis() + 750;

66  Using Arduino / Project Guidance / Re: Temp DS18b20 + Humidity + Ethernet on: August 11, 2012, 04:07:14 pm
The amount of time needed for a DS18B20 conversion is dependent upon the resolution of the reading. By default this is 12 bits. If you use 9-bit resolution (half a degree precision) the delay is less than 100ms.

Thanks Pete.

After posting this I have had two thoughts.

1) Say I want to update every 10 seconds then if there is 4 sensors (10000 / 4) = 2500 so if the interval is >= 2500 process the next temperature - ie only do one at once and keep a counter of the last one I did.

2) I like this better

Like #1 above but while waiting just set a flag to say I am waiting and then exit the function so the rest of the loop can process. Then next call to the function I check if the flag is set if so then has 750ms passed? if it has then process the value of the temperature clear the flag and continue with the method in #1.

I think I will try this out - I will post back my findings.

67  Using Arduino / Project Guidance / Temp DS18b20 + Humidity + Ethernet on: August 11, 2012, 03:52:50 pm
I am creating a project that will monitor humidity and 1 to 10 temperature sensors and have a simple ethernet interface.

I have the project working but I am not happy with the way I have implemeted it.

Basically I poll for DS18B20 devices in setup() and then in the loop

    Check Humidity();
    Check Temperature();
    Check Ethernet()

In the Humidity and Temperature function I only do a check if it has been at least 10 seconds since the last check.

The humidity is fine as it is quick. The problem is with the DS18B20 devices as the library I am using and generally most must issue a 1Wire command and then wait 750ms before looking for the answer.

Not too bad if you have 1 device, but if you have 10 then that alone is 7.5 seconds

If you make an ethernet lookup you my be waiting 7.5+ seconds for an answer due to the temperature lookups.

Is there a way that the temperature lookup can be done in the background? is there such a thing as real background processes?

Is using the Timer() and Timer2() really background processes? or does the loop() just stop while the code in the timer interrupt runs?

Should I be updating only 1 temperature probe every time through the loop if the right amount of time has passed?


68  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield v1.1 and DHT11 humidity conflicts? on: August 10, 2012, 05:44:55 am
Yes looks like it is all happy now - thanks for helping me

69  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield v1.1 and DHT11 humidity conflicts? on: August 09, 2012, 11:44:04 pm
Wrong assumption.  The Ethernet Shield 1.0 uses D2 for Interrupt.  Try D3 through D9.

Great news - I will try when I get home - I will be very happy then


70  Using Arduino / Networking, Protocols, and Devices / Ethernet Shield v1.1 and DHT11 humidity conflicts? on: August 09, 2012, 06:23:11 pm
I have got an early Ethernet Shield v1.1 working today but as soon as I added a DHT11 Humidity Sensor I noticed some conflicts where the humidity sensor could not be read.

The Ethernet library here is what I am using.

I ran a simple sketch to read the DHT Sensor called DHTtester without the Ethernet library (Ethernet shield connected still) and it runs 100% with no errors or failures to read.

My DHT sensor is connected to Digital input PIN2 on the Arduino Duemilanove which I "assume" the Ethernet does not use?

My loop() reads the Humidity sensor and then checks Ethernet so both are not occurring at the same time.

I am actually only reading the humidity sensor once every 10 seconds.

Any help appreciated.


71  Using Arduino / Project Guidance / Re: 5v down to 3.3v for 3.3v sensitive devices on: August 09, 2012, 01:15:20 pm
You need a regulator for 3.3v, but the Arduino's usually provide that.  You can get by with a resistor divider for data lines in some cases, but a level converter is a better general choice.

Thanks for the advise, do you have a recommendation on a particular device?

I will do some searches myself now so I can get familar.


72  Using Arduino / Networking, Protocols, and Devices / [SOLVED] Arduino Duemilanove - Ethernet Shield 1.1 - LocalIP() = on: August 09, 2012, 12:58:53 pm
Thanks for your advise - I did some more searching and found that I am using a cheap clone card with a Microchip ENC28J60 chip?

I think that this is not as powerfull as the new 5100 versions.

I found a library here which works.

Thanks again - I have now purchased a new shield from EBAY - it doesn't look like the latest on Arduino site but it uses the 5100 chip.

73  Using Arduino / Project Guidance / 5v down to 3.3v for 3.3v sensitive devices on: August 09, 2012, 12:56:03 pm
Just a simple question

If I  am using a 5v arduino and my sensor or device requires 3.3v for power + data lines what is the best way to do this?

Should one just use a voltage divisor with 2 resisters?

Should one use a 3.3v regulator for the power + 2 resisters for the data lines?

Should one use a 3.3 volt regulator for eveything?

Is there something else you should use?

I am just wondering as I have really only used the 3.3v line from Arduino + 2 resisters but is that a good method? Doesn't this waste energy as heat? Especially when running from battery power?

74  Using Arduino / Programming Questions / Re: Problems passings strings to function with variable args on: August 09, 2012, 02:28:15 am
You can't pass String types to *printf functions.  It does not know about the String type.  Instead you have to convert String back to a char array, and pass that to your function and use %s with it.

After reading this i found that I could simply change my array and it is all happy now

static char *XMLTagStrings[] = {


75  Using Arduino / Networking, Protocols, and Devices / [SOLVED] Arduino Duemilanove - Ethernet Shield 1.1 - LocalIP() = on: August 09, 2012, 02:17:01 am
I have never done anything with Arduino and Ethernet.

I have plugged in an ethernet shield and my network is on 192.168.2.x

The cable works fine issuing a DHCP address to my laptop.

But my arduino returns in the setup routine (Ethernet.LocalIP()) and does not answer on the configured IP Address. I have chosen some random Mac Addresses incase of unknown conflict.

The Green LED on the Ethernet plug on the shield is lit. And the orange led is flickering so there is life. Also the power led on the ethernet board is lit.

I am using Arduino IDE 1.0.1

I am really not sure what to do?

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDD, 0xAD, 0xBE, 0xEF, 0xFE, 0xEE };
IPAddress ip(192,168,2, 197);

EthernetServer server(80);

void setup()

Serial.println("Ethernet Begin");
   Ethernet.begin(mac, ip);

Serial.print("server is at ");

void loop()

  /* add main program code here */
// Is there any client requests?
// listen for incoming clients
EthernetClient client = server.available();
if (client) {
Serial.println("new client");
// an http request ends with a blank line
boolean currentLineIsBlank = true;
while (client.connected()) {
if (client.available()) {
char c =;
// if you've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so you can send a reply
if (c == '\n' && currentLineIsBlank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connnection: close");
client.println("<!DOCTYPE HTML>");
// add a meta refresh tag, so the browser pulls again every 5 seconds:
client.println("<meta http-equiv=\"refresh\" content=\"5\">");
// output the value of each analog input pin
for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
int sensorReading = analogRead(analogChannel);
client.print("analog input ");
client.print(" is ");
client.println("<br />");      
if (c == '\n') {
// you're starting a new line
currentLineIsBlank = true;
else if (c != '\r') {
// you've gotten a character on the current line
currentLineIsBlank = false;
// give the web browser time to receive the data
// close the connection:
Serial.println("client disonnected");


Any help appreciated.

Pages: 1 ... 3 4 [5] 6 7 ... 9