JeePuzzle #2

Added by martynj over 4 years ago

Since JeePuzzle #1 is nearly cracked, here is a different one to stir the grey cells. The same Bare ARM Blinker context.

> Without additional components and no ‘debug’ connection active, how to modify the breadboard circuit so that with user interaction, the blink rate can be halved and doubled on demand?

Replies (6)

RE: JeePuzzle #2 - Added by martynj over 4 years ago

No takers yet?
Ok, a pointer towards one solution - the halving/doubling is simple to add to the existing code, so the problem is really
> how to signal the code with the user’s request to raise or lower the blink rate?
A transition from the physical world to the programming space is needed. Remember cheap - no extra discrete components!
No sweat right?

RE: JeePuzzle #2 - Added by ozzy over 4 years ago

Change of supply voltage ?. Using a build in temperature sensor ?.

RE: JeePuzzle #2 - Added by JohnO over 4 years ago

Resistance or maybe even capacitance of a finger tip between a pin & ground?

RE: JeePuzzle #2 - Added by martynj over 4 years ago


Ingenious - but in this case the processor is reasonably immune to supply voltage changes in the operating range and lacks an exposed temperature sensor.


On the right track - remember that CMOS inputs are high impedance, comparable to skin resistance….

RE: JeePuzzle #2 - Added by over 4 years ago

Program a pin to be input with a pullup resistor, and set it up for interrupt on falling edge. Now when you touch that pin with an ungrounded finger, the AC hum will trigger it. Or if you are grounded, the pin will just go low.

RE: JeePuzzle #2 - Added by martynj over 4 years ago

Correct suggestions from celephicus_ and _JohnO !  

The only refinement is to use two input pins to encode the halving or doubling of the blinking rate (and  have another finger on the GND pin). Simple polling of the pin status is enough if you don’t want to write the interrupt handler.

What is actually detected is the path created from I/O pin (set to input) to ground via skin resistance (typically ~10KΩ). Note that touching random open pins is not usually recommended due to concerns about static zapping the silicon. Provided that the pull-up is enabled and you discharge any static by touching the GND first, this case is harmless.