Rework wiring diagram for single-pole KCD11 switch
This commit is contained in:
+57
-45
@@ -4,8 +4,9 @@ This project uses one 18650 cell, a TP4056 charger module, an MT3608 boost
|
|||||||
converter, an Arduino Nano, and a ULN2003 driver board to power a 28BYJ-48
|
converter, an Arduino Nano, and a ULN2003 driver board to power a 28BYJ-48
|
||||||
stepper motor.
|
stepper motor.
|
||||||
|
|
||||||
A DPST switch controls the battery-to-boost path and independently disconnects
|
A single-pole KCD11 rocker switch turns the battery-to-boost path on and off.
|
||||||
the motor supply. The Arduino Nano clone used here has **no USB VBUS Schottky
|
Turning the switch off removes the boost input, so the whole 5 V rail (Nano and
|
||||||
|
motor) is unpowered. The Arduino Nano clone used here has **no USB VBUS Schottky
|
||||||
diode**, so the USB and battery-powered 5 V supply must not be connected to the
|
diode**, so the USB and battery-powered 5 V supply must not be connected to the
|
||||||
Nano at the same time.
|
Nano at the same time.
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ Nano at the same time.
|
|||||||
| 18650 Li-ion cell | Single cell, suitable holder or secure battery connection |
|
| 18650 Li-ion cell | Single cell, suitable holder or secure battery connection |
|
||||||
| TP4056 charger module | Use a protected module with separate `B+`, `B−`, `OUT+`, and `OUT−` terminals |
|
| TP4056 charger module | Use a protected module with separate `B+`, `B−`, `OUT+`, and `OUT−` terminals |
|
||||||
| MT3608 boost converter | Adjustable; set its output to 5.0 V before connecting the loads |
|
| MT3608 boost converter | Adjustable; set its output to 5.0 V before connecting the loads |
|
||||||
| DPST on/off switch | Both poles operate together |
|
| KCD11 rocker switch | Single pole, on/off; see the variant note below |
|
||||||
| Arduino Nano clone | This clone has no VBUS Schottky diode |
|
| Arduino Nano clone | This clone has no VBUS Schottky diode |
|
||||||
| 28BYJ-48 stepper motor | Use the 5 V version |
|
| 28BYJ-48 stepper motor | Use the 5 V version |
|
||||||
| ULN2003 driver board | Matches the motor’s 5-pin plug |
|
| ULN2003 driver board | Matches the motor’s 5-pin plug |
|
||||||
@@ -35,6 +36,23 @@ assume an unprotected TP4056 board provides battery over-discharge or
|
|||||||
over-current protection, and do not use its `B+`/`B−` pads as though they were
|
over-current protection, and do not use its `B+`/`B−` pads as though they were
|
||||||
protected `OUT+`/`OUT−` pads.
|
protected `OUT+`/`OUT−` pads.
|
||||||
|
|
||||||
|
### KCD11 switch variants
|
||||||
|
|
||||||
|
The KCD11 family ships in several contact configurations and often shares one
|
||||||
|
housing across them. Terminals labeled `1`, `1a`, and `1b` describe a single
|
||||||
|
pole with two throws; the unused throw may be molded into the housing with no
|
||||||
|
metal lug. This build needs only **one on/off pole with two usable terminals**.
|
||||||
|
|
||||||
|
On the switch used here, `1` is the **center lug (common)** and `1b` is the
|
||||||
|
populated throw; `1a` is an empty pocket and stays **unconnected**. Wire the two
|
||||||
|
switch wires across `1` and `1b`. A mechanical contact has no polarity, so
|
||||||
|
either wire may go to either lug.
|
||||||
|
|
||||||
|
Confirm the switch with a multimeter before wiring: there should be continuity
|
||||||
|
between `1` and `1b` when the rocker is on, and none when it is off. A single
|
||||||
|
pole is sufficient because the motor has no independent supply of its own (see
|
||||||
|
section 4).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 2. Power flow
|
## 2. Power flow
|
||||||
@@ -42,9 +60,9 @@ protected `OUT+`/`OUT−` pads.
|
|||||||
```text
|
```text
|
||||||
18650 ──► TP4056 protected battery/load terminals
|
18650 ──► TP4056 protected battery/load terminals
|
||||||
│
|
│
|
||||||
└── OUT+ ──► DPST Pole A ──► MT3608 ──► 5 V rail
|
└── OUT+ ──► KCD11 ──► MT3608 ──► 5 V rail
|
||||||
├── Nano 5V
|
├── Nano 5V
|
||||||
└── DPST Pole B ──► ULN2003 VCC
|
└── ULN2003 VCC
|
||||||
```
|
```
|
||||||
|
|
||||||
The TP4056 is a **charger**, not a 5 V power supply. Its `IN+`/`IN−` terminals
|
The TP4056 is a **charger**, not a 5 V power supply. Its `IN+`/`IN−` terminals
|
||||||
@@ -68,8 +86,9 @@ Charging input:
|
|||||||
USB GND ──► TP4056 IN−
|
USB GND ──► TP4056 IN−
|
||||||
|
|
||||||
Battery-powered load path:
|
Battery-powered load path:
|
||||||
TP4056 OUT+ ──[optional fuse]──► DPST Pole A common
|
TP4056 OUT+ ──[optional fuse]──► KCD11 terminal 1 (common, center lug)
|
||||||
DPST Pole A switched terminal ──► MT3608 IN+
|
KCD11 terminal 1b ──► MT3608 IN+
|
||||||
|
KCD11 terminal 1a (if present) ──► leave unconnected
|
||||||
|
|
||||||
TP4056 OUT− ──► common system GND
|
TP4056 OUT− ──► common system GND
|
||||||
MT3608 IN− ──► common system GND
|
MT3608 IN− ──► common system GND
|
||||||
@@ -79,8 +98,7 @@ Battery-powered load path:
|
|||||||
|
|
||||||
5 V and motor supply:
|
5 V and motor supply:
|
||||||
MT3608 OUT+ ──► 5 V rail ──┬──► Arduino Nano 5V
|
MT3608 OUT+ ──► 5 V rail ──┬──► Arduino Nano 5V
|
||||||
└──► DPST Pole B common
|
└──► ULN2003 VCC
|
||||||
DPST Pole B switched terminal ──► ULN2003 VCC
|
|
||||||
|
|
||||||
Control and motor:
|
Control and motor:
|
||||||
Arduino Nano D9 ──► ULN2003 IN1
|
Arduino Nano D9 ──► ULN2003 IN1
|
||||||
@@ -103,29 +121,24 @@ load.
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 4. DPST switch operation
|
## 4. KCD11 switch operation
|
||||||
|
|
||||||
The DPST switch has two electrically separate poles operated by the same
|
The KCD11 is a single-pole on/off switch in the battery-to-boost path, wired
|
||||||
handle:
|
across terminals `1` (center common) and `1b`:
|
||||||
|
|
||||||
- **Pole A:** connects TP4056 `OUT+` to MT3608 `IN+`.
|
- **ON (closed):** connects TP4056 `OUT+` to MT3608 `IN+`.
|
||||||
- **Pole B:** connects the 5 V rail to ULN2003 `VCC`.
|
- **OFF (open):** disconnects the battery from the boost input.
|
||||||
|
|
||||||
| Switch state | Pole A | Pole B | Result |
|
| Switch state | Contact | Result |
|
||||||
|---|---|---|---|
|
|---|---|---|
|
||||||
| **ON** | Closed | Closed | Battery powers the MT3608; Nano and motor receive 5 V |
|
| **ON** | Closed | Battery powers the MT3608; the 5 V rail feeds the Nano and ULN2003 |
|
||||||
| **OFF** | Open | Open | Battery is disconnected from the boost input; motor supply is disconnected |
|
| **OFF** | Open | Boost input is disconnected; the 5 V rail (and therefore the motor) is unpowered |
|
||||||
|
|
||||||
With Pole B open, the motor’s supply is physically disconnected even if the
|
The ULN2003 `VCC` is tied directly to the 5 V rail, so there is no separate
|
||||||
Nano is powered separately. The Nano itself can still be powered by USB when
|
motor cutoff. The motor is unpowered whenever the switch is off because the
|
||||||
the switch is off.
|
whole rail is dead. The Nano can still be powered over USB while the switch is
|
||||||
|
off; in that case the rail—and therefore ULN2003 `VCC`—is fed from USB. See the
|
||||||
Pole B disconnects only the ULN2003 `VCC`; it does not disconnect the driver’s
|
debug mode in section 6.
|
||||||
`IN1`–`IN4` signal wires or its ground. If the Nano is powered over USB while
|
|
||||||
Pole B is open, its outputs can still drive the ULN2003 inputs and draw input
|
|
||||||
current. For USB debugging in this state, hold the Nano in reset or disconnect
|
|
||||||
the `IN1`–`IN4` signal wires. The motor supply remains disconnected because
|
|
||||||
ULN2003 `VCC` is open.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -133,7 +146,7 @@ ULN2003 `VCC` is open.
|
|||||||
|
|
||||||
The MT3608 is adjustable; it is not a fixed 5 V supply.
|
The MT3608 is adjustable; it is not a fixed 5 V supply.
|
||||||
|
|
||||||
1. Turn the DPST switch **OFF**.
|
1. Turn the KCD11 switch **OFF**.
|
||||||
2. Leave the Nano and ULN2003 disconnected.
|
2. Leave the Nano and ULN2003 disconnected.
|
||||||
3. Connect the cell and measure MT3608 `OUT+` to `OUT−`.
|
3. Connect the cell and measure MT3608 `OUT+` to `OUT−`.
|
||||||
4. Adjust the module’s potentiometer until the output is **5.0 V**.
|
4. Adjust the module’s potentiometer until the output is **5.0 V**.
|
||||||
@@ -150,7 +163,7 @@ can deliver 2 A at 5 V.
|
|||||||
|
|
||||||
### Run from battery
|
### Run from battery
|
||||||
|
|
||||||
- DPST: **ON**
|
- KCD11: **ON**
|
||||||
- Nano USB: **unplugged**
|
- Nano USB: **unplugged**
|
||||||
- TP4056 charging USB: **unplugged**
|
- TP4056 charging USB: **unplugged**
|
||||||
|
|
||||||
@@ -158,31 +171,29 @@ The Nano and motor are powered from the MT3608’s 5 V output.
|
|||||||
|
|
||||||
### Charge the battery
|
### Charge the battery
|
||||||
|
|
||||||
- DPST: **OFF**
|
- KCD11: **OFF**
|
||||||
- TP4056 USB input: connected to a 5 V charger
|
- TP4056 USB input: connected to a 5 V charger
|
||||||
- Nano USB: **unplugged**
|
- Nano USB: **unplugged**
|
||||||
|
|
||||||
With Pole A open, the battery-powered load path is disconnected. Keep the Nano
|
With the switch open, the battery-powered load path is disconnected. Keep the
|
||||||
USB unplugged during charging as the conservative procedure.
|
Nano USB unplugged during charging as the conservative procedure.
|
||||||
|
|
||||||
### Debug over USB serial
|
### Debug over USB serial
|
||||||
|
|
||||||
- DPST: **OFF**
|
- KCD11: **OFF**
|
||||||
- TP4056 charging USB: **unplugged**
|
- TP4056 charging USB: **unplugged**
|
||||||
- Nano USB: connected to the computer
|
- Nano USB: connected to the computer
|
||||||
- Disconnect the MT3608 `OUT+` wire from the 5 V rail while debugging.
|
- Disconnect the MT3608 `OUT+` wire from the 5 V rail while debugging.
|
||||||
|
|
||||||
The Nano clone has no VBUS Schottky diode. Disconnecting the boost output during
|
The Nano clone has no VBUS Schottky diode. Disconnecting the boost output during
|
||||||
USB debugging avoids applying USB 5 V to the MT3608 output. Pole B remains open,
|
USB debugging avoids applying USB 5 V to the MT3608 output. With the switch open
|
||||||
so the ULN2003 motor supply is isolated.
|
the boost is off, but the ULN2003 `VCC` still follows the 5 V rail, which USB now
|
||||||
|
powers through the Nano’s 5 V pin. Hold the Nano in reset (or do not run the
|
||||||
|
sketch) so the driver does not drive the motor from USB.
|
||||||
|
|
||||||
**Never connect Nano USB while the DPST is ON.** In that state, the MT3608
|
**Never connect Nano USB while the KCD11 is ON.** In that state, the MT3608
|
||||||
supplies the Nano’s 5 V pin, which could back-feed the computer’s USB port.
|
supplies the Nano’s 5 V pin, which could back-feed the computer’s USB port.
|
||||||
|
|
||||||
With the DPST OFF during USB debugging, the signal pins remain connected to
|
|
||||||
ULN2003 `IN1`–`IN4`; hold the Nano in reset or disconnect those wires, as
|
|
||||||
described above.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 7. First power-on checklist
|
## 7. First power-on checklist
|
||||||
@@ -191,7 +202,7 @@ described above.
|
|||||||
2. Confirm the circuit ground goes to TP4056 `OUT−`; do not bridge `B−` to
|
2. Confirm the circuit ground goes to TP4056 `OUT−`; do not bridge `B−` to
|
||||||
`OUT−`.
|
`OUT−`.
|
||||||
3. With the switch OFF and loads disconnected, set the MT3608 output to 5.0 V.
|
3. With the switch OFF and loads disconnected, set the MT3608 output to 5.0 V.
|
||||||
4. Recheck polarity and wiring.
|
4. Recheck polarity and wiring, including the KCD11 continuity check.
|
||||||
5. Connect the Nano and ULN2003.
|
5. Connect the Nano and ULN2003.
|
||||||
6. Run from battery only with the switch ON and Nano USB unplugged.
|
6. Run from battery only with the switch ON and Nano USB unplugged.
|
||||||
|
|
||||||
@@ -209,9 +220,10 @@ described above.
|
|||||||
near the loads to help with supply dips. Observe its polarity.
|
near the loads to help with supply dips. Observe its polarity.
|
||||||
- Keep the Nano, MT3608, and ULN2003 grounds connected to the TP4056
|
- Keep the Nano, MT3608, and ULN2003 grounds connected to the TP4056
|
||||||
`OUT−`-referenced system ground.
|
`OUT−`-referenced system ground.
|
||||||
- Pole B isolates the ULN2003 motor supply only. It does not isolate the control
|
- The single KCD11 pole removes the whole 5 V rail when off, so there is no
|
||||||
inputs or ground, so it is not a complete electrical disconnection of the
|
independent motor-supply cutoff. During USB debugging the rail and ULN2003
|
||||||
driver board.
|
`VCC` are fed from USB, so hold the Nano in reset and disconnect the MT3608
|
||||||
|
`OUT+` wire.
|
||||||
- Do not charge and run the load simultaneously with this simple TP4056
|
- Do not charge and run the load simultaneously with this simple TP4056
|
||||||
arrangement. Supporting that requires a proper power-path/load-sharing
|
arrangement. Supporting that requires a proper power-path/load-sharing
|
||||||
design.
|
design.
|
||||||
|
|||||||
Reference in New Issue
Block a user