Please help with circuit design and programming of Arduino

Thread Starter


Joined Feb 29, 2020
Hi everyone,

I am using Arduino Uno for my current project. I have one mixing station and three presses. The press will produce 24v once it need the material from the mixing station and mixing station in return will give 24v to the solenoid to start accepting material from mixing station until press stop supplying 24v. one mixing station can only feed one press and I controlled two presses earlier using relay. Now I have three presses and I am using microcontroller and transistors to do low side switching for solenoids. The wrote the code yesterday to monitor the input pins and once I get the input from a pin, it will turn the output pin high which will go to the transistor base. The PROBLEM is how can I make sure only one press is ON at a time because mixing station can't feed two presses at a time. For the press it will keep producing 24V until it's fed. I am going to paste the code below. Please note I am aware of the voltage and current limitation of the Arduino and right now just testing the circuit with dc supply. Thank you in advance

int PRESS1 = 2;
int PRESS2= 4;
int PRESS3= 6;

int LIM1=8;
int LIM2=10;
int LIM3=12;

void setup() {

pinMode(PRESS1, INPUT);
pinMode(PRESS2, INPUT);
pinMode(PRESS3, INPUT);

pinMode(LIM1, OUTPUT);
pinMode(LIM2, OUTPUT);
pinMode(LIM3, OUTPUT);


void loop() {
if(digitalRead(PRESS1) == 1)
digitalWrite(LIM1, 1);
/ digitalWrite(LIM1,0);




OBJECTIVE: When any of the press produces 24v on the relay which will be attached to mixing station, the mixing station will turn on the respective solenoid and start feeding material until it stop getting 24v.


1. How to code to make sure that only one solenoid is on at a time. By the way the other presses will keep producing 24v until they are fed. The way mixing station works is as soon as it gets 24v on its input, it produces 24v to its output which will turn on the solenoid and then send material.

2. How to make sure that mixing station is only getting one input at a time and we are not back feeding any press 24v when they don't need it. In other words, how can we isolate the relay outputs and send them to mixing station.

I very much appreciate your time and looking forward to hearing from you.



Last edited by a moderator:


Joined Jul 10, 2017
Does the mixing station have three different outputs; one for each press?
If so, can it only output material to one press at a time?