Imagos Consulting

Supporting Small Business

Tracking Solar Collector Output

Recently we added a photo-voltaic array to our eco-hosting infrastructure. While generating electricity through a Solar photo-voltaic array is a great way to generate power many systems do not allow you to track the operation of the array over a long period. This project uses an Internet of Things (IOT) approach using the Blue Refraction monitoring platform, a small open-source Arduino micro-controller and a few additional components to track the voltage output from a solar array. The project components include:

  1. Account on Blue Refraction
  2. Arduino Duo microcontroller
  3. Arduino Ethernet shield
  4. Resistors to suit
  5. Cabling to suit

To measure the output of the array I used a an Arduino micro-controller with some simple custom electronics to form a voltage divider to measure the voltage on the PV array and send the logged data to on account on Blue Refraction. Below is a diagram of the voltage divider:

volt-divider

The circuit with the particular values shown has an input impedance of 1MΩ + 100kΩ = 1.1MΩ and is suitable for measuring DC voltages up to about 50V.

Below is a photo of the Arduino micro-controller with an LCD shield:

Arduino PV logger

Blue Refraction shows logged events by defaults for the last 24 hours. Below is a image of the report from the PV logger:

solar pv output

Please contact me if you would like details of either the Arduino logger or setting up monitoring using Blue Refraction.

No Comments »

Recovering WordPress Posts

If you ever have to retrieve WordPress posts from a MySQL database the following query may be handy:

SELECT wp_posts.post_title as Title, wp_posts.post_date as DATE,
GROUP_CONCAT(wp_terms.name) AS TAGS, wp_posts.post_content as CONTENT FROM wp_terms
INNER JOIN wp_term_taxonomy ON wp_terms.term_id = wp_term_taxonomy.term_id
INNER JOIN wp_term_relationships ON wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id
INNER JOIN wp_posts ON wp_posts.ID = wp_term_relationships.object_id
WHERE post_type LIKE 'post' AND post_status LIKE 'publish' GROUP BY wp_posts.ID order by post_date

I would recommend the WordPress interface layer for general application access to a WordPress database.

Comments Off on Recovering WordPress Posts