Archives Oct. 1, 2011

Saturday 1st October 2011 - 18:51:01

Chip

Today I worked on the door counter project. I was inspired by Dave Jones' EEVBlog #204 and decided to do some of the math (which I'm really not great at and should practice!) instead of just throwing a pot in and then measuring it after.

Because of the overhead in the encoder/decoder arrangement and wireless, a pulse of at least 250ms is required before the other end reacts. This took some messing around with the scope and poking with a bit of wire to work out. When the relay on the door laser clicks, the pulse is very short, maybe 20-30ms.

To stretch out the pulse I used the 555 timer in monostable mode. Pin 2 of the 555 is pulled high by a 10k resistor. The output (pin 3 of the 555) is tied via a resistor to the base of a transistor. The transistor, an NPN BC548, is sitting across the pushbutton on the transmitter with its collector on the +5v side. When a falling edge (high to low transition) is detected on pin 2 of the 555, pin3 goes high for a fixed length pulse (unless pin 2 is maintained low for longer than the pulse time). The pulse length can be calculated using t (time) = 1.1RC.

With a desired pulse time of 250ms we can work out the resistor and capacitor required. I chose 10uF to start with and worked out R from there.

Here is a scope grab. It worked out pretty close.

Saturday 1st October 2011 - 09:14:38

Chip

Grass! It's like the day of the Triffids here. I couldn't mow last weekend because it rained. I've been thinking more and more about a project to use servos. I think a small lawnmower engine PID with throttle on a servo would be cool which regulated the revs. Later, a full RC mower.

I've got to finish off the door counter (which I mentioned as finished in an earlier blog). The counter hardware it's self is finished, but I need to write software for the linux box and I also need to make TX/RX arrangement to send the door clicks to the counter. The original plan was to have the whole unit next to the door and run a long serial cable. I've sinced decided that we're going to use some 315MHz TX and RX modules from work which means I need to make an monostable oscillator to extend the pulses long enough to make it through the RX and TX modules - if they are too short, they don't register at all. I am thinking at least 100ms.