# Controlling a low value resistance to ground

Hi! I've been working on a geiger counter project which is all working good but I'd like to be able to digitally control the high voltage output as I have multiple geiger tubes and I don't want to have to change a potentiometer to change the voltage.

The control on the circuit (http://sites.google.com/site/diygeigercounter/) is a 100? potentiometer from the base of a transistor to ground. The issue I have is I cannot work out a way to control a (reasonably high resolution, this range controls ~100-2000V logarithmically) 0-100? resistor from an Arduino. Digipots don't have a range that enables a good resolution in that range.

The solution I'm thinking about is transistors (which I have very little experience with). At the moment I'm trying a 2N4401 on PWM and the lowest resistance I can get out of it is 30? but I'm not sure I'm using it correctly.

Anyone got any ideas?

You picked the wrong circuit to do this.
Is the Arduino going to measure the high voltage ? or do you just want to set the potentionmeter ?
I don’t think that circuit can do 2000V.
The transistor is 400V and the diode is 1000V and the capacitors are 1000V.

I would use the Arduino to generate the frequency for the high voltage, but a 555 chip is used. That make it harder to control.

The 100 ohm potentiometer is part of the circuit. If you replace it with a transistor, it might not keep the high voltage at the same voltage.

What are your goals ? What are the voltages you want ?
Do you have to use this circuit ?

My best advice is to use a few relays and a few potentiometers, and let the Arduino select the relay for a certain voltage.

Erdin: You picked the wrong circuit to do this. Is the Arduino going to measure the high voltage ? or do you just want to set the potentionmeter ? I don't think that circuit can do 2000V. The transistor is 400V and the diode is 1000V and the capacitors are 1000V.

I would use the Arduino to generate the frequency for the high voltage, but a 555 chip is used. That make it harder to control.

The 100 ohm potentiometer is part of the circuit. If you replace it with a transistor, it might not keep the high voltage at the same voltage.

What are your goals ? What are the voltages you want ? Do you have to use this circuit ?

My best advice is to use a few relays and a few potentiometers, and let the Arduino select the relay for a certain voltage.

I've got a slightly modified version of the circuit and I have it running at those voltages fine, just with the potentiometer. The difference with mine is it has a Villard cascade to get a little extra voltage. I think I forgot to mention that.

What I was going to do was use the Arduino to change the resistance there so the output is close to what I want. I was going to measure the voltage with a large voltage divider (1G? R1) such that the output is within 0-1.1V over 0-3000V, for a geiger I only need to be 10V or so accurate.

I don't /have/ to use that circuit however I would prefer to use it as it is already soldered onto some stripboard (I know, not really the best for high voltage) and it's a bit of a pain to remove stuff. I could maybe remove the 555 and generate the frequency with the Arduino if that would be the best way to go as the 555 is just in a DIP slot.

The voltage range I need really is 300V - 1900V. I have a few tubes over that kind of range.

Thanks

For full control, you might need a different circuit.

The coil/inductance together with the capacitance of the circuit has a certain optimal frequency. You could try to find that frequency and use the Arduino to regulate the voltage with a lower frequency. The frequency changes with an other load (other tube), but perhaps you can find some average optimal frequency. That might be between 100kHz and 1MHz. Perhaps you have to write your own code for the registers of a timer.

Do 1 Gohm resistors exist ? I doubt if that is useful. A value of 100M can be used, but even that is very high and therefor not accurate. Sensing 3000V with 100M will lower the high voltage.

Using a transistor or mosfet is something worth trying. What kind of problem did you encounter ? The lowest value was 30 ohms ? That doesn't seem right. You can't measure that with a multimeter. Set the potentionmeter to the highest value and see if you can achieve the same with the Arduino.

Can you draw a schematic ?

You could do the tests without cascade, that high voltage scares me.

Erdin: Do 1 Gohm resistors exist ? I doubt if that is useful. A value of 100M can be used, but even that is very high and therefor not accurate. Sensing 3000V with 100M will lower the high voltage.

I actually have a 1G? resistor, the guy who designed the board I based my design on actually recommended one for measuring the high voltage on a multimeter - measured voltage * 101 = actual voltage. This does appear to be accurate looking at what the tubes do at the measured voltage. I assumed the Arduino would be able to do this kind of thing.

Erdin: Using a transistor or mosfet is something worth trying. What kind of problem did you encounter ? The lowest value was 30 ohms ? That doesn't seem right. You can't measure that with a multimeter. Set the potentionmeter to the highest value and see if you can achieve the same with the Arduino.

Can you draw a schematic ?

You could do the tests without cascade, that high voltage scares me.

The potentiometer measures ~38.0? for an output of ~400V. I'm pretty sure the resistance is decreased for a higher voltage to something like 12? where the voltage drops to just about nothing so the actual range I'd use would be 11? - 50? (or so). The voltage increases exponentially compared to the turns on the potentiometer, not sure if that's just the multiplier or the nature of the circuit too.

I would measure the max the pot would go but in theory that should be 100? (and I don't really want to mess up the voltage I have set unless it's definitely necessary).

To be honest I have no clue what I'm doing with the transistor (it's a bipolar NPN (2N4401)), chances are I'm not using it correctly. I have no resistors at all to the transistor which was the only way I could get it to change resistance enough at all but it drops the Arduino's pin voltage a lot.

