Tag Archives: Arduino

Arduino: Ethernet with ENC28J60

The two main approaches for connecting an Arduino to an Ethernet network are the “normal” Ethernet shield or a module based on the ENC28J60 chip. While the Ethernet shield is easier to start with, it is comparatively expensive and also of little use for the smaller Arduino models (e.g. Arduino Nano or Pro Mini).

p1020887a

In contrast the ENC28J60 modules are cheap, small, and universally connectable. This comes, however, with the small downside that they are not supported by the Arduino IDE out-of-the-box. Of course, there is a myriad of web pages out there that deal with it in one aspect or another. There are two reasons why I add yet another:

  • My ENC28J60 module (bought from AliExpress) is slightly different from the one usually seen. It does not need 3.3 volts but 5 volts, so the product description is wrong in that respect. Also, unlike all the other modules I have seen, it does not come with 10 but 12 connections.

    p1020877

  • The usual recommendation for the library is EtherCard, but this did not work for me.

What finally worked for me was using the UIPEthernet library, which can also replace the standard Arduino Ethernet library. I connected the ENC28J60 module with a recently purchased Arduino Nano v3 clone using the following connections

Arduino Nano ENC28J60
SS (Pin 10) CS
MOSI (Pin 11) SI
MISO (Pin 12) SO
SCK (Pin 13) SCK
5V 5V
GND GND

The Arduino Nano pin layout can be found here. The ENC28J60 module module offers a few more connections, as can be seen on the photo below. However, I used only the “usual suspects”.
p1020883a

The next step is to put this thing to use. I am currently planning some kind of data logger for 433 MHz signals, that are typically used for entry-level remote control purposes.

Arduino Pro Mini: stk500_recv(): programmer not responding

Today I joined the many who have issues to program an Arduino Pro Mini or, like in my case, a clone thereof. The error message very many people seem to get is

stk500_recv(): programmer not responding

There is an awful lot of stuff on the web how to solve this and I have tried to compile them in a list for others so that they can check:

  • Programmer’s driver not installed on PC
  • Arduino does not have a bootloader installed
  • Arduino has other CPU compared to how it was sold
  • Speed of serial port does not match with what Arduino expects
  • USB-to-serial adapter has no DTR line
  • RX and TX line labels mixed up on the board
  • Faulty USB-to-serial converter (brand new CP2102 in my case)

In my case, however, it was even worse. Several of my clone board’s header connections were actually not connected! And among them was TX, so the error message was quite right.

What I did was download the datasheet from Atmel, identify my pin configuration from page 3, and start measuring connections. What I found was that TX on the six-pin header was not connected properly, while it was ok on the twelve-pin header. Also, GND was not connected on the bottom twelve-pin header.

Update Jan 06, 2017: The not connected GND pin was actually my own (soldering) fault.

ESP8266 and Stability of NodeMCU Firmware

For someone like me who comes from a non-embedded background (I specialize in things like EAI, SOA, etc.) the ideas of the NodeMCU firmware are really appealing. A nice scripting language, a slick GUI for rapid prototyping (ESPlorer) together with a highly active community seemed a perfect fit.

Unfortunately it did not work for me. The whole setup was unstable and I spent many hours to get a prototype (WiFi and MQTT connection) working reliably. I failed miserably with erratic behavior of the system. Sometimes a code change was “detected”, sometimes the old code was still executed. Compiling helped often but not always.

There are others who made the same experience and obviously spent more time on trying as well as the write-up (e.g. this link). I will now experiment with the Arduino IDE extension.

I feel happy for all those people who use NodeMCU without issues and hope to rejoin them as soon as possible!