Warning! You are not logged in. Log in or create an account to have your edits attributed to your username rather than your IP, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 447: Line 447:
# Spooler
# Spooler


The first thing that Arduino does, when its powered up is to display a welcome message. After that it steps into a while loop and stays there as long as user doesn't feed a valid choice of either '1' or '2' from the keypad. The choice of '1' from the keypad will make the program to check the condition statement for '1' being equal to select the plastic and similarly the choice of '2' from the keypad will make the program to check the condition statement for '2' being equal to feed the temperature. In any of the above case, the program steps ahead by breaking off the loop and goes to the next loop according to the choice made before.
The first thing that Arduino does, when its powered up is to display a welcome message. After that it steps into a while loop and stays there as long as user doesn't feed a valid choice of either '1' or '2' from the keypad. The choice of '1' from the keypad will make the program to check the condition statement for '1' being equal to select the plastic and similarly the choice of '2' from the keypad will make the program to check the condition statement for '2' being equal to feed the temperature. In any of the above case, the program steps ahead by breaking off the loop and goes to the next loop according to the choice made before. If user entered '1' then it will again go to a while loop and will stay there until the user doesn't make a choice between 0~9 for a plastic selection. After selecting the plastic, programs displays the type of plastic and the set temperature and ask the user to confirm by pressing '#' key which is checked by conditional if else statement. If the condition is found to be true the while loop is broken and it steps into the process control loop and it stays there till the end. Similarly for the choice '2', programs steps into a while loop and stays there till a valid input is feed and in this case it is a temperature less than 350 C. If the user press '*' the previous temperature input is cleared from the variable and a new temperature input is taken as long as it is lower than 350 C. After that the programs steps into the condition check mode and waits for the user till he confirms the temperature by pressing a '#' key. As soon as '#' key is pressed, the loop breaks and the program steps into the process control loop and it stays there till the end until someone press the main reset button on Arduino board. In the process control loop, the program stays in a loop continuously monitoring the temperature which is feed by the AD 595 (thermocouple amplifier) to the ADC input of Arduino. Arduino converts that analog value into the digital equivalent and that is further converted into Celsius scale by suitable multiplication of a factor. After reading the temperature Arduino steps into conditional statement comparison mode and compares various operating conditions explained in the subsequent section and on the basis of that controls the power of the heater. Partial PWM mode is used to control the heater power, however the DC motor is just controlled on/ off by the Arduino and the speed of the motor is controlled by the linear regulator and its value varies by resistance of the potentiometer which is manually controlled. By changing the value of potentiometer, output voltage gets changed and the corresponding power to the DC motor also gets changed. The spooler is a simple variable speed stepper motor driver which is controlled by another Arduino board and is synchronized with Arduino Mega which is hosting the recyclebot process control. Whenever the DC feed motor is on/off the stepper motor also performs the same, with the difference that its being controlled by different Arduino. This step in process control gets repeated infinitely and is programmed to keep the temperature of the barrel within the set range of temperature which is 15 C above and below the set values. Sometimes it may happen that the system temperature will exceed the set temperature, but in that case the program will adjust itself in such a way that the barrel temperature will get down within the range in a short duration depending upon the operating conditions.<br />
 
If the user entered '1' then it will again go to a while loop and will stay there until the user doesn't make a choice between 0~9 for a plastic selection. After selecting the plastic, the program displays the type of plastic and the set temperature and asks the user to confirm by pressing '#' key which is checked by conditional if else statement. If the condition is found to be true the while loop is broken and it steps into the process control loop and it stays there till the end.
 
Similarly for the choice '2', programs steps into a while loop and stays there till a valid input is feed and in this case it is a temperature less than 350<sup>o</sup>C. If the user press '*' the previous temperature input is cleared from the variable and a new temperature input is taken as long as it is lower than 350<sup>o</sup>C. After that the programs steps into the condition check mode and waits for the user till he confirms the temperature by pressing a '#' key. As soon as '#' key is pressed, the loop breaks and the program steps into the process control loop and it stays there till the end until someone presses the main reset button on Arduino board.
 
In the process control loop, the program stays in a loop continuously monitoring the temperature, which is fed by the AD 595 (thermocouple amplifier) to the ADC input of Arduino. The Arduino converts that analog value into the digital equivalent and that is further converted into Celsius scale by suitable multiplication of a factor. After reading the temperature, the Arduino steps into conditional statement comparison mode and compares various operating conditions explained in the subsequent section and on the basis of that controls the power of the heater. Partial PWM mode is used to control the heater power, however the DC motor is just controlled on/ off by the Arduino and the speed of the motor is controlled by the linear regulator and its value varies by resistance of the potentiometer, which is manually controlled. By changing the value of potentiometer, the output voltage gets changed and the corresponding power to the DC motor also gets changed. The spooler is a simple variable speed stepper motor driver, which is controlled by another Arduino board and is synchronized with Arduino Mega which is hosting the RecycleBot process control. Whenever the DC feed motor is on/off the stepper motor also performs the same, with the difference that its being controlled by a different Arduino. This step in process control gets repeated infinitely and is programmed to keep the temperature of the barrel within the set range of temperature which is 15<sup>o</sup>C above and below the set values. Sometimes it may happen that the system temperature will exceed the set temperature, but in that case the program will adjust itself in such a way that the barrel temperature will get down within the range in a short duration depending upon the operating conditions.


== How to Assemble (Electrical Components) ==
== How to Assemble (Electrical Components) ==
Warning! All contributions to Appropedia are released under the CC-BY-SA-4.0 license unless otherwise noted (see Appropedia:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here! You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted material without permission!
Cancel Editing help (opens in new window)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.