Overview
Both the AM312 and HC-SR505 are miniaturized versions of the classic HC-SR501, designed for applications where board space is limited. They maintain similar functionality while significantly reducing physical footprint.
Technical Specifications Comparison
| Parameter | AM312 | HC-SR505 |
|---|---|---|
| Dimensions | 10mm × 8mm | 12mm × 12mm |
| Operating Voltage | 2.7V – 12V | 4.5V – 20V |
| Operating Current | 35µA (standby) | 50µA (standby) |
| Output Voltage | 3.0V (HIGH) | 3.3V (HIGH) |
| Detection Range | 3-5 meters | 3-7 meters |
| Detection Angle | 100° | 120° |
| Delay Time | 2 seconds (fixed) | 3-5 seconds (fixed) |
| Operating Temp | -20°C to +60°C | -20°C to +80°C |
Detailed Analysis
Size and Form Factor
The AM312 is notably smaller at just 10×8mm, making it ideal for ultra-compact wearables and discreet installations. The HC-SR505, while still considered “mini,” offers a slightly larger footprint that can be advantageous for hand-soldering and prototyping.
Power Consumption
For battery-powered applications, the AM312 has a clear advantage with its 35µA standby current, nearly 30% lower than the HC-SR505. This difference can translate to weeks of additional battery life in continuous-operation scenarios.
Voltage Range
The AM312’s wider voltage range (down to 2.7V) makes it compatible with 3.3V systems like ESP8266 and Raspberry Pi without level shifting. The HC-SR505 requires at least 4.5V, making it more suitable for traditional 5V Arduino projects.
Detection Performance
The HC-SR505 offers slightly better detection range (up to 7 meters vs 5 meters) and wider detection angle (120° vs 100°). This makes it preferable for room-scale monitoring applications where coverage area is critical.
Pinout Comparison
AM312 Pinout (3 pins):
- Pin 1: VCC (2.7-12V)
- Pin 2: GND
- Pin 3: OUT (digital output)
HC-SR505 Pinout (3 pins):
- Pin 1: VCC (4.5-20V)
- Pin 2: OUT
- Pin 3: GND
Note the different pin ordering! Always verify pinout before wiring.
Application Scenarios
Choose AM312 When:
- Building battery-powered IoT sensors
- Working with 3.3V logic microcontrollers
- Space is extremely limited (<10mm board space)
- Power efficiency is the primary concern
- Fixed 2-second delay works for your use case
Choose HC-SR505 When:
- Detection range is critical
- Working with 5V Arduino systems
- Need wider coverage angle
- Slightly longer delay (3-5s) is acceptable
- Mounting in locations where larger size isn’t an issue
Wiring Examples
AM312 with ESP8266 (3.3V)
// AM312 connected to ESP8266
int pirPin = D1; // GPIO5
void setup() {
pinMode(pirPin, INPUT);
Serial.begin(115200);
}
void loop() {
if (digitalRead(pirPin) == HIGH) {
Serial.println("Motion detected!");
// Add your IoT code here
}
delay(100);
}
HC-SR505 with Arduino (5V)
// HC-SR505 connected to Arduino Uno
int pirPin = 2;
void setup() {
pinMode(pirPin, INPUT);
Serial.begin(9600);
}
void loop() {
if (digitalRead(pirPin) == HIGH) {
Serial.println("Motion detected!");
}
delay(200);
}
