Browse Source

Adding details

master
Dejvino 2 years ago
parent
commit
cf2476a018
2 changed files with 15 additions and 12 deletions
  1. +10
    -8
      README.md
  2. +5
    -4
      code.ino

+ 10
- 8
README.md View File

@@ -10,17 +10,19 @@ TODO: image of result

A microcontroller is powered from a 5V brick (always connected). It controls a set of relays, which in turn enable power to individual power sockets. Upon boot the microcontroller waits a few seconds before enabling each of the power sockets. Then it sits idly by until the next power outage. All of this is enclosed in an electrical distribution box.

Optionally a speaker is used to indicate the state of the power socket "boot" process. A circuit breaker may be added to guard the whole device from tripping the main circuit breaker in the building.

## Bill of Materials
- microcontroller (Arduino)
- multi-relay module
- 5V power brick
- electrical distribution box
- power sockets modules for the distribution box
- corded power plug
- microcontroller (MCU, Arduino)
- multi-relay module board
- 5V power brick (to power the MCU and relays)
- socket for the power brick
- electrical distribution box (safe housing for the whole device)
- power socket modules suitable for the distribution box
- corded power plug (for connecting the whole device to electricity)
- cables suitable for electrical wiring
- speaker (optional)
- circuit breaker (optional)
- circuit breaker module (optional)

TODO: image of internals



+ 5
- 4
code.ino View File

@@ -1,6 +1,6 @@
#define LOW_POWER_SLEEP
#define LOW_POWER_SLEEP // dependency: Adafruit SleepyDog

#define SLOW_START_DELAY 1000 // ms
#define SLOW_START_DELAY 5000 // ms
#define PIN_SPEAKER 12

#define RELAYS 8
@@ -37,8 +37,9 @@ void setup() {

for (int i = 0; i < RELAYS; i++) {
Serial.println("...");
delay(SLOW_START_DELAY/2);
beep(100, 10);
delay(SLOW_START_DELAY);
delay(SLOW_START_DELAY/2);
Serial.print("Starting ");
Serial.print(i+1);
@@ -56,7 +57,7 @@ void setup() {
delay(1000);
beep(210, 100);
beep(420, 100);
beep(560, 200);
beep(560, 500);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}


Loading…
Cancel
Save