Arduino Forum

Using Arduino => General Electronics => Topic started by: domo on Mar 12, 2013, 01:04 am

Title: multiplier
Post by: domo on Mar 12, 2013, 01:04 am
I am quite unsure how i can use the arduino to control a high-voltage supply controlling an electro-optic lens. The lens has to have a change in voltage to correct the focus and i want to know if theres a way to get arduino to apply changes in steps with a loop setup?
Title: Re: HV multiplier
Post by: PaulS on Mar 12, 2013, 10:36 am
Quote
and i want to know if theres a way to get arduino to apply changes in steps with a loop setup?

There is, as long as your definition of "high voltage" is 0 to 5V.

If not, you might post a link to this mysterious device, over in Project Guidance. You don't have a Programming question.
Title: Re: HV multiplier
Post by: dc42 on Mar 12, 2013, 08:28 pm
Yes, it's possible to use an inverter to generate the high voltage, and control the inverter with the Arduino. What range of voltage is required, and at what current?
Title: Re: HV multiplier
Post by: domo on Mar 14, 2013, 02:08 pm

Yes, it's possible to use an inverter to generate the high voltage, and control the inverter with the Arduino. What range of voltage is required, and at what current?


HV mutiplier goes up to 5kV.

project is to be able to change the voltage supply to a electro-optic lens to focus on images.

would a potentiometer work?
Title: Re: HV multiplier
Post by: dc42 on Mar 14, 2013, 02:37 pm
OK, so you already have a "HV multiplier" that can generate 5kV. Can you provide some more information about it, so that we can see whether it could be controlled from an Arduino?
Title: Re: HV multiplier
Post by: domo on Mar 18, 2013, 05:51 pm
I am trying to control the voltage being applied to the lens.
I have a HV multiplier (emco) and im trying to see if i can use a digital potentiometer or some other equipment that arduino would be able to use to control the output voltage to the lens.

Would it be easier to post a block diagram?
Title: Re: HV multiplier
Post by: dc42 on Mar 18, 2013, 05:57 pm
No, what would make it easier would be if you posted a link to the datasheet or other information about the Emco high voltage power supply. Is it one of these http://www.emcohighvoltage.com/proportional-power-supply.php (http://www.emcohighvoltage.com/proportional-power-supply.php), if so, which exact model?
Title: Re: HV multiplier
Post by: domo on Mar 18, 2013, 06:19 pm
.
Title: Re: HV multiplier
Post by: dc42 on Mar 18, 2013, 06:29 pm
OK, that helps.

1. Is it the 5V input model, or one of the others?

2. Is it being operated close to full load, or nearer to no-load? That affects the maximum input voltage we need to provide.

3. What will be the power supply for the system? (I'm interested in whether we have a couple more volts available than the input to the emco device needs.)

4. To what resolution do you need to set the output voltage?
Title: Re: HV multiplier
Post by: domo on Mar 18, 2013, 06:42 pm

OK, that helps.

1. Is it the 5V input model, or one of the others?

2. Is it being operated close to full load, or nearer to no-load? That affects the maximum input voltage we need to provide.

3. What will be the power supply for the system? (I'm interested in whether we have a couple more volts available than the input to the emco device needs.)

4. To what resolution do you need to set the output voltage?


When you mean 5V input, do you mean voltage supplied from the arduino?

I have a 10kV generator and a normal 10V generator too.

Havent gotten as far as to decide resolution, a competent resolution should be fine to start off i assume.
Title: Re: HV multiplier
Post by: dc42 on Mar 18, 2013, 07:14 pm

When you mean 5V input, do you mean voltage supplied from the arduino?


No, I mean the input to the HV power supply. The Q50 is available in versions for 5V, 12V, 15V and 24V input. Have you chosen a particular model in the series, or is it flexible?


I have a 10kV generator and a normal 10V generator too.


What I am asking is, what power supply do you intend to use to power the emco? The Arduino's 5V supply, or maybe some other power supply (such as your 10V power supply) which you may also be using to power the Arduino?


Havent gotten as far as to decide resolution, a competent resolution should be fine to start off i assume.


The obvious choices are 8 bit resolution (steps of about 20V), 10-bit resolution (steps of about 5V), or 11-bit resolution (steps of about 2.5V). Some associated solutions are:

8-bit: PWM output pin + smoothing RC network + possible op amp + emitter follower. May need to increase the PWM frequency to get the desired response time.

10-bit: 12-bit external DAC + possible op amp + emitter follower.

11-bit: 12-bit external DAC + possible op amp + emitter follower + 12-bit external ADC.

The "possible op amp" would be needed unless you are using the 5V version and it is lightly loaded.
Title: Re: HV multiplier
Post by: domo on Mar 18, 2013, 07:26 pm
The input is variable, so it can be used via arduino or the external supply. Can you give me an example of an RC network model please? Also, are you referring to the actual setup of the system? Am I to assume that an RC network will be connected to an emitter and operational amplifier?

Title: Re: HV multiplier
Post by: dc42 on Mar 18, 2013, 09:36 pm

Can you give me an example of an RC network model please? Also, are you referring to the actual setup of the system? Am I to assume that an RC network will be connected to an emitter and operational amplifier?


I can't and won't answer that until you answer my earlier question.
Title: Re: HV multiplier
Post by: domo on Mar 18, 2013, 10:34 pm

No, I mean the input to the HV power supply. The Q50 is available in versions for 5V, 12V, 15V and 24V input. Have you chosen a particular model in the series, or is it flexible?





What I am asking is, what power supply do you intend to use to power the emco? The Arduino's 5V supply, or maybe some other power supply (such as your 10V power supply) which you may also be using to power the Arduino?


Currently we are running on the Arduino's 5V.
We do have an external power supply that we have not intended to use yet as there were issues with the board being unstable or overheating.
Title: Re: HV multiplier
Post by: dc42 on Mar 19, 2013, 10:17 am
Here is a schematic for a possible solution. Since you still haven't said, I've assumed you are using the 5V version of the Q50 and that 8-bit resolution is sufficient. You will need to increase the PWM frequency if you want the settling time to be lower than a few seconds.
Title: Re: HV multiplier
Post by: domo on Mar 19, 2013, 02:24 pm

Here is a schematic for a possible solution. Since you still haven't said, I've assumed you are using the 5V version of the Q50 and that 8-bit resolution is sufficient. You will need to increase the PWM frequency if you want the settling time to be lower than a few seconds.


It is the 5V input version. Just checked.
8-bit is more than sufficient.

What coding specifically would go into arduino to control this?
Title: Re: HV multiplier
Post by: dc42 on Mar 19, 2013, 03:01 pm
Preferably, you should use PID controller software. There is a standard one for the Arduino. What method do you intend to use to select the output voltage? If the device will be standalone, then I suggest a rotary encoder and LCD display.

The 5.6V zener diode in the schematic is intended to limit the voltage fed to the Q50 to 5V. However, the datasheet for the Q50 implies that if you run it with 5V supply when the output is lightly loaded, it will produced more than 5kV, which is outside its safe operating area. Therefore, until you have got the software right (in particular, the PID parameters), I suggest you use a lower voltage zener diode (perhaps 3.9V or 4.7V) in order to limit the supply voltage to the Q50 to a lower value.

Here's a variation of the circuit that provides better current limiting and avoids the need for a power resistor. You should put a heatsink on the BD435 transistor.
Title: Re: HV multiplier
Post by: domo on Mar 21, 2013, 05:09 pm
The arduino will recieve data from matlab which measures the focus measure value from the lens. That part of the system has been done.
Depending on the value we need arduino to change the output voltage.

I still am unsure what the transistor does in the diagram.
Also the electro-optic lens needs the +/- ve connection, but on the diagram theres only one coming the hv multiplier.
Title: Re: HV multiplier
Post by: dc42 on Mar 21, 2013, 05:21 pm
The transistor passes the power (up to 250mA) to the HV multiplier. The op amp cannot supply enough current by itself.

The high voltage output is on the right hand side of the schematic. The positive side is marked "+ 0-5 kV", and the negative side is marked Gnd. The negative side is common with Arduino ground. If you wanted negative output instead of positive output, then you would need to use model Q50N and change the arrangement of the voltage divider.
Title: Re: HV multiplier
Post by: domo on Mar 21, 2013, 06:22 pm

The transistor passes the power (up to 250mA) to the HV multiplier. The op amp cannot supply enough current by itself.

The high voltage output is on the right hand side of the schematic. The positive side is marked "+ 0-5 kV", and the negative side is marked Gnd. The negative side is common with Arduino ground. If you wanted negative output instead of positive output, then you would need to use model Q50N and change the arrangement of the voltage divider.


Okay my bad, what i meant was that the lense has to electrode probes that would need the voltage going to. Can this just be divided from the output? I dont understand the 9V at the top section either.
Title: Re: HV multiplier
Post by: dc42 on Mar 21, 2013, 06:47 pm
Please explain the voltage requirements for the lens. Have you a specification or datasheet for the lens?

The +9V is where you connect the incoming power. You need to provide 9V or a little more at 250mA. You can use the same supply to power the Arduino if the supply can handle the extra current for the Arduino + anything running from its 5V supply.
Title: Re: HV multiplier
Post by: domo on Apr 01, 2013, 12:45 am

Please explain the voltage requirements for the lense. Have you a specification or datasheet for the lense?

The +9V is where you connect the incoming power. You need to provide 9V or a little more at 250mA. You can use the same supply to power the Arduino if the supply can handle the extra current for the Arduino + anything running from its 5V supply.


The lens operates between 2-3kV, but we aim to be able to control it with a system.

Can the roles of the resistors prior to the op-amp and the role of the op-amp be explained in more detailed?
The resistors coming off the HVM i am assuming is to make safe the connection back to arduino ground?

(sorry im quite a beginner trying to attempt a complex project)
Title: Re: HV multiplier
Post by: dc42 on Apr 01, 2013, 09:27 am

Can the roles of the resistors prior to the op-amp and the role of the op-amp be explained in more detailed?
The resistors coming off the HVM i am assuming is to make safe the connection back to arduino ground?


The 10K resistor keeps the op amp input at ground potential while the Arduino is initializing. Without it, the voltage on the op amp input would drift to +5v because of the input bias current of the amplifier, causing the unit to produce the maximum output voltage.

The 100K resistor and 0.1uF capacitor smooth the PWM to a steady voltage.

The 100M and 100K resistors between the HV output and ground form a voltage divider to convert 0 - 5kV to 0 - 5V, allowing the Arduino to measure the output voltage.
Title: Re: HV multiplier
Post by: domo on Apr 01, 2013, 02:19 pm


Also the resistor and transistor after the op-amp i presume is to control input voltage to the HVM?
Title: Re: HV multiplier
Post by: domo on Apr 03, 2013, 01:03 pm
This was the suggested circuit for using the HVM,
I dont understand why use a buffer?
Title: Re: HV multiplier
Post by: dc42 on Apr 03, 2013, 01:29 pm
1. You need a buffer because an Arduino can only supply 40mA per output pin, whereas the 5V version of the HV multiplier requires up to 250mA.

2. However, there are very few op amps that can supply as much as 250mA output current. That is why I suggested using an op amp and NPN transistor as the buffer.

3. You cannot connect the input of the buffer direct to an Arduino output pin, because the Arduino does not have an internal DAC to drive any output pins with a variable voltage, and you must not try to drive the HV multiplier with PWM. That is why I included the RC network at the input to the buffer.
Title: Re: HV multiplier
Post by: domo on Apr 03, 2013, 02:17 pm

1. You need a buffer because an Arduino can only supply 40mA per output pin, whereas the 5V version of the HV multiplier requires up to 250mA.

2. However, there are very few op amps that can supply as much as 250mA output current. That is why I suggested using an op amp and NPN transistor as the buffer.

3. You cannot connect the input of the buffer direct to an Arduino output pin, because the Arduino does not have an internal DAC to drive any output pins with a variable voltage, and you must not try to drive the HV multiplier with PWM. That is why I included the RC network at the input to the buffer.


Why can the HV not be driven by the PWM?

Title: Re: HV multiplier
Post by: dc42 on Apr 03, 2013, 02:44 pm
PWM works when there is some averaging mechanism to smooth out the PWM. Electronic assemblies generally do not have this averaging mechanism. If you try to feed them with PWM'd power, they will generally not behave in the way you want, and draw high peak currents which are likely to damage them and/or the circuits driving them.

Some electronic assemblies provide a a separate PWM input. The HV multiplier you are planning to use does have the option of an external input for turning off the HV supply, but it is clear from the datasheet that this input is not intended for PWM.
Title: Re: HV multiplier
Post by: domo on Apr 06, 2013, 11:40 pm

10-bit: 12-bit external DAC + possible op amp + emitter follower.

11-bit: 12-bit external DAC + possible op amp + emitter follower + 12-bit external ADC.

The "possible op amp" would be needed unless you are using the 5V version and it is lightly loaded.


When using a DAC, would that be connected to the Arduino output, and then to the rest of the circuit?
and im guessing the ADC will come before the HVM module? any examples on how to adjust the circuit, or what to add in to make these effective changes?

Also the op-amp i have, has 8 pins but only 3 is needed for the circuit (im presuming) but would i need to ground it too?

Also if another Arduino board was to be used (such as Due, which has a DAC) does that remove the need for an external DAC?


Title: Re: HV multiplier
Post by: dc42 on Apr 07, 2013, 03:46 pm

When using a DAC, would that be connected to the Arduino output, and then to the rest of the circuit?


The DAC would be connected to the Arduino via SPI or I2C depending on which DAC you used. Its output would feed the non-inverting input of the op amp, in place of the R-C filter.


Also if another Arduino board was to be used (such as Due, which has a DAC) does that remove the need for an external DAC?


Yes. AFAIK the Due is still the only Arduino board that has an integral DAC.
Title: Re: HV multiplier
Post by: domo on Apr 07, 2013, 04:36 pm
What i dont understand is, if there is a DAC, then hasnt the output become analogue? where does it turn dc again?
Title: Re: HV multiplier
Post by: domo on Apr 08, 2013, 04:15 pm
When i connect up the circuit, it does not seem to work. I am inputting the output
Title: Re: HV multiplier
Post by: dc42 on Apr 08, 2013, 04:30 pm
Which circuit have you built? I suggest you also post a photo of your wiring.
Title: Re: HV multiplier
Post by: domo on Apr 08, 2013, 04:35 pm

I have built the buffer without the transistor system and the external secondary voltage input.
Title: Re: HV multiplier
Post by: dc42 on Apr 08, 2013, 04:41 pm
If you build the circuit as I described it, then I will try to help you get it working. If you leave bits out, you're on your own.
Title: Re: HV multiplier
Post by: domo on Apr 09, 2013, 02:31 pm
photo1 just shows the wiring after op-amp and before HVM.

When i attempt to put in a second voltage input it doesn't work, therefore i tried to test the circuit by building whats on photo 2, which works but the output is not ideal.