I was (and hope to again) working on a PID loop for the dragon’s main light. The idea is simple- vary the heat lamp using a servo and rheostat. Some of you have expressed interest. Here are the photos of the servo setup. The code however is so bad I don’t even know where to start. If you get something working please let me know!
The servo and linkages work perfectly through the full 180 degree range. The issue is the PID code….
Continue reading “PID Hardware Photos”
Wikipedia says that a proportional–integral–derivative controller (PID controller) is a generic control loop feedback mechanism (controller) widely used in industrial control systems – a PID is the most commonly used feedback controller. A PID controller calculates an “error” value as the difference between a measured process variable and a desired setpoint. The controller attempts to minimize the error by adjusting the process control inputs.
Continue reading “PID? What is it?”
My LCC project is growing. Too much I/O is needed! I’m exploring the I²C bus system. It seems simple enough.
Direct I/O is nice but is wasteful- I’ve used all the I/O already on the LCC project but I still need more! Wikipedia has a great write up all about it. Now I have to apply it to Arduino!
For my LCC project I decided to use a 2N4401 NPN transistor to control status LEDs and AC Switches. I did this so that the power draw from the Arduino chip would be as low as possible.
Below is a diagram of how this works. I used a 2N4401 NPN transistor that “turns on” when the gate goes high or positive. This essentially allows it to switch the negative or ground leg of the circuit. I did this because the Arduino can’t turn a digital IO line to ground- just 0v or 5v. Continue reading “Using a Transistor to Control an LED or anything”
On my last project– which still isn’t done yet- the buttons for changing the temp display are very unresponsive.
The reason of course is because the Arduino has to loop through all the main code before getting around to checking the button status.
I found the cure! Interrupts!
EngBlaze has a great write up on how to use this. Whew! One less I have to write! Read it here. I’ll be modifying the Tri-Temp code to use interrupts soon. Sweet!
This was my first sensor. It’s a digital temperature and humidity sensor. It uses three pins, two for power and one for data. It worked perfectly…except….the libraries provided by Virtuabotix ($9.99 via Amazon.com) didn’t work with the Arduino IDE v1.0.
So if fixed it!
Continue reading “DHT11 Digital Temperature & Humidity Sensor”
This example shows the code to control a servo on digital pin 2 via a potentiometer on analog pin 0.
You can change the pins around via the variables in the beginning of the sketch.
Continue reading “Code to Control Servo via Potentiometer”