Hi,
i built my own aqua-controller which includes following features:
- PWM control of my LED lighting with three meanwell power supplies 4.5A / 24V and alltogether 17 constant current drivers with PWM
- By using a ULN2003 I control three 24V Dosing pumps, also using the same power supply as for my LEDs
- Controlling of my waterflow pumps by using this motor shield (which I built on my big shield) => using 2 external 12v power supplies http://schmelle2.de/wp/arduino/shields/jumping-ball
- on board RTC with DS1307
- 20x4 LCD
- temperature control for water and air and led cooling
Anyways, please find attached some pictures of my controller.
The problems I am facing now:
I yesterday tested my controller for the dosing pumps. Please see attached the schematics of this control.
I attached the LCD to my controller, a button to turn the pumps on and off and uploaded the code. So far everything worx, when switching the button, nothing bad/good happens. The LCD just works and shows the RTC.
Just as I attach the 24v power supply, my LCD kinda crashes and showe weird symbols. Restarted the arduino.
ok, now the 24v supply is attached, LCD works, dosing pumps attached, button attached.
When I know turn on the button my dosing pump starts working. Good so far. If I repeat it over and over again (on and off) first thing happens is that the LCD again kinda crashes and shows the weird symbols again.
However, I can still control the pump but the entire Arduino crashes after a few more switches and I have to restart the Board.
This is my little test code:
#include <WProgram.h>
#include <Wire.h>
#include <DS1307.h> // written by mattt on the Arduino forum and modified by D. Sjunnesson
#include <LiquidCrystal.h>
LiquidCrystal lcd(39, 41, 43, 45, 47, 49);
int buttonPin=46;
int buttonState;
int lcdmillis=0;
int pumpe1=35;
void setup()
{
pinMode(13, OUTPUT);
pinMode(buttonPin, INPUT);
pinMode(pumpe1, OUTPUT);
digitalWrite(pumpe1, HIGH);
/*
RTC.stop();
RTC.set(DS1307_SEC,10); //set the seconds
RTC.set(DS1307_MIN,01); //set the minutes
RTC.set(DS1307_HR,15); //set the hours
RTC.set(DS1307_DOW,4); //set the day of the week
RTC.set(DS1307_DATE,25); //set the date
RTC.set(DS1307_MTH,6); //set the month
RTC.set(DS1307_YR,11); //set the year
RTC.start();*/
lcd.begin(20, 4);
}
void loop()
{
if (millis() - lcdmillis > 1000) {
lcd.clear();
lcd.setCursor(0,0);
lcd.print(RTC.get(DS1307_HR,true)); //read the hour and also update all the values by pushing in true
lcd.print(":");
lcd.print(RTC.get(DS1307_MIN,false));//read minutes without update (false)
lcd.print(":");
lcd.print(RTC.get(DS1307_SEC,false));//read seconds
lcd.print(" "); // some space for a more happy life
lcd.print(RTC.get(DS1307_DATE,false));//read date
lcd.print("/");
lcd.print(RTC.get(DS1307_MTH,false));//read month
lcd.print("/");
lcd.print(RTC.get(DS1307_YR,false)); //read year
lcdmillis=millis();
}
buttonState = digitalRead(buttonPin);
if (buttonState == LOW) {
digitalWrite(pumpe1, LOW);
}
if (buttonState == HIGH){
digitalWrite(pumpe1, HIGH);
}
}
Summarized:
An external power supply shows impact on my arduino controller and especially the 20x4 display.
So I need somehow to decouple it, making sure that voltage does not impact any other attached circuits on my board.
Or do you have any other idea what causes the crashes and what I should do?
A few wthings about me:
I am still an electronics beginner. Everything I built was with the help of this Forum (the German part). Unfortunately I did not find any solution in the German blog so thats why I try the international one.
I need to get this thing wroking stable, otherwise the entire work was for nothing. The controller will run 24/7 and needs to be stable.
Hope that you have any good ideas
Thy a lot
Thorsten