Hello dear community,
I am trying to regulate a high-voltage power supply unit which can go up from 0kV to 25kV (Link). My goal is to use an Arduino Uno or Arduino Nano with its digital pin to simply turn the digital pin HIGH and LOW in order to turn the kV-values of the device On and Off. As you can see in the datasheet(Link) of the device, it has a control input where I can connect the high-volage unit with an Arduino microboard. The kV-values can be set from a knob (see in the datasheet Link). So in other words, I want to send a HIGH/LOW-signal from a digital pin, through the control unit, in order to turn the kV-Values On, - and Off.
Here you can see what I have programmed so far:
#define HU 8
const int led = 12;
unsigned long lasttime = 0;
const long interval = 3000;
unsigned long lasttime1 = 0;
const long interval1 = 5000;
void setup() {
Serial.begin(9600);
pinMode(led, OUTPUT);
pinMode(HU, OUTPUT);
pinMode(HU, LOW);
}
void loop() {
unsigned long newtime = millis();
if (newtime - lasttime >= interval) {
lasttime = newtime;
digitalWrite(led, HIGH);
digitalWrite(HU, HIGH);
}
if (newtime - lasttime1 >= interval1) {
lasttime1 = newtime;
digitalWrite(led, LOW);
digitalWrite(HU, LOW);
}
}
When I tested the program, I found that if I set the kV values up to 18kV with the knob my kV value for HIGH would be 18kV and the kV value for LOW would be 12kV. My goal is to have 18 kV for HIGH and 0 kV for LOW. If I set other kV values with the knob, I notice always a kV difference of 5-6kV between HIGH and LOW.
Can someone please help me with this issue? I would really appreciate every help and opinion coming from members of this forum.
Hereby are some pictures of my circuit diagram. The LED is used to visualize when we have a HIGH(LED goes On) and LOW(LED goes Off). The connection between the control input and Arduino microboard is achieved through a miniature DIN circular connector socket (see pictures below).
Below you can see the circuit diagram (Sorry for not using Fritzing):
Again thank you very much for your help and have a nice weekend.
Best regards
Kosta