close






Ethernet Shield for Arduino Mega         



If you plan to use the current Ethernet Shield (ENC28J60 version, not the official Wiznet W5100 version, but the theory should be the same) in the market on Arduino Mega, the most annoying problem is that the shield is not pin compatible with Mega.
This is because the SPI related pins of Arduino Mega are not situated at D10~D13 as Arduino Duemilanove, they are at D50~D52 instead. So The current Ethernet shields are not plug-n-play on Arduino Mega.

In order to solve this problem, the most obvious solution is to redirect the SPI pins of Arduino Mega to where the Ethernet shield expects them should be. Fortunately, the Ethernet shield has ICSP pins which are actually connected to the SPI signals (but without /SS) of the MCU. So this makes the task even simpler. The only things we need are a 6-pin cable and a 6-pin extension pins for the hardware workaround.



This is the DIY 6-pin jumper cable which is used for redirecting the SPI signals from Arduino Mega to the Ethernet shield. Actually, only 4-pins are used.






And the male 2x3 header pins for connecting the Arduino Mega D50~D53 & GND.





Plug the 2x3 male header pins into the D50~D53 & GND of Arduino Mega.






Then plug the jumper cable into place. Note the pin assignment of both sides are not the same.





Closer look.




There is another problem with the Ethernet shield, the RJ45 socket.
The socket is higher than the Arduino female socket, which means that if you stack a shield on top the the Ethernet shield, you are bound to hit the RJ45 socket before you can fully insert the male pins.

So here comes the solution, female header pins with long legs.








With these extra female headers, I got plenty of room between the Ethernet shield and the shield which is going to be staked on it.















This is how it looks when the DemoShield is stacked on it.





Neat, isn't it?






I'm running Ethernet remote temperature and humidity monitoring test (URL  http://galileosky.dyndns.info/) with this configuration. The temperature and humidity sensor module is not shown here.

In the next post, I will show you how I modified the software to add the support for Arduino Mega and why I don't have to cut the connection between the Ethernet shield and D10~D13 of Arduino.

Have fun!











arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Galileo 的頭像
    Galileo

    Galileo's Sky

    Galileo 發表在 痞客邦 留言(0) 人氣()