|||

DIY energy ball:

Using a TIP102 Darlington transistor and some resistors. Here is what I did: enter image description here

R1, the 1M pulldown resistor on the first pin of the Darlington is necessary to keep the light off when nobody is touching the wires. Without this, the light will turn on and off frantically.

R2, the 1k resistor keeps the Arduino from draining too much current (since that would be bad for the pin) in the case that your A0 is in OUTPUT mode and set to LOW.

R3 keeps the LED (or in my case, an AC relay connected to an actual light) from draining too much current from the Arduino. Note: The LED leads may be backward (reverse polarity) in the provided diagram.

Here is the code:

// I release this code under the standard MIT licence;

// (in addition to whatever StackExchange implies);

const short triggerThreshold = 10;// Lower is more sensitive;

void setup() {

pinMode(A0, INPUT);

pinMode(A5, OUTPUT);

digitalWrite(A5, LOW);

delay(1);

}

void loop() {

short value = analogRead(A0);

digitalWrite(A5, (value > triggerThreshold) ? HIGH : LOW);

delayMicroseconds(10000);// 10ms;

}

Note the triggerThreshold setting in the code. If you want more sensitivity, try changing the 10 to a 5. I just tried it, and it becomes extremely sensitive, yet it still appears to reliably stay off when I don’t touch it. Naturally if you use large plates for touching, electrostatic in the air could set it off, so you may need to change this number to be higher to make it less sensitive, depending on your setup.

Up next Energy & Resources:
Latest posts DIY energy ball: Energy & Resources: December 2019 Devon lanes, a series 7 Morning I An Inductive Curio Published value of the Hubble constant plotted over time #www. #www. Published value of the charge on the electron plotted over time Devon lanes, a series 5 Mystery Boxes I’ve always believed in the lab book Desiderata True. Devon lanes, a series 4 Devon lanes, a series 3 Devon lanes, a series 2 Devon lanes, a series 1 A new blog. Again Arduino light-gates Evening Walk Radioactive Decay Modelling The Drake Equation