Underwater ROV‎ > ‎Electronics‎ > ‎

Ethernet Shield

The Arduino Mega requires some tweaking to work with the Arduino Ethernet Shield. 
In order to use the ethernet shield, you have to bend some pins and edit the resource library.
Also, if you are doing the three pin hack, it's best to not have anything plugged into pin 53.


Here is a photo of the pins I soldered to the protoboard for plugging in servos and perhaps some Electronic Speed controllers.


Here is a photo of the ethernet shield being used with the compass and accelerometer.  After defining the pins properly, it was able to give web feedback.
I set a meta-refresh tag for the webpage, so it would reload automatically every second.


I then decided to mount the compass and accelerometer onto the protoboard.


After getting the compass and the accelerometer working with the ethernet shield, i was excited to test out the pressure gauge and the thermometer.  The pressure gauge was first (with tubing affixed in the above photo). 
  • MPX4250AP-ND            SENSOR ABS PRESS 36.3 PSI MAX
This forum post was very helpful, but ultimately the code from the SeaPerch project sensor suite was what I needed to understand the programming.
The ethernet output page looked like this:

After getting the pressure gauge working, I hooked up the thermometer. 
This blog was very helpful for sorting out the temperature programming for the Arduino.  Especially helpful was taking a sampling and averaging the temperature.  After doing some more research, the averaging isn't necessary.  More importantly, the DAC for the arduino needs to acclimatize to different voltages of various inputs, so doing a second read of the analog input is as accurate as the averaging.
  • LM35CAH-ND              IC SENSOR PREC CENT TEMP TO-46
 The total ethernet output of the digital signals at this point looks like this:

analog input Yaw: 607
Roll: 505
Pitch: 512
Compass bearing: 78
Pressure: 11.16 PSI 
Temperature: 26 Celcius 78 Fahrenheit 

After getting the two sensors working, I soldered some servo extensions that I sniped in half.  The plug ends of the servo extensions made nice connectors; enabling the unplugging of the pressure and temperature sensors, which will be affixed to the outer housing.




Arduino uses digital pins 10, 11, 12, and 13 (SPI) to communicate with the W5100 on the ethernet shield. These pins cannot be used for general i/o.
On the Mega, up to 12 servos can be used without interfering with PWM functionality; use of 12 to 23 motors will disable PWM on pins 11 and 12.

Comments