Rotary safe lock with magnet :-)
Uses an ATtiny85 paired with an AFB-MR1A (aka AS5600) magnetic angular position sensor. The magnet is mounted under a rotary knob to capture a safe-type combination.
Magnetic rotary knob with a diametrical magnet rotating opposite the sensor.
Disc divided into 10 equal sectors → each digit = 36° (360° / 10).
ILS or push button triggers the microcontroller to wake up.
Detection of a valid mechanical movement sequence (left rotation, then right rotation, etc.).
Switch to code entry mode: the user turns the knob to form a digit (0–9).
Each digit is validated after a 1-second pause.
If a digit is incorrect: switch to security mode (mute + delay).
If the entire sequence is correct: unlock (relay activation).
If inactivity is too long or input is too long: return to sleep mode.
ATtiny85 with 1 MHz internal clock
PB2 (INT0): External interrupt via ILS sensor (detects approach to the button).
PB4: Activates the power supply to the position sensor (AS5600) via transistor. PB3 (ADC3): Analog angle reading.
PB1: Generates sounds via a buzzer.
PB0: Relay control (lock opening).
Power 5V or 3V3
See .pdf read me
//FR
Utilise un ATtiny85 associé à un capteur magnétique de position angulaire AFB-MR1A (alias AS5600)
L'aimant est monté sous un bouton rotatif pour saisir une combinaison de type coffre-fort.
Bouton rotatif aimanté avec un aimant diamétral tournant en face du capteur.
Disque découpé en 10 secteurs égaux → chaque chiffre = 36° (360° / 10).
ILS ou bouton poussoir déclenche le réveil du microcontrôleur.
Détection d’une séquence mouvement type mécanique valide (rotation à gauche, puis à droite, etc.).
Passage en mode saisie de code : l’utilisateur tourne le bouton pour former un chiffre (0–9).
Chaque chiffre est validé après une pause de 1 seconde.
Si un chiffre est faux : passage en mode sécurité (mute + délai).
Si la séquence entière est correcte : déverrouillage (activation relais).
Si inactivité trop longue ou saisie trop longue : retour en mode sommeil.
Alimentation 5V ou 3V3
Voir le .pdf lisez moi
BOOM:
ATtiny85
AFB-MR1A (AS5600)
Diametrical magnet
3 BC550 transistors (NPN)
1 1n4148 diode
1 buzzer
1 relay
1 10KΩ resistor
3 1KΩ resistors
Capacitors
1 100µF/16V
1 100nF
Discussion (0 commentaire(s))