← Library

Build It Brigade

Switch It Up

The Dark Path Problem

The garden shed behind the Gearwich Public Library had a brand-new problem.

Actually, it had two problems. First, Ms. Ortega had started coming back to the library late at night to work on the town's new storytime schedule. Second, the path from the library to the shed was completely dark after sunset.

"Walking to the shed at night is like walking into a shadow monster's mouth," Cleo announced, flinging open the shed door the next morning. "I nearly tripped over the garden hose three times!"

"You tripped over it once," Dev said, looking up from his materials chart. "The other two times you tripped over the same spot after you got up."

"That's because it was STILL there!" Cleo waved her yellow notebook. "We need a light. But we can't leave it on all night — that wastes electricity. We need it to turn ON when someone walks to the shed."

Bea was already kneeling by the shed door, examining the frame. "There's a hook here. For the gate. Gate opens, light goes on?"

"Exactly!" Cleo drew a quick sketch in her notebook: a gate, a path, a light, and lots of arrows. "The gate opens, the light turns on. The gate closes, the light goes off. Simple!"

Rafi was reading the back of a lightbulb box he'd found on the workbench. "Simple," he repeated, "until you think about what kind of switch can tell whether a gate is open or closed." He flipped the box over. "There are, like, four different ways to do this."

The whiteboard at the front of the shed was still blank from yesterday's project. Cleo picked up a marker.

"The problem," she said, writing in big letters, "is that we need a switch that knows when the gate opens."

She underlined the word switch twice.

"I didn't know switches could know things," Bea said.

"They can't," Dev said. "They can only complete a circuit or break a circuit. That's all a switch does. It's a gate for electricity."

"Then we need the right gate," Cleo said. "Let's go ask Old Sal."


Four Kinds of Gates

Sal's Supply smelled like sawdust and metal and the dusty particular smell of a hundred small things in jars. Old Sal was at the counter, sorting screws into a wooden tray.

"Four kinds of switches for a gate," he said, not looking up. "You've got your toggle." He held up a small flip switch. "Click-clack. You flip it, it stays flipped. Not much sense in that for a gate."

"Why not?" Bea asked.

"The gate doesn't flip itself," Sal said. "You'd need someone to remember to flip it. Someone who's carrying books and trying to unlock a shed door."

Cleo nodded. "What else?"

"Pushbutton." Sal held up a round button. "You press it, the circuit closes. Release it, the circuit opens. Good for doorbells. But the gate isn't a button you press."

He reached under the counter and brought out a small rectangular box with two wires coming out of it. "Magnetic switch. Two parts. One part has a magnet inside. When the two parts are close together, the magnet pulls a little metal strip closed inside the box. Circuit is complete. When the parts move apart, the strip springs open. Circuit breaks."

Dev leaned in close. "So if you put one part on the gate and one part on the fence post..."

"Then when the gate closes, the parts come together and the circuit is complete," Sal said. "When the gate opens, the parts separate. Circuit breaks. The light knows."

"Knows WHAT?" Cleo asked.

"That the gate is closed," Sal said. "But here's the thing — you said you want the light to go ON when the gate OPENS. That's the opposite. The magnetic switch breaks the circuit when the gate opens. So you'd need the light to go on when the circuit is BROKEN, not when it's complete."

"That doesn't make sense," Cleo said. "How can breaking something turn something on?"

Sal smiled and slid the magnetic switch across the counter. "It made sense to the first engineer who figured it out. That's the question you need to answer."

"There's a fourth kind, too," Rafi said. He tapped the sheet of paper on the counter. "Motion sensor. Detects when something moves in its range."

"We don't need motion," Cleo said. "The gate is the switch. The gate is the thing that moves."

Sal nodded slowly. "The gate moves. Yes. But is a motion sensor the simplest way to know that the gate has opened?"

"That's what I said," Dev said. "Magnetic is simpler. Fewer parts."

"Then why didn't you say it louder?" Cleo said.

"I did. You were sketching."

The group walked back toward the shed, the magnetic switch in Dev's careful hands.

"Here's what I don't get," Bea said. "Sal said the magnetic switch BREAKS the circuit when the gate opens. But we want the light to turn ON. How does breaking something make something else turn on?"

They stopped at the shed door. Cleo unlocked it and flicked the inside light switch — click, the light came on.

"That's a toggle," she said. "It's either on or off."

Dev was quiet for a moment. Then he said, slowly, "What if the circuit is already complete when the light is OFF? And opening the gate breaks it, and breaking it makes something else happen?"

"Like a seesaw," Bea said. "When one side goes down, the other side goes up."

Rafi opened his notebook to a fresh page. "Let's build it and find out."


The First Prototype

The Brigade worked through the afternoon. Dev was in charge of the circuit. He drew it five times on graph paper before touching a single wire.

"A circuit is a path," he explained, pointing at his diagram. "Electricity goes from the battery, through the wire, to the light, and back. The switch sits in the middle, like a drawbridge."

"Wait," Cleo said. "Drawbridge. When the drawbridge is DOWN, the path is complete. When it's UP, the path is broken."

"Exactly." Dev pointed at the diagram. "So here's the problem. If we put the magnetic switch in the path, closing the gate completes the circuit, and the light goes on. But we want the OPPOSITE. We want the light to go on when the gate is OPEN."

"What if," Bea said slowly, "we use two paths?"

Dev looked up. "Two paths?"

"Like," Bea traced a line in the air, "one path for the electricity that the light uses. And another path that tells the switch what to do. Like a gate that opens another gate."

Cleo's eyes lit up. "A relay! Old Sal showed me one once. It's like a little switch that another switch can control!"

Rafi nodded, pulling a small rectangular box from the parts bin. "We have one." He held it up. "It's got an electromagnet inside. When electricity flows through the coil, the magnet pulls a lever, and the lever flips a switch. Small current controls a big current."

"So the magnetic switch on the gate," Dev said, "controls a tiny current. The tiny current makes the electromagnet pull the lever. And the lever completes the big circuit that turns on the light."

"It's like chain mail," Bea said. "One link moves, and it moves the next link."

"Exactly!" Cleo grabbed the relay from Rafi. "Let's build it!"

They wired the magnetic switch to the relay's coil. They wired the relay's switch to the battery and the light. The gate was still on its hinges, and Dev carefully mounted one half of the magnetic switch on the gate itself, the other half on the fence post.

"Gate closed," Dev announced. "Parts are touching. Circuit is complete. Relay is pulled. The light is..."

He flipped the gate open.

Nothing happened.

"Maybe it's not wired right," Cleo said.

Bea traced the wires with her finger. "Wait. When the gate opens, the magnetic switch breaks the circuit. That means the relay gets NO electricity. And when the relay gets no electricity, the lever goes back to its original position."

"Which means," Rafi said, "we built a system where the light is ON when the gate is closed."

He walked to the other side of the shed and pointed. Through the window, the security light above the shed door was glowing.

"The gate is closed," he said, "and the light is on. The opposite of what we wanted."

Cleo stared at the glowing light. Then she started laughing.

"We connected it backwards!"

"No," Dev said quietly. "We designed it backwards."

They stood in silence, looking at the wrong light glowing over the wrong gate.


The Switch That Switched the Switch

Back at the workbench, Cleo drew a diagram.

"Here's the problem," she said. "The magnetic switch is like a door. When the gate closes, the door closes. When the gate opens, the door opens. We want the light to go on when the door is OPEN."

Rafi ran his finger along her drawing.