Thursday, May 20, 2010
Monday, April 26, 2010
Find more info about the sheet at http://sites.google.com/site/mechatronicsguy/arduinocheatsheet
Thursday, February 11, 2010
Avatar-X's electric meter reader project. This is, in my opinion, the most elegant and unobtrusive way of obtaining the information I needed. He was gracious enough to share his wonderful code that converts the data received from the Arduino into real-time costs. In fact, most of my code comes directly from him. I just tweaked it for my own needs. Thanks again Av!
Like Av's setup, my electric meter has an infrared LED that blinks each time a KW of electricity is used. I placed an infrared photoresisitor directly in front of this LED ready to detect each time it turned on. The Arduino board reads the resistance from the IR sensor and the determines the amount of time that has passed between flashes. This time differential allows me to determine how much electricity is being used at any point in time.
In my case my meter is outside and exposed to the elements. My setup required that the phototransistor be well protected from the elements. In addition, i need it to be flexible enough so it could be displaced by the electric company's technician if it ever needed to be accessed. I have noticed that FPL still reads the meters manually. This person still walks from home to home and reads the values from the meter. My IR resistor needed to be easy to move so if it needed to be taken out of the way it could be put a side with no damage to itself or the meter. I decided to use PVC tubbing to protect the cables from the Arduino board processing to the IR photoresistor facing the meter.
(the pics below show the PVC tubbing i used and how they protect the cables that connect the IR resistor to the Arduino board. The IR resistor is on a 90 elbow and has been sealed with silicon to protect it from the weather.)
Web Interface Flash Graph
Open Flash Chart. I will probably make this graph more interactive by allowing the user to select time spans to see data in more detail.
Android Phone App
example work i found online, i basically wrote an rss reader. This means obviously that I also had to write an rss provider too. So i made one following this very simple example.
The feed now shows me the latest data coming from the meter. I also plan to expand the app to give me usage graphs and other more useful data. Perhaps an alarm when consumption goes over certain threshold during certain times and days (Like when my wife and I are at work) and others. Lots of little ideas, just not enough time!
Hope you enjoy it! Again, thanks to Av and the other people who posted their content so me, and lots of other people can use it.
Monday, December 14, 2009
- I definitively suck at carpentry or anything that requires extreme detail wood work. Even with the right tools i make more mistakes than...@#%#@!!
- MDF sucks! :)
- Connecting these solar cells was harder than i thought. It is an exercise on patience and perseverance. If you've committed lots of sins, this is a good way to atone!
- Oh... i also hate plexyglass... but it's better than regular glass
Monday, June 29, 2009
Una maquina controlada por Arduino, rayos laser, y es inalámbrica (wireless) que le da comida a mis gatos automáticamente.
He pasado las últimas semanas diseñando un aparato que pueda dispensar comida a mis gatos en una forma sistemática y predecible. El resultado es esta máquina.
El cilindro descansa en dos barras metálicas para darle fuerte soporte y también una forma de girar sin restricción. La rotación viene de un motor servo cuyo cual es controlado directamente por el Arduino.
El cilindro tiene una apertura en su lado. Cuando este gira, la apertura permite que la comida dentro de el salga y caiga por tubos de PVC a los dos contenedores donde los gatos pueden comer.
Un rayo laser es usado para calcular la posición del contenedor. El laser está apuntando a un sensor de luz. En uno de los extremos del contenedor cilíndrico hay un pedazo de madera que actúa como indicador de la posición de la apertura de la comida en el cilindro. Este trozo de madera está alineado con la apertura de comida. Este también está en el mismo plano que el rayo de laser iluminando el sensor de luz. Cuando la apertura de la comida está mirando arriba (y por supuesto no dejando que la comida caiga) el pedazo de madera bloquea el rayo de laser y no deja que ilumine el sensor. De esta forma el Arduino sabe cuando el contenedor no está dando más comida.
La idea de usar el rayo laser para detectar la posición del contenedor viene de este blog.
Finalmente, el aparato tiene un reloj en el Arduino que le comanda a dar comida cada cuantas horas. Un usuario también puede conectarse al aparato por medio de una página de internet y observar su operación por medio de una cámara conectada a otro computador. El aparato tiene un modulo de comunicación inalámbrico (Xbee) que recibe y manda datos a un computador servidor. El usuario, por la misma página de internet, puede mandar comandos para dar comida inmediatamente, activar o desactivar el reloj, y otros. Los videos, aunque narrados es Ingles, tienen una buena explicación grafica de cómo funciona y se usa.
Mi mayor problema fue controlar el motor precisamente. Debido a que los motores son susceptibles a cambios de voltaje y corriente, los motores deben ser conectados en una forma especial. El proceso de “de-coupling” debe ser implementado para que el motor no se vuelva loco en media de su funcionamiento. Esta página tiene una muy buena explicación de esto.
¡Finalmente! Los videos. Excuse que este en Ingles. ¡Espero poder traducirlos en el futuro!
Cualquier comentario productivo será my agradecido. Muchas gracias por leer. Por favor excuse my español. :)
Monday, June 22, 2009
I have spent the last several weeks building a device to automatically dispense dry food to our two adorable cats. The cats need to be ona diet due to weight issues. So a certain amount of food must be given to them throughout the day.
i learned about the Arduino board soon before starting this project. So this little hobby has given me the perfect opportunity to learn more about this amazing device and its ever-expanding capabilities.
The cat feeder is basically a cylindrical container that has an opening on its side. The cylinder rests on its side and is supported by wooden dowles and rollerblade ballbearings which allow it to rotate with ease.
The rotation is provided by a wheel attached to a small motor. the signal and power is provided by an Arduino Duemilanove.
When the cylinder spins, the opening allows food to fall off when the opening faces down. A funnel system then drives the food to a Y type PVD junction which distributes the food evenly to two bowls. Since the food is dispensed to both bowls at the same time, the cats eat toegether and therefore minimizes the chances that one cat its share and then try to eat from the other's.
When the cylinder needs to be refilled, my wife or I can just pick up the cylinder, open one side, and fill it up. Then we replace the cylinder and make sure the plastic cover is properly set and positioned. This is important because otherwise the food will start falling off.
When the motor runs, it makes the cylinder rotate a certain amount of times. However, since the cylinder may provide varying resistance due to its weight (due to the amount of food in it) then a laser-driven sensor is also put in place to make sure the cylinder is repositioned in the right place to prevent premature spillage.
The plastic cover that closes the lid of the cylinder has a piece of wood that acts as a signal blocker. This piece of wood basically blocks a laser bean from illuminating a light-dependent resistor (LDR). When the piece of wood is positioned correctly, it will block the laser. If the LDR detects the laser, this is a notification to the Arduino controller that it needs to readjust the cylinder. It will continue doing this until the LDR no longer receive light from the laser. I must provide great thanks to the author if this blog for his use of laser and LDRs
Here are some videos detailing the various elements that make up the feeder...
UPDATE: I've added some other videos to show the device details...
Improvements as of 6/22/09
- Connection between PC and feeder is now wireless using Xbee modules. Now the cat feeder is free to be anywehere around the house. Just needs a power connection.
- A web interface has been created which allows the control of the device via a web site. A web cam with live video feed has also been setup to monitor the feeder and the cats.
By far, my biggest challenge was something called "de-coupling" The idea that a motor, or any device that generates electromagnetic force, can disrrupt the circuit and cause devices to go nutty. i found this web site , as well as the Arduino.cc forums, very useful while trying to figure out how to use capacitors to resolve this issue.
- Improve the way the container rotates. I don't really like the way i have to fill it at this time.
- Implement a better timer solution in the Arduino. I'm looking at the MSTimer2 libraries, will see if this have better results. While my current solution works fine, i am sure there are better ways to solve this issue.
Constructive and helpful comments and suggestions are always welcomed!