Notifications
Clear all

How to make a 45min input a one shot

19 Posts
5 Users
0 Reactions
695 Views
byron
(@byron)
No Title
Joined: 6 years ago
Posts: 1198
 

@will @zander

Blimey its had been a long time ago when I last used the jolly old arduino R3 uno, it been ESP32's and pico's these days.  Apart from yesterday that is, when I thought to charge up the batteries on an old robot project thats been sitting idle probably longer than the @dronebot-workshop robot. (I wonder if project will ever see the light of day again, hint hint 😎  )  It has a motor controller board that sits on an Arduino R3 and I was pondering whether to replace these with a motor controller linked to an ESP32 and use ESP now to transmit navigation instructions inspired by reading some stuff on using UWB for triangulation.  

Anyway the jolly old Arduino and the motor controller was all refreshed in my mind.  The 5v pin on my Arduino R3 uno could be both output 5v (when the Arduino was powered via its barrel jack or via a usb cable), or it could be used to power the Arduino, but not if the Arduino was powered by the other sources.   When powering the Arduino via its 5v pin a 5v regulated power source should be used.  On my bot the Arduino is powered via its 5v pin from a 5v power outlet the motor driver provided for this purpose.  I expect the new Arduino R4 is much the same, but no doubt terrible damage will ensue if the Arduino is powered by both sources simultaneously. 😯 


   
ReplyQuote
(@fishbonzwv)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

I was planing to power the R4 through the barrel jack. I have a 5/12 PS so I can feed the R4 with the 12v and the relay board with the 5v. I can get 12vdc solenoids and use the 12v to feed them and eliminate a 24vac transformer.

Thanks for the inputs.


   
ReplyQuote
(@aliarifat)
Member
Joined: 7 months ago
Posts: 57
 

Posted by: @fishbonzwv

I have a package plant (sewage) with three clarifying chambers. I need to pump the chambers sequentially with a rest time between pumps to let the water table stabilize.

The motor that drives the blower is on a timer and it is adjusted seasonally between 30 and 45 minutes.

Theory of operation is: Timer on for 45 minutes, one minute delay, pick solenoid 1 for one minute, two minute rest, pick solenoid 2, etc. After all three chambers are pumped, how do I keep them from going through the cycle over and over until the timer signal drops out?

I need to use my Iphone to fine tune the on and rest times so that's why I chose the Uno R4 Wifi.

-- attachment is not available --

After the motor timer switches ON, the Arduino will delay for 1 minute.
It will then sequentially activate each solenoid (one at a time) for 1 minute, with a 2-minute rest period between them.
After all solenoids have been triggered, the system will stop pumping until the motor timer switches OFF and then ON again. The code will be like this:
unsigned long blowerOnTime = 45 * 60 * 1000; // 45 minutes in milliseconds
unsigned long solenoidOnTime = 60 * 1000; // 1 minute in milliseconds
unsigned long restTime = 2 * 60 * 1000; // 2 minutes in milliseconds

 


   
ReplyQuote
(@fishbonzwv)
Member
Joined: 5 months ago
Posts: 6
Topic starter  

@aliarifat Thanks for replying but I'm a rookie at this so no clue as to where that would go.

Also the set 45 minutes won't work because my service tech adjusts the time depending on plant conditions. Just last month he adjusted the times twice because of a heat wave.

I'm leaning towards a one-shot relay on the timer input to get the program to run once. I can deal with the pinRead/pinWrite basics.


   
ReplyQuote
Page 2 / 2