Voltage Driven rheostat?

I've built a lightning burst camera trigger using an arduino, and it works a treat - it's basically a reversed bias IR diode on a voltage divider, with a pot to tweak the threshold ...

I'd like to rework this, and the fundamental requirement is to remove the pot and have the resistance in the divider tweaked by voltage; ideally I'd also like to use the interrupt abilities of the board, so the code isn't just looping looking for voltage changes

The fundamental problem I have to resolve is a voltage driven rheostat - is there an IC/Circuit that can do this?

Any help, gratefully received

Hi Barney,

OK, so you have a variety of output values, and you are setting a threshold and connecting that into an Arduino digital input, is that right?

The easiest way may be to pick a midrange resistor and connect the signal into an Arduino analog input where you can read the value and then decide what to do??

Since the lighting is a transient signal, you'd have to sample it pretty often, though!

How often do you adjust the threshold, and why do you change it??

BTW some people use an antenna and RF detector to detect the lightning, like you hear on an AM radio. That can 'hear' lightning at a long distance so you can put the camera out and get ready..

Tell us more...

Also, here's a pointer to a camera controller I am working on, and Lightning detector is one of the things I want to add :slight_smile:
http://yourduino.com/camera-control.htm

I'll assume your diode is connected between the digital input pin and ground, and your pot is connected between the pin and +5v. If you can spare a few digital output pins, you can do this. Say you allocate 4 output pins. Connect a resistor of value R between the input pin and the cathode of a signal diode, and connect the anode of the diode to a digital output pin. Repeat for the other 3 output pins but use values of 2R, 4R and 8R. Then you can choose which of the 4 values you want as your pullup by setting the corresponding output pins high. By setting more than one output pin high, you can put several of the resistors in parallel and get some further values.

Another way would be to use a 4- to 16-line decoder IC, then you can select one of 16 different values using 4 output pins. Connect your 4 Arduino output pins to the inputs of the decoder IC, then connect a resistor and diode to each of the 16 outputs. Most decoder ICs have active low outputs, so you would need to wire the system using pulldown resistors instead of pullup resistors.

Thank you Terry!

terryking228:
OK, so you have a variety of output values, and you are setting a threshold and connecting that into an Arduino digital input, is that right?

The easiest way may be to pick a midrange resistor and connect the signal into an Arduino analog input where you can read the value and then decide what to do??

The voltage out of the divider is analogue-sampled continuously by the code, I look for a sudden rise in the voltage, when the IR gets triggered - I have to tweak the Z1 to handle background IR (day vs night, generally)

The circuit is based on this Hobby Robotics ยป Lightning Shutter Trigger for a Camera

terryking228:
Tell us more...

Also, here's a pointer to a camera controller I am working on, and Lightning detector is one of the things I want to add :slight_smile:
http://yourduino.com/camera-control.htm

I'd like to make it an interrupt driven system, which would mean getting the circuit 'trimmed' somehow during bootup - perhaps even put the chip to sleep (depending on how quickly it resumes) - so that the code can be off driving an LCD display.

Ultimately I would like to create something pretty much like you have - I love the idea of the AM burst arming the circuit/camera!

dc42:
... Say you allocate 4 output pins. Connect a resistor of value R between the input pin and the cathode of a signal diode, and connect the anode of the diode to a digital output pin. Repeat for the other 3 output pins but use values of 2R, 4R and 8R. Then you can choose which of the 4 values you want as your pullup by setting the corresponding output pins high. ...

Perfect!!! Thank you DC!

Have a look at Renato's stuff that runs in the background: GitHub - renatoferreirarenatoferreira/ebl-arduino: Automatically exported from code.google.com/p/ebl-arduino

He has a neat function "AnalogEvent" that looks for a change in an analog reading.. Might work!!

very much appreciated - I'll let you know how I get on