Would you be able to explain how I can get the transistor working properly?

Thanks again

I was not clear what I ment, sorry. I ment this: "Set the potentionmeter to the highest value of the high voltage, and see if you can achieve the same with the Arduino".

The transistor might be damaged. You need at least a resistor from the Arduino pin to its base. To control the transistor you can use a PWM signal, but you have to filter that with a resistor and a capacitor. Without filter you have a combination of the PWM frequency and the 555 frequency, that would result in heavy interference.

Erdin: I was not clear what I ment, sorry. I ment this: "Set the potentionmeter to the highest value of the high voltage, and see if you can achieve the same with the Arduino".

Right now I have a problem with setting the high voltage to max that at around 1800V I will get arcing at the tracks and solder joint on my terminal block for connecting the geiger and that can sometimes destroy stuff (usually the 555). The rest of the board where high voltage is has a large clearance but at that point the anode comes close to the cathode to connect the block, I probably should've gotten a larger block or two single blocks, I do have just enough space to move the cathode one strip down if it becomes too much of a problem. I might see if I can fix this by putting a blob of glue between the tracks.

Erdin: The transistor might be damaged. You need at least a resistor from the Arduino pin to its base. To control the transistor you can use a PWM signal, but you have to filter that with a resistor and a capacitor. Without filter you have a combination of the PWM frequency and the 555 frequency, that would result in heavy interference.

I've had a lot going on so it took me a while to get around to testing this. Turned out the transistor was damaged - my minimum resistance now is 7? with 270? on the base, plenty.

Before I see how it goes in circuit I have one issue. To get 95? or so I have to run the analogue at 225/255 which is pretty close to the 250 point where the transistor is fully on so I'm losing quite a lot of precision there. I suppose it would be possible to get a 16-bit PWM going but to me that sounds a bit much for this. My idea would be to increase the baseline voltage on the base and have the Arduino add to that by PWM but I have no clue how to do that, haven't got time to research that right now but hopefully I'll be able to find an answer.

Before I put it in the geiger circuit I'll test the noise with an amplified speaker (maybe one day I'll be able to afford an oscilloscope). I have some largish ceramic caps left over from the geiger board which should do for quietening noise.

Thanks for you help so far!

The filter and a lifted base voltage for the transistor only requires resistors and a capacitor.
If you have a value of 225 for analogWrite(), the value of the resistors should be altered.

You should be very careful with that 2000V.
It could bounce back and destroy the Arduino and PC (connected via usb).
Two single blocks is better.

You can’t set the transistor to a certain ‘resistance’. It doesn’t work that way. It can be set for a certain current through the collector, which can result in this circuit like a resistor.

When you use the circuit for a while, there will be some dust, or moisture or other things. That is a real danger with 2000V. You should use a large distance between the blocks, not just barely outside the spark range, but a lot more.

Attached is a circuit given to me by user dc42 on this forum, that is designed to replace a potentiometer. In the circuit, a digital pin drives two optocouplers with a PWM signal. The two resistors are each 1/2 of the desired full-range resistance–so in your case, they would be 50 Ohms. If you didn’t need galvanic isolation between the two circuits, you could substitute transistors instead of optocouplers. Whatever you do, be sure that the PWM frequency that you’re using is low enough that the optocouplers (or transistors) can fully turn on and off. Most of them should be able to keep up with the Uno’s default of 495 Hz. For better filtering, the PWM signal should not be too slow, though.

The resolution of the circuit is the same as the PWM resolution of the board, so you should be able to achieve 255 steps of resolution between 0 and 100 Ohms. Perhaps that would be sufficient. You will need to work out a capacitor value appropriate for your resistor to produce sufficiently small ripple voltage on the output. With a 50 Ohm load, 495 Hz signal, and PWM signal going from 0-5v, a 1000 uF capacitor gives a ripple voltage of 0.05 volts. That’s 1% of the output range, which maps to a swing of 1 Ohm on your 100 Ohm “potentiometer”. The settling time is 0.11 seconds, which I suspect will be acceptable for your application.