This is my latest schematic. There is an error in the connections to the L293 motor driver, the VIN of 19-20 volts goes to pin 8 not pin 1
This is the schematic showing the LCD wiring. This is identical to the LCD shield wiring.
This is what the LCD screen looks like in an earlier version. I could use a bigger screen! The LCD is saying the voltage is .51 volts and .25 volts across a 1K ohm resistor for a current of .25ma, it never reaches 1 ma during over 4 hours of operation. Every 30 minutes the Arduino reverses the polarity and the LCD will then show around 17.7 volts. The bottom line has the run time.
This is what the LCD looks like after over 30 minutes of operation, when the polarity is reversed. The voltage and current bounce around a lot, likely because of the noise from the air pump motor.
This picture shows the Colloidal Silver Generator actually running. The Air pump stirrer has been added with 20 ohms in series to reduce the motor noise. Also the motor ground must be separate from the other grounds because of all the electrical noise that the motor makes.
Arduino Colloidal Silver Maker |
Here is another picture. The resistor divider and L293 motor controller are now located on the top of the colloidal silver maker. Eight wires then run down to the Arduino. There are two ground wires, one ground wire for the motor controller and one ground wire for the voltage divider.
I tested this design for a few minutes with a 19 volt laptop AC adapter. Only 17.7 volts made it to the colloidal silver maker. The Arduino voltage regulator got very warm but survived. I disconnected the air pump for this test because it is rated for 12 volts maximum and runs best at 7-9 volts. I have since added a PWM output from the Arduino for the air pump of 1/2 of the power source or 10 volts for 20 volt operation.
The Arduino's PWM ability is used to regulate the current to the Colloidal Silver maker to just under 1 ma. The over current shutdown is set to 2.0 ma.
There is a video of it running at this link: https://youtu.be/3ap4-GnGx_8
/*****************************
Arduino Colloidal Silver Maker
By Bob Davis
April 2020
Use a 16x2 LCD display shield or equivalent
Shows the voltage, current, and run time.
The circuit:
* LCD RS - D9
* LCD Enable - D8
* LCD D4 - D4
* LCD D5 - D5
* LCD D6 - D6
* LCD D7 - D7
* LCD R/W and VSS pin to ground
* LCD VCC and LED pin to 5V
* 10K variable resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
* Uses L293 motor controller on D10 adn D11 for PWM ability
* Uses L293 on D3 for stirrer motor.
*********************/
// include the library code:
#include <LiquidCrystal.h>
// initialize the library with the numbers of the
interface pins
LiquidCrystal lcd(9, 8, 4, 5, 6, 7);
// Pins for Colloidal silver maker
int CS1=10;
int CS2=11;
// Pins for stirrer
int Stir=3;
int Shutdown=0;
// Variables for time
int hours;
int minutes;
int seconds;
long hour = 3600000; // 3600000 milliseconds in an hour
long minute = 60000; // 60000 milliseconds in a minute
long second = 1000; // 1000 milliseconds in a second
float AN1=0.0; // Analog inut 1
float AN2=0.0;
float temp1=0.0;
float temp2=0.0;
float CUR=0.0; // Current in ma
int CurSet=255; // Current Setting
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
pinMode (CS1, OUTPUT);
pinMode (CS2, OUTPUT);
pinMode (Stir, OUTPUT);
}
void loop() {
// Reverse current every 30 minutes
if (Shutdown==0){
analogWrite(Stir, 128); // 1/2 supply voltage
if (minutes<30){
analogWrite(CS1, 0);
analogWrite(CS2, CurSet);
}
else{
analogWrite(CS2, 0);
analogWrite(CS1, CurSet);
}
}
else{
analogWrite(CS1, 0);
analogWrite(CS2, 0);
analogWrite(Stir, 0);
}
temp1=analogRead(A1);
AN1=((temp1*5.0)/1024.0)*4.0;
temp2=analogRead(A2);
AN2=((temp2*5.0)/1024.0)*4.0;
CUR=abs(AN1-AN2);
if (CUR > 1.0) {CurSet--;} // Reduce PWM
lcd.clear();
lcd.setCursor(0,0);
lcd.print("V:");
lcd.print(AN1);
lcd.setCursor(8,0);
lcd.print("V:");
lcd.print(AN2);
lcd.setCursor(10,1);
lcd.print("C:");
lcd.print(CUR);
// print the number of seconds since reset:
long timeNow = millis();
hours = (timeNow) / hour;
minutes = ((timeNow) % hour) / minute ;
seconds = (((timeNow) % hour) % minute) / second;
lcd.setCursor(0, 1);
lcd.print("T:");
lcd.print(hours);
lcd.print(":");
lcd.print(minutes);
lcd.print(":");
lcd.print(seconds);
if (hours>3){ // Time under 4 hours
Shutdown=1;
}
if (CUR>2.0){ // Current under 1ma
Shutdown=1;
}
delay(300);
}
No comments:
Post a Comment