Wednesday, October 9, 2013

CF to SATA adapter fix

Some time ago, I bought a motherboard (ASUS AT3IONT-i) and a large disk for a project I had in mind. It was the first SATA disk I ever bought, so I was curious as to how that worked.

Plugged it all, and the disk did not work...never got recognised. Strange.

After a lot of investigation, and blaming it on the disk, I remembered I had a CF to SATA adapter lying around bought in a trip to Taipei's electronics area, so decided to give that a try, to rule out the disk.

As I plugged it in, smoke! from one of the regulators. Very strange. Upon some quick investigation, I found out that the 5V and the 12V lines on the power cable were switched, the one that came with the Motherboard. I was upset and thinking of how would they look at me in the shop if I show up with such an argument, that the lines in the cable are switched.

But it was late at night, and I wanted to get it done, so I just disassembled the cable and reassembled it properly. Unfortunately, no pictures of that. All was well afterwards! Except for the adapter that was burned.

So last time I ordered something from Conrad, I remembered that, and ordered some regulators of the same kind. Tonight I did the switch! exciting, as they are SMD components, but it went much easier than expected! Here are some photos:


Burned regulator, AMS1117-3.3


 Regulator removed


New regulator in place!

Now the adapter will go into the black hole of computer components, never to be used again! but at least it is fixed!

Monday, August 12, 2013

Dashboard source...finally

After a long time not having the time to take care of this, and knowing that a lot of you are out there eagerly awaiting it, I finally decided to publish it.

Then the problems started: my outdated OS doesn't interface well with github, which in turn doesn't allow for easy upload of binaries via the web interface.

So after a log of fiddling around, I managed to make a tar.gz file, with, I hope, all the necessary files to get an idea of how it works. here is the link to google docs, where I hosted it:

Dashboard: click here to download

There are a series of PHP files in there ending in "_service.php". These are the files called by the HTML5 page to update the data. They now have fixed data, and you'll have to adapt them to your own infrastructure. Also, I didn't include these service files for every functionality in the dashboard, leaving that as an exercise to you.
Also there are a few places where you'll have to insert the links to your own google agenda(s).

This is how it should look like if you dump it into a folder and access it via a suitable webserver.



Anyway, I think you probably can deal with it, and want to have it more for the design aspect then the actual infrastructure. Either way, enjoy it and have fun with it!

Having seen the recent developments in web technology with respect to sockets and stuff, I think I'll soon take my time to make this more real-time!

Let me know if it works, and if you use it, and also what you make with it!

Thursday, February 7, 2013

Fan controller

As mentioned in the previous post, I am busy with changing a radiator here in the house, and, as part of my investigations into heat distribution efficiency and space efficiency, I decided to try a radiator built in the ceiling with forced air circulation.

This will be placed in the bedroom, in the ceiling, so out of sight, apart from the ventilation grills, in the attic.

The radiator receives the heat from the standard hot water circulation system, and uses a ventilator fan to take the heat to the room.

This particular unit has a 24V DC motor, whose speed is controlled by a 0V to 10V signal, so, like I mentioned before, I built an amplifier which takes a 0 to 3.3V filtered PWM JeeNode output and multiplies it by 3, giving me a nice 0-9.9V. Here is the schematic, made using Fritzing:






It works, a basic test with a very slow sweeping output turns the motor on slowly, ramping it up to maximum speed, and back again to off.
The controller in the JeeNode will read the input and output temperatures using a pair of good old DS18B20's, and controlling the speed accordingly. I am still developing the algorithm for that (will certainly pass by some sort of PID controller).
I don't really plan on using the JeeNode radio for the control part, but will certainly be feeding back statistics later on!
The regulation of the water will be by means of the FHT8V which has now been serving in the room for the last 5 years or so!

This weekend I'll disconnect the current radiator, which takes a huge amount of space in front of the windows, and start the process of assembling the new one. We'll move to a spare room for thermal confort!!

Wednesday, January 30, 2013

PWM

For an upcoming modification to the central heating I need a controller capable of outputting a (standard?) 0 to 10V control signal.

Of course, this is a job for Arduino/Jeenode, and not for some store bough industrial controller.

Since the JeeNode works at 3.3 volts,  I set off to build an amplifier, using an LM358, wired to multiply the input by 3 times, which gives a nice and convenient range of 0 to 10V!

I am still in the process of building the circuit, but for this I needed to get the oscilloscope out.

Once I had the work on the breadboard ready I captured the following images, I thought they were nice.



I wanted to have both lines in the same shot, but my channel B is not working well, so I can only use one channel of the scope.

After I shot these, I proceeded to blow up an LM7805 (why does it have a different pinout from the LM78L12) and consequently blow up my old trusty JeeUSB version 2...I hope I can bring it back to life.

Just a short mention of what the project comprises: 0..10V controller for a 24V ventilator fan, and two Dallas 1820 measuring the temperature of the water flow (in and out). The motor will be controlled based on these.
Soon the circuits and protoboard pictures, later custom PCB's?

Tuesday, December 11, 2012

Server reboot

After 465 days, or one leap year and 99 days, the home automation server rebooted!
 
Not that it wasn't going strong, just the painter/handyman that came around to fix some things disconnected the power, causing the reboot!
 
I still find it impressive that it ran so long with no issues.
 
However, upon the reboot a few problems came to light, mainly due to my lack of knowledge and of proper planning.
 
The little executables that I have written to listen to the arduino that reads the meters, and the JeeLink that a talks to the boiler did not get started upon rebooting of the server, which is not ideal, considering the winter is here to stay. To make matters worse, this happened on a Tuesday, and on Wednesday I was traveling to Berlin for work. If he did it again during my absence, it would not be nice for the rest of the family.
So first, when I got home, I restarted the whole stuff, so that the house would come back to a decent temperature. This already revealed a little bit of the problem, which is that a certain device not always gets the same device driver in Linux. So that was the first problem to tackle, quickly solved with some rules in udev to create an aptly named file under /dev based on the serial number of the device. Only possibility, since both the arduino and the JeeLink both share the same identification information.
Next was to start these executables automatically. I had tried before to put them in init.d, but that had not worked. So, after many reboots to try different configurations, I finally found out that, since my programs are not properly written to be daemons, they never return, and then init.d does not launch them.

The solution came with 'startproc' which launches any executable as a daemon! Put that in the corresponding init.d configuration file and off it goes!

Another reboot to check that all is well, and time to bed!

Did not receive any complaints while in Berlin, so all was good!

I really should use better technologies to get these things going, but I always find that once it is working, it is difficult to motivate myself to improve it! I always move quickly onwards to the next problem...

As a further note, this server, a mini-itx board, has been running the house for 5 years now! I ordered a raspberry-pi to replace it, just due to the power consumption. I now have around 25W, and I hope the Pi will do with at most 10W!

Friday, November 9, 2012

Dashboard once again

It's been more than a year since I last published about the dashboard. And that it because not much happened in that front.

Meanwhile, a friend gave me a tablet, cheap chinese thing, which I planned to use to display the dashboard in a visible place in the house.
The thing could even display the HTML5 and handle the AJAX calls and all, but it was unstable, sleep mode would spend the battery almost as fast as normal mode, slow to boot, bad touchscreen (resistive), and so on, and so on, so I quit on it, and consequently on the progress on the dashboard, as the experience while using it is, in my opinion, of great importance!

A few months later, my wife offered me an iPad, the new retina display model! so that rekindled my interest in the dashboard. I came back to iWeb, expanded the design a bit, and have spend a couple of evenings implementing the functionality...this is the result:


And for the explanation:

electricity and gas consumption: the pointers move, as the data is updated, and shake slightly when stable, to indicate that the thing is alive. The numbers are updated twice a minute.

House control: this interfaces mainly with the FHZ1000 part of the automation. It reads set, measure and desired temperatures, displays the measured, and makes the box green if the room is set for comfort temperature (even if it has not yet been reached) and blue for low temperature. The boxes turn orange is there is no reply.
The buttons for the awnings are toggle buttons: click to extend them and click to retract them, since the system has no idea of what their status is (they can be operated locally). They briefly blink through orange to give feedback that something happened!
climate limited: is a button to limit the maximum temperature to which any room can be set
holiday mode: should set all rooms to a low temperature and out of the standard program. this is the only button not yet functional (and therefore transparent).

Door events: list of the last 4 events on the RFID door.

System messages: reports errors on the system, like now, the weather station has stopped transmitting.

Agendas: list a few items (enough to fill the respective boxes) taken from google calendar. I have a google calendar for the house, where I put the garbage schedule, and other maintenance activities that need to take place.

Outside temperature: like the name says, displays the data from the weather station. Now it displays nothing, since the station stopped working - see system messages :)

And that is it! data is updated on timers, and the agendas on loading of the page.

There has been talk in the tubes about some mechanisms to update data in real-time. That should be the next development, but that might take another few years :) This is nice enough to show to my friends :)

AH! last but not the least, I found out that one can include some lines in an HTML page to make it a iPad app, so, by adding:

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

I can save the page onto the iPad desktop (is it what it is called?) and run it as any other app, without the safari address bar. Only the top bar with the clock and stuff is still visible, but that is even a plus, as it gives you a clock and iPad info!

I'll try to post a screenshot from the iPad soon!

Monday, October 15, 2012

Switch Box

This weekend I finally finished a project that has been on my mind for quite some time: a Switch box!

In a few words, it is a box of electrical plugs, each with its own switch.

A few months ago we changed our old CRT TV by a new flat modern HD thing, mainly to get rid of the annoying little decoder box that we were forced to use in order to see the channels that we liked that were moved from analog to digital, and, since we every night switch off all devices, in the hardware switch we made sure the new TV had such a hardware switch.
So when we come home, all happy with the new TV, and switch, we discover that the nice sound bar that came with the TV not only required a separate power supply (plug) but didn't have a real switch, that allied to some devices hanging around that did not have a hardware switch (DVD player) which required a unplug action, until I hacked a light switch on to the cable, I decided to make the following contraption.

 Under side

 Top side


It is a series of 6 plugs, just like an extension cord, but where each individual plug has its own switch, UK style. I then hid it under the furniture where the TV and all devices rest on, with the plugs nicely hidden under it.
I think these things should be sold in shops! As a side note, I did consider having a remote control for this, using a micro-controller and some SSRs,  but that would complicate it, both in terms of build time, and safety considerations.
I am also not sure I it will ever recover its cost in saved energy, but hey, if we account for the energy I save going around unplugging devices at the plug, it already payed it self off today!

I hope you can get a good idea of the result from the pictures!


Mounted in place



Another view of it in place