Ethernet has traditionally been a complex interface. All Ethernet chips up until now have had 100 pins or more, making them difficult to find in small quantities and challenging to use with microcontrollers that have limited memory. Microchip has revolutionized this with their new ENC28J60 Ethernet chip, which opens up a wide range of new applications. It allows for the easy construction of small devices that can be distributed throughout a home and connected to Ethernet. The ENC28J60 from Microchip is a remarkable chip that combines Tx/Rx, MAC, and PHY functionalities in one compact chip with minimal external components required—essentially just a crystal and an Ethernet transformer, also known as magnetics. This chip comes in a convenient 28-pin DIP package, making it easy to solder and ideal for hobby applications. The microcontroller can control various hardware components, such as sensors (light, temperature), relays, and LCD displays. This initial article will cover building generic hardware with multiple I/O interfaces and analog-to-digital converter inputs, focusing on controlling a small relay to switch devices on or off. Future articles will explore more advanced applications using the same hardware. The main focus here is to present the circuit diagram and explain the software, utilizing a UDP application to send commands to the microcontroller, enabling it to switch the relay. Implementation of TCP is also a possibility, allowing control via a web browser, although this has not yet been tested. The circuit diagram is straightforward and follows standard practices for the ENC28J60. The polarity of LED-B is crucial as it determines the chip's duplex operation, with standard half-duplex being suitable for devices with low traffic. A relay can be connected to connector CONN3, and diode D1 is essential for protecting the circuit against high voltages induced by the relay coil. For larger relays, a resistor should be added in parallel to mitigate voltage spikes. When using a 9V raw DC supply with a 6V relay, a small series resistor may be necessary. The "IO-ports" and "Analog-IN" connectors are reserved for future enhancements. The project primarily utilizes CONN3. Ethernet demands considerable current, especially with longer cables, with the circuit drawing approximately 200mA at 3.3V. The LM2937-33 voltage regulator requires cooling if the supply voltage exceeds 5V. The ENC28J60 needs a transformer with a 1:1 turn ratio certified for 10base-T, and "Magjack" RJ45 connectors with integrated magnetics and optional LEDs are recommended. A small filter coil (L1) is also required. It is noted that diode D1 was incorrectly connected to ground instead of Vdd, a mistake that went unnoticed.
The ENC28J60 Ethernet controller is a robust solution for integrating Ethernet capabilities into small-scale projects. Its design simplifies the complexities traditionally associated with Ethernet interfaces. The chip's integration of MAC, PHY, and Tx/Rx functionalities reduces the overall component count, making it not only cost-effective but also space-efficient. The 28-pin DIP package is particularly advantageous for hobbyists and developers who often work with prototyping boards.
In the described circuit, the relay connected to CONN3 acts as a switch for external devices, allowing for control over various applications such as lighting or heating systems. The inclusion of diode D1 serves as a flyback diode, preventing back EMF generated by the relay coil from damaging the microcontroller and other components. This protective measure is critical for maintaining the longevity and reliability of the circuit.
For projects requiring more advanced functionality, the reserved "IO-ports" and "Analog-IN" connectors provide flexibility for future enhancements, such as integrating additional sensors or actuators. The use of UDP for communication allows for lightweight data transmission, suitable for applications where real-time interaction is not critical. The potential for implementing TCP would enable more complex interactions, such as remote access through web interfaces, significantly expanding the usability of the device.
The power requirements and thermal management considerations are also important aspects of the design. The LM2937-33 voltage regulator must be adequately heatsinked if the input voltage exceeds 5V, which is a common scenario in many applications. This ensures stable operation under varying load conditions.
Overall, the ENC28J60 Ethernet chip, combined with careful circuit design, provides a powerful platform for developing networked devices with minimal complexity and maximum flexibility. The outlined project serves as a foundational step toward exploring the capabilities of this chip in various applications.Ethernet has traditionally been a quite complex interface. All Ethernet chips until today had 100 pins or more, where difficult to find in small quantities and difficult to use from a small microcontroller with little memory. Microchip has changed the world with their new ENC28J60 Ethernet chip! This opens a whole world of completely new applicati ons. You can easily build small devices which can be spread all over the house and simply connected to ethernet. The ENC28J60 from Microchip is a fantastic chip. It has Tx/Rx, MAC and PHY in one small chip. There are very few external parts. Basically just a crystal and an Ethernet transformer, aka magnetics. All this comes in an convenient 28-pin DIP package. Easy to solder and perfect for hobby applications. The microcontroller can then control any hardware you like: You can attach some sensor (light, temperature), you can switch on an off something you can attach a LCD display, etc.
In this first article we will build a generic hardware with lots of IO interfaces and analog to digital converter inputs. We will however only control a small relay to switch on or off something. In later articles we can then use the same hardware and do more complicated things. The main purpose is to show here the circuit diagram and explain the software. We use a UDP application to send commands to the microcontroller. Those commands will then cause the microcontroller to switch on or off the relay. It think it will be possible to even implement TCP. The current UDP software is less than 3k bytes and that is not even half of the memory on an Atmega88.
TCP would then allow us to control the device via a web browser. I have however not tried it yet. Here is the circuit diagram. Most of it is very straight forward and standard for the ENC28J60. The polarity of LED-B is important as it determines the duplex operation of the chip. Standard Half-duplex is what makes most sense for a device which will send and receive only rather little traffic. Figure 2: Circuit diagram (click on the drawing to get a printable pdf version). The circuit diagram of the previous hardware version can be found in the download section A relay can be connected to connector CONN3.
Note the diode D1. It is not useless and it is not the wrong way round in the circuit diagram even though it looks like that. It is there for those who plan to connect a small 6V relay on that output. It protects the whole circuit against the possibly very high voltages which can be induced by the coil of a relay.
If you use a relay with a large coil then you should also add a resistor in parallel to the relay (e. g 1K or 2. 2K). The diodes have a finite response time and such a resistor will prevent the voltages to raise too fast before the diode cuts them.
If you plan use 9V raw-DC (or maybe more) in combination with a 6V relay on CONN3 then you can add a small resistor (e. g 33 Ohm, you have to experiment) in series to the relay to compensate for the higher voltages. The connectors named "IO-ports" and "Analog-IN" are not used for now. They are meant for future functionality which will be described in later articles. We will only use CONN3 in this project. Ethernet requires quite high currents because it can be used with rather long cables. The above circuit consumes about 200mA at 3. 3V. The LM2937-33 needs therefore cooling if the supply voltage is more than 5V (on Raw-DC-In). A small piece of aluminium is normally enough. The ENC28J60 requires a transformer with a turn ratio of 1:1 certified for 10base-T. There are some very nice RJ45 connectors called "Magjack" which have already integrated magnetics and optionally integrated LEDs.
In addition you need a small filter coil (L1 in the schematic). A 5mm ferrite bead with 5-7 turns of thin wire seems to work well. The diode D1 was incorrectly connected against GND instead of Vdd. Interestingly nobody noticed that fault. The wrongly connect 🔗 External reference
Two inverters, one resistor, and one capacitor are sufficient to create an HC(T)-based oscillator that operates reliably up to approximately 10 MHz. The use of two HC inverters results in a fairly symmetrical rectangular output signal. In this configuration,...
A more affordable method to create or purchase a device that offers similar functionality. It does not necessarily need to be remote-controlled if it can be programmed to activate at specific times.
This description suggests the development of a cost-effective...
The Joule Thief is a straightforward and uncomplicated device, yet its functionality is remarkable. It can utilize a battery that is otherwise deemed unusable in any other electronic device, and it is very easy to construct on a breadboard...
The following circuit illustrates a Bass and Treble Controller Circuit. This circuit is constructed based on the classic Baxandall tone control circuitry.
The Bass and Treble Controller Circuit is designed to adjust the low and high-frequency response of audio signals,...
The FT232RL USB to Serial UART (TTL) Adapter is an affordable and straightforward solution for connecting PIC, AVR, or ATMEGA microcontrollers to a PC or Mac via a USB interface. The FT232RL chip is noteworthy for its compliance with...
A telephone line-based audio muting and light activation circuit. Frequently, when listening to music or watching television at elevated volume levels, it becomes difficult to hear a telephone ring, resulting in missed important calls.
This circuit is designed to address...
Warning: include(partials/cookie-banner.php): Failed to open stream: Permission denied in /var/www/html/nextgr/view-circuit.php on line 713
Warning: include(): Failed opening 'partials/cookie-banner.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/nextgr/view-circuit.php on line 713