AMS1117 3.3V Power Supply Module Documentation
The AMS1117 3.3V Power Supply Module is a compact and efficient voltage regulator module designed to provide a stable 3.3V output from a wide range of input voltages. This module is based on the AMS1117 linear voltage regulator, which is capable of regulating output voltage with high accuracy and low ripple. The module is suitable for use in a variety of IoT applications, including microcontroller-based projects, wireless sensor nodes, and other low-power devices.
Input voltage range: 4V to 12V
Output voltage: 3.3V 2%
Output current: up to 1A
High accuracy and low ripple output
Compact size: 15mm x 20mm
Easy to use, with only input and output terminals
The module has three terminals:
VIN (Input): Connect to a power source (4V to 12V)
VOUT (Output): Connect to the device requiring 3.3V power
GND (Ground): Connect to the ground of the power source and the device
### Example 1: Using the AMS1117 3.3V Power Supply Module with Arduino Uno
In this example, we will use the AMS1117 3.3V Power Supply Module to power an Arduino Uno board and a DHT11 temperature and humidity sensor.
// Define DHT sensor pin
#define DHTPIN 2
// Create a DHT object
DHT dht(DHTPIN, DHT11);
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
int h = dht.readHumidity();
int t = dht.readTemperature();
Serial.print("Humidity: ");
Serial.print(h);
Serial.println(" %");
Serial.print("Temperature: ");
Serial.print(t);
Serial.println(" C");
Connect the VIN terminal of the AMS1117 module to a 5V power source (e.g., a USB port or a battery)
Connect the VOUT terminal of the AMS1117 module to the VIN pin of the Arduino Uno board
Connect the GND terminal of the AMS1117 module to the GND pin of the Arduino Uno board
Connect the DHT11 sensor to digital pin 2 of the Arduino Uno board
### Example 2: Using the AMS1117 3.3V Power Supply Module with Raspberry Pi (Python)
In this example, we will use the AMS1117 3.3V Power Supply Module to power a Raspberry Pi and read data from a DS18B20 temperature sensor.
```python
import os
import time
# Define the DS18B20 sensor file
sensor_file = '/sys/bus/w1/devices/28-000007ebc9ea/w1_slave'
while True:
try:
# Read temperature data from the sensor
f = open(sensor_file, 'r')
lines = f.readlines()
f.close()
# Extract temperature value from the data
temp_c = float(lines[1].split('t=')[1]) / 1000.0
print("Temperature: {:.2f} C".format(temp_c))
# Wait for 2 seconds before reading again
time.sleep(2)
except Exception as e:
print("Error: ", e)
```
Connect the VIN terminal of the AMS1117 module to a 5V power source (e.g., a USB port or a battery)
Connect the VOUT terminal of the AMS1117 module to the Raspberry Pi's 3.3V pin
Connect the GND terminal of the AMS1117 module to the Raspberry Pi's GND pin
Connect the DS18B20 sensor to the Raspberry Pi's GPIO pins (data pin to GPIO 4, VCC to 3.3V, and GND to GND)
Note: Make sure to modify the code to suit your specific project requirements and hardware connections.