Background: I have two Arduino clones, a Pro Mini 5v and a Nano v3. I've used these for interfacing with other basic inputs & outputs and haven't had any issues, however going into more advanced projects I hit a small snag.
I am trying to get the ENC28J60 module to work with a Nano v3 clone for a tweeting lemon tree but I can't get it to work. The module does not respond to ping and the example sketch doesn't work on he Nano. When I wire it exactly the same way to the Pro Mini (with the Arduino USB2SERIAL) . My connections are to pins 10,11,12,13 and 5v and GND on the microcontrollers and I am using this sample sketch:
I looked at the product pages for both and don't see any differences so I'm not quite sure why it works on the Pro Mini but not the Nano.
Anyone have a suggestion for troubleshooting this?
Those are almost the same.
Is there a power difference ? Since you use the 5V, I guess that the ENC28J60 module has a 3.3V regulator on board. Does one of the boards get more power than the other ?
The Arduino has to read the 3.3V data signal from the ENC28J60, and if the 3.3V is slightly lower, it might not work.
Can you make the led blink on the Nano board with the ENC28J60 connected ?
I can think of two other possibilities: The Nano clone is damaged, or you have bad wiring (for example a breadboard with bad contacts).
I did some measurements and saw different readings from the Pro Mini (higher) than the Nano (lower, 3.7 or so)...
I re-measured a 2nd time and the values were the same...Just for the heck of it, I re-wired a 3rd time but used the ICSP header instead of the pins and it's running fine now. I'm blaming it on user error or possibly bad user wiring...And if I triple check everything later and it's still not working maybe there's some internal wiring issues.
Using the actual pins....
Nano Module wired with 3.3V pin to power the ENC28J60 module...I read:
3.9V on the 5V pin on the Nano
2.7V on the 3.3V pin on the Nano
Nano Module wired with 5V pin
3.4 on the 3.3V pin on the Nano
Using the ICSP header:
Nano Module wired with 3.3V or 5V pin to power the ENC28J60 module...I read:
3.8 on the 5V pin on the Nano but it only works when connected to 3.3V on the ENC module....very interesting...Probably an issue with the Nano Clone.
just so you know, it's NOT ENOUGH to power the ENC28J60 with the 3V3 pin from the Nano - there's not enough juice, you need to power the Ethernet module separately. (or via the 5V and a voltage regulator TO the ENC28J60)
You tell me that a voltage regulator is on the bottom of the module, and you add a link to a module without voltage regulator. Let me write this again: that module does not have a voltage regulator.
You need 3.3V for the module, and the ENC28J60 is power hungry, so the 3.3V needs to be able to supply some current.
The Arduino Nano board does not have a voltage regulator for 3.3V but uses the 3.3V generated by FT232 (the FT232 produces 3.3V for the USB interface). That is certainly not enough current for the ENC28J60.
If you have enough 5V power, use a seperate voltage regulator for 3.3V for the ENC28J60 module. It can be as simple as a LM317.
EDIT: I was completely wrong. Many modules with 2x5 pins are 3.3V, and many modules with 2x6 pins have voltage regulator on other side, but not all of them.
This is on the bottom of my module. The one I grabbed from eBay actually has two sets of modules merged...The ENC28J60 is mounted two different ways in the photos. I have attached photos of my module.
Thank you for the good photos, that is a voltage regulator, shame on me
Do you power it with 5V then ? It seems that the 5V pin is outside your header.
The ENC28J60 is 5V tolerant, so if the chip has 3.3V, the SPI bus may be 5V signals.
The data from the ENC28J60 to the Arduino is only 3.3V and therefor not a good signal. But in most cases that is not a problem.
with the Nano, I found the only way I can get it to work is this:
I have to wire MOSI, MISO and CLK to the ICSP header, and the CS/SS pin to whatever pin I plan on using and I have to wire it to 5V to both Nano and module. I will verify that it works from 3.3V pin again but I don't think it does. It's interesting to me that I can't use the pins but can use the ICSP header
I am able to use the module with the UIP library but when I tried to switch my WIZNet5100 shield out for an ENC28J60 module in my Xively module i ran out of available space by about 5k.
The Nano 3.3V output is very weak, and the W5100 and ENC28J60 are very power hungry.
Only the Nano 5V to the 5V pin of the ENC28J60 module should work.
I don't know what you mean by the Xively module, but Ethernet shield, Wifi shield and SD library need a lot of memory.
Perhaps the EtherCard library uses less memory, but it is a totally different library and is only for small webpages.