Filter: hardware,software, code, computer science, tech, life, robotics

Automated Indoor Garden - Part 2 - Electronics

The second part of the project would bring my indoor garden to a automated tiny farm. Using pumps, moisture sensors, and micro controllers I would create a system that would allow for a fully automated garden where each plant was individually catered to. My goal was to create a system that would support up to 14 plants. This would require 14 pumps, 14 soil sensors, 14 tubes and cables, and all the wiring, power units, processing units, voltage regulators, and micro controllers that came along with the package.

Automated Indoor Garden - Part 1 - Concept and Testing

I don't remember how I got the idea, but it has stuck with me for a few years - a fully automated indoor garden. This was a great winter project, and it started with a sketch of the system. I was interested in having a tiny year-round indoor farm at home to supplement fresh groceries, learn about plants and gardening, and the engineering challenge.

I then started researching and designing the containers. I knew I wanted to have some sort of interchangeable hanging system, I knew I wanted it to be pretty (not the classic PET coke bottles). With a 3D printer I created supports and ring enclosures.

Once I had sourced the basic container and tested it's strength and feasibility, I set out to create the frame, which was made to fit exactly in front of my kitchen window. Under the frame I placed a series of boxes that I could use to store the water containers and electronics.

The next task was designing the pump system. The plan was to have each plant pumped water individually. This would allow for a very fine tuning of the system for each plant. I considered using a single pump with valve system at first, but quickly found out it was much easier and cost effective to create a an individual pump for each plant instead of the valves. The pumps I settled on are peristaltic pumps, which have the special property of working in a closed system for the fluid loop. This means that they are less prone to leaking, oxidation and calcium blockage. I placed an order for all the parts and tested whether the pump could push water up 2 meters.

The initial bottle design was extended to allow for a ring and T section to distribute water around the perimeter of the opening for the plant. This ensures that the plant and soil is watered on a larger area that if there was a single drip point. The water loop let me finalize the design of the bottle which is made up of five 3D printed parts, some transparent tubing and hemp string.

With a few test bottles finished, I decided to test the system by planting some seeds. This happened in January.

Message in a Bottle

At the office we recently had the idea to send a potential client a coded message-in-a-bottle. We upgrade the idea with some electronics to make the bottle not only become the container, but also the carrier of the message. The bottle flash and beeps morse using a microcontroller, led and micro-speaker. It can run on a battery for multiple days on a single charge.

Air-Cooled Bed

I'm always too hot in my bed, so I set about to create a air-cooling system for my bed. The bed I had designed and built a year earlier, knowing that I might undergo some sort of cooling system renovation, so it was easy to implement the changes. On my night-table, or night-box, I built in a few switches to adjust and control the cooling system. I guess you could say my bed is now a 'smart-bed', as it know also incorporates a temperature sensor so the cooling can automatically adjust.

The 20 super-silent cooling fans pull air from the masthead through the frame over the bottom the mattress and out of the base of the frame. The fans are connected on two power bus's which can be controlled separately.

Flightsim

I recently was fascinated by flight simulators through a visit to the Flight Museum in Duebendorf, Switzerland. I wanted one myself, so I set out to build one through the winter. My goal was to build a complete two-man cockpit through the course of a few weekends.

YouTube Video

Flight Sim Construction Plans

Flight Sim Construction Plans

Flight Sim Painting

Flight Sim Frame

Flight Sim Panels

Flight Sim Panels

Flight Sim Panel Detail

Flight Sim Finished

Tags: hardware,software

Solar Capture

The Earth-orbiting Solar Dynamics Observatory provides a live image feed of the sun at all times. The Solar Capture app basically displays these images from NASA and provides a simple interface for browsing them and saving to disk. This is especially handy for tonight's Venus Transit! With the tool you can watch live as Venus passes across the Suns surface while capturing all the data for viewing later.

Solar Capture

Solar Capture

Just open the app, select an empty folder to store images, and it will start updating automatically. There is no need to set the update interval smaller than 15 minutes, as the images on the NASA server aren't updated more frequently.

Binary Download: SolarCapture-0.2_osx.dmg

Source Download: SolarCapture-0.2_src.zip

PS: You can also let the app run over-night if you are too lazy to get up.

Tags: software

Optimal Lunar Landing Analysis

The Optimal Lunar Landing Analysis software is part of the NASA International Space Apps Program, and serves as a platform for processing lunar data in order to find optimal landing sites for spacecrafts. The data used for testing was provided by the Lunar Reconnaissance Orbiter (LRO) mission.

The software provides an extensible framework for which multiple data sets are used by a series of analysis strategies to come up with a good landing solution while providing strong visual feedback mechanisms for both the strategy development phase and the strategy analysis phase.

Multiple data sources have been implemented along with five analysis strategies, as well as a robust multi-threaded backend and GUI.

Optimal Lunar Landing Analysis

Optimal Lunar Landing Analysis

The project is hosted on GitHub and licensed under the MIT License. I've spent a lot of time preparing the framework for others to expand on. Implementing strategies is really easy:

