Regulation of a high-voltage power supply unit (up to 25kV)

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).


2

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

What is a LOW doing in a pinMode?

I'm going to blame your high voltage power supply. It "wouldn't hurt" to make sure that input pin is actually switching between 0 and 5V, and you might want to stretch-out the time so your meter has time to stabilize.

Are you sure the banana-plug adapter is wired correctly? You've got 3 wires on one side and two one the other, and obviously only two are being used.

Or, have you tried hard-wiring the digital pin to 5V and ground?

And what you're currently doing, the LED & power supply control-input can share the same pin.

Nice schematic! Thank you for NOT using Fritzing! :wink:

I don't see on the instruction sheet how the "knob" and control voltage work together...

Did you mean to write this? :

  pinMode(HU, OUTPUT);
  digitalWrite(HU, LOW);

with comments what function is doing what.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.