ERD 5V 2.4A Adapter with MicroUSB Cable
ERD 5V 2.4A Adapter with MicroUSB Cable
The ERD 5V 2.4A adapter with MicroUSB cable is a compact, high-efficiency power adapter designed to provide reliable and efficient power supply to a wide range of devices, including IoT devices, smartphones, tablets, and other portable electronics. This adapter is an essential component for powering devices that require a stable 5V DC power source.
The ERD 5V 2.4A adapter with MicroUSB cable serves as a power adapter that converts AC (Alternating Current) power from a wall outlet to DC (Direct Current) power for devices that require a stable 5V power supply. The adapter's primary function is to |
100-240V, 50-60Hz
5V 5%
Up to 2.4A
80%
40mm x 25mm x 15mm (L x W x H)
Approximately 40g
0C to 40C
-20C to 85C
5% to 95% RH (non-condensing)
The ERD 5V 2.4A adapter with MicroUSB cable is suitable for powering a wide range of devices, including |
IoT devices (sensors, actuators, and gateways)
Smartphones and tablets
Wearable devices (smartwatches, fitness trackers, and headphones)
Portable electronics (e-readers, handheld games, and portable chargers)
Other devices requiring a stable 5V DC power supply.
ERD 5V 2.4A Adapter with MicroUSB Cable Documentation
Overview
The ERD 5V 2.4A adapter with MicroUSB cable is a compact and efficient power supply component designed for various Internet of Things (IoT) projects. It provides a stable 5V output with a maximum current of 2.4A, making it suitable for powering microcontrollers, single-board computers, and other devices that require a reliable power source.
Technical Specifications
Input Voltage: 100-240V AC, 50-60Hz
Output Voltage: 5V DC
Output Current: 2.4A
Cable Type: MicroUSB
Cable Length: 1.5m
Efficiency: >80%
Operating Temperature: 0C to 40C
Code Examples
### Example 1: Powering a Raspberry Pi with Python
In this example, we will demonstrate how to power a Raspberry Pi using the ERD 5V 2.4A adapter and use Python to control an LED connected to one of the GPIO pins.
Hardware Requirements
Raspberry Pi (any model)
ERD 5V 2.4A adapter with MicroUSB cable
LED
1k resistor
Breadboard and jumper wires
Software Requirements
Raspbian OS (or any other OS compatible with Raspberry Pi)
Python 3.x
Code
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Define the LED pin
LED_PIN = 17
# Set up the LED pin as an output
GPIO.setup(LED_PIN, GPIO.OUT)
try:
while True:
# Turn the LED on
GPIO.output(LED_PIN, GPIO.HIGH)
time.sleep(1)
# Turn the LED off
GPIO.output(LED_PIN, GPIO.LOW)
time.sleep(1)
except KeyboardInterrupt:
# Clean up GPIO on exit
GPIO.cleanup()
```
Explanation
In this example, we use the ERD 5V 2.4A adapter to power the Raspberry Pi. We then use Python to control an LED connected to GPIO pin 17. The code sets up the GPIO mode, defines the LED pin, and sets it up as an output. The program then enters an infinite loop, turning the LED on and off with a 1-second delay between each state.
### Example 2: Powering an ESP8266 NodeMCU Board with MicroPython
In this example, we will demonstrate how to power an ESP8266 NodeMCU board using the ERD 5V 2.4A adapter and use MicroPython to blink an onboard LED.
Hardware Requirements
ESP8266 NodeMCU board
ERD 5V 2.4A adapter with MicroUSB cable
Software Requirements
MicroPython firmware ( flashed on the ESP8266 board)
Code
```python
import machine
import time
# Define the onboard LED pin
LED_PIN = 2
# Set up the LED pin as an output
machine.Pin(LED_PIN, machine.Pin.OUT)
while True:
# Turn the LED on
machine.Pin(LED_PIN, machine.Pin.HIGH)
time.sleep(0.5)
# Turn the LED off
machine.Pin(LED_PIN, machine.Pin.LOW)
time.sleep(0.5)
```
Explanation
In this example, we use the ERD 5V 2.4A adapter to power the ESP8266 NodeMCU board. We then use MicroPython to control the onboard LED. The code defines the LED pin, sets it up as an output, and enters an infinite loop, turning the LED on and off with a 0.5-second delay between each state.