class ElevationAnalysisMap : public AnalysisMap
{
private:
ElevationDataMap *_elevationMap;

public:
explicit ElevationAnalysisMap(ElevationDataMap *elevationMap, QSettings *settings, QObject *parent = 0) {
// Init
_name = "Elevation Analysis";
_elevationMap = elevationMap;
}

virtual double calculateScoreForPoint(int x, int y) {
// Really trivial implementation: the higher the better...
int elevation = _elevationMap->getElevationAtPoint(x,y);
int minElevation = -9150;
int maxElevation = 10760;
return (double)(elevation - minElevation) / (double)(maxElevation - minElevation);
}
};

Project Page

Source Download

Tags: software

File Renamer

File Renamer lets you easily and quickly rename multiple files using a simple text editor. More than often this is much faster than using the OS's shell rename function on each file. The utility also features a quick find-and-replace utility to make common edits even faster.

File Renamer can be called from within Gnome on any file or folder.

Opening a folder lits all the files.

Find-and-replace can be useful.

File Renamer also works on OS X.

Binary Download: FileRenamer-0.1_linux_amd64.zip (Linux)

Binary Download: FileRenamer-0.1_osx.zip (OS X)

Source Download: FileRenamer-0.1_src.zip

Tags: software

Qt Manual/Fixed Layout Manager ("QManualLayout")

I still question whether I missed something very obvious, but it seems difficult to manually layout widgets in the Qt Framework, and there isn't any provided QManualLayout layout manager. Below you will find my implementation of one. And yes, there are plenty of special cases where you might need one. Using my layout manager you can place widgets anywhere on the layout using the common widget methods such as move(), resize(), and setGeometry().

/*******************************************************************
**
** Qt Manual/Fixed Layout Manager ("QManualLayout")
** ManualLayout.h
** v1.0
**
** This layout manager lets you easily programmatically place
** widgets in a fixed/manual method. Widgets can be placed
** in a fixed method and dynamically moved on the layout manager's
** widget resizeEvent(QResizeEvent*) event.
**
** Usage:
**
** this->setLayout(new ManualLayout());
** QWidget *widget = new QWidget(this);
** widget->setGeometry(10,10,200,100);
**
** Copyright 2012 Dan Krusi, Nerves Design & Engineering
** dan.krusi@nerves.ch | www.dankrusi.com | www.nerves.ch
**
*******************************************************************/

#ifndef MANUALLAYOUT_H
#define MANUALLAYOUT_H

#include <QtGui>
#include <QList>

class ManualLayout : public QLayout {

private:
QList<QLayoutItem*> list;

public:
ManualLayout(QWidget *parent): QLayout(parent) {}
ManualLayout(): QLayout() {}
~ManualLayout();

public:
int count() const;
void addItem(QLayoutItem *item);
QSize sizeHint() const;
QSize minimumSize() const;
QLayoutItem *itemAt(int) const;
QLayoutItem *takeAt(int);
void setGeometry(const QRect &rect);
};

#endif // MANUALLAYOUT_H

/*******************************************************************
**
** Qt Manual/Fixed Layout Manager ("QManualLayout")
** ManualLayout.cpp
** v1.0
**
** This layout manager lets you easily programmatically place
** widgets in a fixed/manual method. Widgets can be placed
** in a fixed method and dynamically moved on the layout manager's
** widget resizeEvent(QResizeEvent*) event.
**
** Usage:
**
** this->setLayout(new ManualLayout());
** QWidget *widget = new QWidget(this);
** widget->setGeometry(10,10,200,100);
**
** Copyright 2012 Dan Krusi, Nerves Design & Engineering
** dan.krusi@nerves.ch | www.dankrusi.com | www.nerves.ch
**
*******************************************************************/

#include "ManualLayout.h"

int ManualLayout::count() const {
return list.size();
}

QLayoutItem *ManualLayout::itemAt(int idx) const {
return list.value(idx);
}

QLayoutItem *ManualLayout::takeAt(int idx) {
return idx >= 0 && idx < list.size() ? list.takeAt(idx) : 0;
}

void ManualLayout::addItem(QLayoutItem *item) {
list.append(item);
}

ManualLayout::~ManualLayout() {
QLayoutItem *item;
while ((item = takeAt(0))) delete item;
}

void ManualLayout::setGeometry(const QRect &r) {
QLayout::setGeometry(r);
}

QSize ManualLayout::sizeHint() const {
QSize s(0,0);
int n = list.count();
int i = 0;
while (i < n) {
s = s.expandedTo(list.at(i)->sizeHint());
i++;
}
return s;
}

QSize ManualLayout::minimumSize() const {
QSize s(0,0);
int n = list.count();
int i = 0;
while (i < n) {
s = s.expandedTo(list.at(i)->minimumSize());
i++;
}
return s;
}

You can download a demo project including the source here:

Source Download: ManualLayout_src.zip

Tags: code

SVN Global Ignore

Are you annoyed by setting svn:prop on all your repositories and subdirectories with the same redundant ignore lists? There is actually a handy configuration setting called global-ignores which will let you ignore specific files client-side in a global fashion. All you have to do is edit your SVN client config file at ~/.subversion/config with something like the following:

global-ignores = *.o *.lo *.la *.al .*

Tags: computer science

Page 1 of 10 Next »