Pages: [1]   Go Down
Author Topic: Voltage Driven rheostat?  (Read 499 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 23
Posts: 1753
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley
http://yourduino.com/camera-control.htm


Logged

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

United Kingdom
Offline Offline
Tesla Member
***
Karma: 220
Posts: 6587
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you Terry!


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 http://www.glacialwanderer.com/hobbyrobotics/?p=16


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  smiley
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!



Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

... 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!
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 23
Posts: 1753
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have a look at Renato's stuff that runs in the background: http://code.google.com/p/ebl-arduino/

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

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Pages: [1]   Go Up
Jump to: