IONICUBE 1X Control with Arduino

I have a question regarding IONICUBE 1X regarding communication Arduino.

My hardware configuration:

I want to control IONICUBE 1X with Arduino. But I don’t understand what IONICUBE’s inputs and outputs mean. I know how to use Arduino’s digital and PWM outputs. What I want to do is run the motor at full speed when the Arduino is triggered. Is there a link that explains this or who can tell?

Thank you. I am waiting your answers, I am novice in this matter :(.

You can see more on ionicube wiki, but typically the microcontroller/PLC DIR signal can connect to the Ionicube 1x X4 connector HSin1 and PWM to HSin2. Then it is a matter of selecting correct signalling in ionicube setup via Granity configuration and also loading a good supported FW, like what we used in direct drive wheels, on Ioni drive…

One more thing, you will also need 24V supply to Enable and STO2 pins on the X4 connector, either jumpered from 24V logic psu, or switched via enable and e-stop switches. Switches are preferred for safety reasons.

Hopefully that helps you.

Thank you very much for your answer. I’m new around here. I’ll deal with it when I get IONI. There is no video about it, right? :slight_smile: Thank you for again.

No video, but I can share the wiring schematic I made when I played with the older OSW DD wheels using ionicube 1x and 4x systems…we used STM32 micro then, but same principle applies for any other micro connected to it.

Message me your email and I will dig out old PDF and forward it…but also, Wiki will have good ideas and answers to your questions too. You can go to this URL, there are some links to wiring and pin-outs on that page:



24V STO/Enable voltage is not necessary. 5V is enough, and e.g. IONICUBE X1 connector X4 pin 2 outputs 5V that can be used.

Kind regards,

Hello again. My IONICube 1x order has arrived. I have a problem before proceeding to the Arduino stage yet. I have a Linmot brand DC motor. I applied the necessary parameters. I tried to run it in torque mode. But I encountered an error like this and the engine did not start. I did not connect STO. I connected 5V on the board to the Enable pin. I am not familiar with Granity software yet, my research continues from Wiki. What are your recommendations regarding this error? (tag: ioni 440205)

Linmot model: ps02-23sx80f-hp-k

Your STO signal is activated, as seen via the black balloon and red exclamation mark. STO must be wired.

Thank you, worked. But the Wiki read:

Use only either ENABLE / STO2 pins of X4 or X1, not both.

That’s why I didn’t use it. But now it’s okay

Hi Samed

That sentence is somewhat confusing. It tried to tell, that both Enable and STO signals are needed, but only from either connector, never from both.

I changed the wiki into this:
Use ENABLE/STO2 pins of only either X4 ‘‘or’’ X1, not both.

Kind regards,

I think I’m at the end of my project. I was able to control it with Arduino PWM. It was a little weird but it works. I connected Arduino 5th PWM pin to HSIN2 and entered the following codes:

int HSIN_1 = 5; //Writes HSIN1. It actually depends on HSIN2.

void setup() {
// put your setup code here, to run once:
pinMode(HSIN_1, OUTPUT);

void loop() {
// put your main code here, to run repeatedly:
analogWrite(HSIN_1, 139);
analogWrite(HSIN_1, 255);

OK, I’m at a good point right now. But there is always a small problem.

This code: “analogWrite (HSIN_1, 139);” precisely sets the setpoint (1000) point. But when I give a 255 signal, the setpoint changes between 2543-2546. How can we set this to the exact setpoint value?

Hi Samed

Analog signals always have noise in them, and it’s common that some values are in the middle of two ADC points causing this kind of issues. DAC and ADC non-linearities, noise and errors can also cause these.

If you need exact setpoint values, you need to use SimpleMotion field bus to control the IONI drives. This will be exact without any noise issues.

Kind regards,