Wednesday 29 February 2012

ControlP5 library vs Serial library

Click the icon below:


Purpose of the serial library:
The purpose of the serial library is to connect Processing to an external microcontroller. In my Processing sketch we used the serial library to read the data off of an LM35DZ temperature sensor. Without the serial library Processing would be unable to read the data from the Arduino.

Purpose of the controlP5 library:
The purpose of the controlP5 library is to allow the user to interact with the Processing serial/output screen. The user can use dials, switches, buttons and sliders to manipulate the output on Processing's serial.

Click here for a tutorial on how to add a library to Processing

Links:

   Serial                    ControlP5

              
          

Sunday 26 February 2012

Full Fan Control



Click the icons below:







Purpose:
The purpose of this project was to introduce us to interrupts in the Arduino environment. Using interrupts in the future will provide us with more accurate code and will allow us to create and run more complex sketchs.

Procedure:
We used the code from last week but implemented everything needed for interrupts and the rpm equation. The rpm equation is (rpm = 30000/(millis() - timeold)*rpmcount;30000 is the base line for the rpm. There are 60 seconds in a minute and 1000 milliseconds in a second. We then devide 60000 by two because the fan sends a signal every half rotation. (millis() - timeold) is the amount of time it took to do one full rotation. In other words it is simply (total time - the last time recorded). rpmcount un we multiply it by rpmcount because in the sketch we only display it when rpmcount is 100. If we didn't  multiply it by rpmcount o we would be returning one hundred rotations per minute.
Output
Parts list:

Full parts list

Basic parts list:

RFP30N06 MOSFET
TA350DC Fan
LM35DZ
Diode



Friday 10 February 2012

Air Flow Management

Click the icons below:


Purpose:
The purpose of this project was to allow us to run a higher load and the Arduino with the use of only one power supply. In this case we are running a 12v fan. We are continuing with the intention of incorporating our projects in a green house. A proper greenhouse should have its air in constant motion and this project allows us to do just that. The fan changes speeds depending on the temperature to allow for different air flow and to reduce the overall temperature of the green house. 

Procedure:
We started with creating a homemade DC jack the takes the Vin on our board and feeds the power to the Arduino. Next we set up a breadboard that lets us control the fan with the Arduino. We can run this higher load by using a MOSFET. After, we used an LM35DZ to minitor the temperature and used the map function to control the speed of the fan based on the temperature. We calculated the time by using the millis() function in Arduino and dividing it by 1000 to display it in seconds. We calculated the volts being used by using the map function again. To format the serial monitor we used a series of print("\t") and println()'s.

Parts list:

Full Parts List:
LM35DZ
Diode


Pictures: