Showing posts with label recycling. Show all posts
Showing posts with label recycling. Show all posts

Thursday, March 31, 2011

Garage door fix

This past weekend I went to dump a lot of the stuff I collect in my garden into the garage. It opened, I dumped all the stuff, and then, when I pressed the button on the remote to close the door, it did not close. Since the door is a bit rusty, I thought that it could be stuck. It wasn't. I tried to force some the movement, it did not move. I released it from the rail, and tried to get the carrier on the rail to move, no success. My neighbor, who is a part time mechanic in the local shop, was passing by, so I asked him, he looked at it, heard it, and suggested that the gears might be worn out. Conclusion, I probably needed a new machine to open and close the door.

So, since there was nothing to loose, I decided to open it up and check if there was something that could be blocking the mechanics of the thing.

Started to take it apart, removed the cover, the motor, a 220V asynchronous I believe (winding in the stator), looked great. Here is a picture of the machine without the cover, sorry for the quality of the pictures, goes to reinforce my disbelieve in mobile phone camera quality...

Fig. 1 - Machine with the cover out, the electronics are still in on the left, where the open cover is

I then saw the electronics compartment, which could be removed by disconnecting the cable headers, so I took it out to have a look, at least out of curiosity.

Then I started looking at it, and realized that there were 2 relays, luckily transparent, which looked a bit dirty, and started to trace how the circuit worked to control the motor.

Fig. 2 - Dirty relays, you can clearly see the sooth, and although the lower one is dirtier, the malfunctioning one was the top one

Fig. 3 - Another view. The machine was tested (geprueft) in March 1990, that is 21 years ago, I hope it will last another 21!

I replugged the electronics and pressed the buttons to see what happened. When the electronics were in the "door opening" mode, all looked well, when in the "closing door" mode, there was a lot of sparking in the relay. So I knew there was a problem there.
I ran to my favorite local electronics supplier - I am lucky to have a nice little shop literally around the corner (3 minutes on the bike) where the guys have all the necessary electronics components, and know their stuff!

So I went there, and after a discussion on the behavior of the relays, which could indicate other failures, we agreed that it could only be the burned contacts. He then disassembled the board to check the pinout, and gave me two new compatible relays!

I came home, removed the old ones, soldered in the new ones, and ran to the garage to try it out.
The result, a nice working door again!

Fig. 4 - Two old relays, one of the legs is missing, so I had to do the same to the new relays.

Fig. 5 - The PCB without the relays. The power adapter is 2x9V, so the relays are being driven at 18V instead of 24V, that might also not be good for the lifetime of the relays (me complaining about something that lasted 21 years)



Fig. 6 - The new beautiful baby blue relays in place and ready for action. Now with blue relays instead of the boring beige transparent ones, the machine looks like something from this decade! maybe I should change the green LED by a blue one to really bring it into the 21st century!

I then decided to change the lock as well, since I did not know where the real key to the garage was (never used the real key since we bought the house) and if the machine would fail with the door closed, I would be in trouble. So that included a late minute run on the bike again to another nice little locksmith, which knows me by now, and always has the right supplies! Of that fix I did not take any pictures...sorry...

I was very proud of my fix, finally the electronics practice with the little projects around the house payed off! 11 euro to fix the garage opener, instead of a new expensive one! Furthermore, I now found the user manual of the machine, a Marantec 100 confort, which, since it is german and from the early 90's, it is complete with a circuit diagram, which enables me to build a new controller if I so wish, maybe one with JeeNodes and solid state relays for reliability (more on that when it comes to the RFID lock!)

Monday, December 27, 2010

End of the year

The end of the year is approaching fast! And if I look back at this blog, for this year it was pretty dead...so one of my resolutions is to make it more active, and report often on the developments here, which are slow, but plentiful.

So I will start by a project which I developed and build early in the year, and never used it, as it was a very impractical solution for the problem it meant to solve.

So, in my quest to measure things around here, and as you might remember from here, I was always curious about how much garbage we make. We separate organic garbage, glass, paper and normal garbage. And since January we have been separating plastics as well.
We then decided that we should aim at bringing the least amount of bags home, by reusing the bags we are given. But as we all know, what we can not measure we can not control, and as such I needed a way to measure how many bags we bring home.

Paper and pencil by the door would probably have done it (and resulted in a more usable solution) but I saw an opportunity to apply some electronics and build a button box, where one could press a button to indicate that a bag was brought home.

I expanded the system to be able to log all kinds of garbage, organic, paper, glass bottles, plastic garbage, bags and all other garbage.

I made use of a JeeNode, of course, and used a pen box to make an enclosure. The result was pretty good I think:


(A few days later I went to California, and found a much nicer knob at a Radio Shack...no pictures though...)

Here is a picture of the guts of the machine:


I made a small board to connect everything to the JeeNode, and managed to scavenge enough pins from the JeeNode for all the necessary connections.
So here is a hint, if you need more than 8 I/O pins with your Jeenode you can use:

The IRQ pin in every port is connected to the IRQ 1 of the Arduino, which is in fact pin 3
Pins 1 and 2 of the SPI connector - connected to Arduino pins 8 and 9 (as in the JeeNode datasheet)
RX/TX in the FTDI connector - connected to pins 0 and 1 of the Arduino
SDA/SCL on the TWI connector - connected to Analog 4 and 5 of the Arduino (I think...I don't remember anymore)

and I bet you can also scavenge a few from the ISP connector. of course, by doing this you are once more away from the encapsulation that the JeeNode libraries aim to achieve...but it is always worth considering for those projects that need a lot of input/output.

In the above project, I used 6 lines to drive the LCD (in 4 bit mode), one for the switch and 2 for the knob, which uses interrupts.

The rotary encoder changes occur during the action, so I needed an interrupt to detect the action in there. More on that on a later post.

So when the power switch is turned on (no low power states) one can choose the type of garbage by turning the knob.
Upon pressing the button, it enters a "add garbage" state, where the user can add (or subtract) garbage in increments of 50 gram again by turning the knob. When a certain time elapses with no changes that amount is added to the running total and the system goes back to the choose garbage mode.

One of the options in the root menu is to send the stuff, which sends the data via wireless to the server.

The data is kept internally in the EPROM and sent over in units of 50 gram (to simplify and use integers only instead of floats), and is converted for display only.

For plastic bags and bottles the user adds units and not weight.

After all this story, I stopped using the machine after one week, after having spent hours weighing all the garbage as it went out - it is a lot of work - and my wife convinced me that I must find a better solution, or just admit that we make as much garbage as everybody else.

One simmering in the back of my head is to connect a scale directly to the system, and maybe use RFID tags to detect which garbage it is...but that is a project for the next 5 years...

I am now considering using this machine to implement my opentherm thermostat, as it has pretty much all I need, apart from the special circuitry for the physical layer.

Next post will be about the JeeNode controlled RFID lock, which, is ready, and if it wasn't for the cold outside I would have installed already!

Thursday, December 31, 2009

New Year!

Happy New Year!!

And this, I declared the "Bag Free Year" :) I explain: we have a bag in the kitchen, where we put all the bags we get from shopping, and, which are to be used in further shopping, garbage collection, etc. It is always our plan to carry a bag around in the pocket, so that we do not need to get one from the shop when buying something. I often have one in my bike rack, but still, the bag in the kitchen has been growing, as there are many occasions when we do not have a bag!
To add to the whole thing, the city where I live has started to collect plastic separately since the beginning of the year, so we decided to try to reduce the amount of plastic, and other garbage. In fact, we decided that if we have to buy a package, we will prefer the plastic ones! as those can go in the recycling instead of the burning oven. Metal is still allowed as that is easily separated.

So, to implement this I will place a paper in the kitchen, where we have to write every plastic bag we bring from the shops...sanctions are not yet in place...lets see what happens! maybe I create a pachube feed for the plastic bags :)

Lets hope this reduced the size of the bag in the kitchen!

Also in my plans is to measure how much garbage we generate by weighing all the garbage that leaves the house...but that is for later.

Meanwhile, have a happy New Year!