This small 3-pin module is easy to connect and provided the Ethernet device with all the current it might ever need. However the datasheet for the ENC28J60 states it can require 180mA of current when transmitting which is beyond the 50mA limit of the Pi’s onboard 3.3V regulator.įor this reason I decided to ensure my ENC28J60 was never starved of current and added a small 5V to 3.3V regulator (HK1117). Lots of people are happy using these devices powered directly from the Pi’s 3.3V pin. Whether this is adequate will depend entirely on the project you are building. Using the speedtest-cli utility I measured the speed of the network link to be between 3.15 and 3.7 Mbits/s. Here we can see the Pi is using the MAC address we set and has been given an IP address of 192.168.001.131 by my router. Which should give you an output looking something like : Once you are back at the command line you can check what IP and MAC addresses your Pi is using with : ifconfig With everything configured you can now reboot your Pi using: sudo reboot Start by creating the following file: sudo nano /lib/systemd/system/rviceĭescription=Set MAC address for ENC28J60 moduleīindsTo=viceĪfter=viceĮxecStart=/sbin/ip link set dev eth0 address b8:27:eb:00:00:01 If you have multiple devices using this technique you should make sure they are all unique and never clash with other devices on your network. If you need a consistent MAC address you have to set it in software. This may not bother you but could cause your router to keep allocating a different IP address. This means it is randomly generated every time the device is started. Unlike most other network devices you might have used in the past the ENC28J60 has no preset MAC address. Your Pi should connect to your network automatically. If you configured the SD card on a PC you can now insert it into the Pi and power-up. If you are working directly on the Pi you can now reboot : sudo reboot You should end up with a section in your config.txt looking like this: Then add the following line : dtoverlay=enc28j60 sudo nano /boot/config.txtĪnd delete the # character to leave : dtparam=spi=on Or it can be edited directly on the Pi if you have a keyboard and monitor attached. The config.txt file can be edited on any computer that can read the boot partition on the SD card. I recommend starting with a freshly imaged SD card using the latest version of Raspbian. You only need to edit the config.txt file and make two potential changes. This was due to a faulty bit of soldering on my Pi Zero header. You may notice in this photo that rather than use Pin 25 for Ground I used Pin 39. Given how light the Pi Zero and module are you may want to tape your cables to a surface to prevent them dragging your setup onto the floor. I connect mine to a network switch but you could connect directly to a spare port on your router. Obviously you should connect the ENC28J60 module to your network using an Ethernet patch cable. Pi HeaderĪs only 7 pins need to be connected you can connect the module to the Pi Zero using 7 cables. The module can be connected to the Pi’s GPIO header using female-female Dupont style jumper cables. Pay attention to the details when purchasing one so that you can connect it to the correct voltage. We’ll focus on how to set up WiFi in this post.Some modules require 5V while others will work with 3.3V. (more…) Setting up built-in WiFi on Raspberry Pi 3Īt the time of writing this post, the newest device in the Raspberry Pi universe was Pi 3, released on 29th February 2016, boasting a 64bit CPU, an onboard Bluetooth chip, and last but not least: onboard WiFi. the DHT11 or the more advanced DHT22 sensors. Home automation projects often there is a need to measure the temperature and humidity of the air. (more…) Temperature/humidity sensor DHT22 (AM2302) using AdafruitDHT There’s a feature in network cards, which allows to power on a PC if a certain “magic packet” is received on the physical (MAC) address of the network interface. (more…) Wake on LAN (WOL) your PC from Raspberry Pi I’ll show you how to use them “headless”. (more…) Enabling SSH and connect to your home WiFi with a headless Pi Zero WĬurrently there are two Raspberry Pi types which come with built-i WiFi modules: the Raspberry Pi 3 and the Raspberry Pi Zero W. There’s a way to allow your Pi to provide as much power to the connected USB devices as possible. Give more power to USB devices on Raspberry Pi
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |