BlackMage

Does anyone know this lady?

http://www.youtube.com/watch?v=sU6qr4tJUXw


This morning at around 10:15 I was at the bottom of Kaiwharawhara Road where it intersects with the Old Hutt Road. The little old lady in the video was crossing from the side where Spotlight is to catch the bus coming down Kaiwharawhara Road.

She very nearly got run over. A car and a light van had to brake sharply to avoid hitting her as she ran across 4 lanes of 60km/h road against the lights. Had there been a proper frieght truck she very likely wouldn't have survived. Unfortunately I only have a camera on the back of my bike, but I just happened to get a few frames of her getting into the bus.

I'm hoping someone can identify her or knows who she might be or someone who cares for her and can let them know about this. She was really lucky this morning, but her judgement for crossing roads is really not the best and her luck won't hold out forever.
BlackMage

Parts Wanted

It seems the Wellington tip is about to start taking some e-waste and are encouraging people to take their old CRT televisions to dump before the digital cutover in a few months. They will be charging a reduced rate of $5 per TV, going up to $20.

http://wellington.govt.nz/services/environment-and-waste/rubbish-and-recycling/recycling/ewaste

I'm after certain parts that are found inside old CRT televisions. So if anyone is looking to get rid of an old TV (preferably working) and is in the Wellington region I will take it off their hands for free. I will then retrieve the bits I want and dispose of the rest via this new tip scheme. I'm particularly interested in larger TVs (so long as it will fit in my corolla) and I'm not really interested in any that are damaged unless it's cosmetic only.

Pass it on. :)
BlackMage

I2C Speed Tests

So I finally got around to finishing this up.

My test bed is an Arduino Uno as the master and an ATtiny2313 running some custom code utilising a library by Don Blake from AVR Freaks (usiTwiSlave.h, usiTwiSlave.c) as the slave. I used Arduino 1.0.3 to compile the master code and AVR Studio 6.0.1996 SP2 to compile the slave code.



First I tested using the Arduino Wire library sending 1 byte at a time. Over 5 tests I got 396, 404, 404, 404 and 424 microseconds. Increasing to 2 bytes yielded 492, 458, 458, 458, 458. Increasing bytes lead to approx 100µs per byte. So it seems the protocol overhead is around 300µs with another 80-100µs per byte of data.

Then I tried the I2C library by Wayne Truchess. The interface is slightly different from the wire library in that he implements the I2C spec a bit more fully with a register byte, where the wire library just sends whatever you give it. To make a fair comparison I used slightly different code to do the single byte comparisons and the multibyte ones. I also got sick of recompiling and flashing the ATtiny slave and reworked its code to include a terminator byte in the transfer. This was also more reliable than just reading bytes until the buffer was empty, but made my smallest test packet 3 bytes (register address, data payload and terminator).

Code:
Arduino Wire Master
Arduino I2C master
Single byte slave
Multibyte slave

Then I put the I2C library into fast mode (400kHz vs 100kHz) and re-ran the multibyte tests had a play with Open Office and...

Averaged results over 10 test runs


So you can see the I2C library is slightly faster than the Arduino Wire library, and that the fast mode is considerably faster, but this code seems to yield about 2 1/4 x speed increase rather than the 4 I'd expect. The Wire library doesn't implement fast mode at all so I couldn't test it. I'm not sure why all 3 sets show a slightly increased transmission time at 10 bytes.

Extrapolating this out, I get:

15 bytes in 800µs = 53.3333µs per byte
1,000,000µs in a second / 53.3333 = 18750 bytes/sec without protocol or error checking overheads.


Tomorrow night I might post about what distracted me.
BlackMage

I too, do not have the plague.

This is in response to: http://tatjna.livejournal.com/817034.html

I was curious so I bought some food dye. I wish I'd read the instructions first as it does seem blue gives better results than black, but oh well. Black also doesn't taste very nice, which I wasn't expecting.

I also wish I'd cleaned my fingernail before I took the pictures:


I used a 6mm hole so as to do a direct comparison with Tatjna. I'm not really that certain of the results. The area marked #1 seemed to have a patch with a depression in it, possibly damaged. I also wasn't that sure of the difference between large and small buds. There seem to be a variety of sizes with no clear distinction. The arrow pointing at #2 shows 3 buds that I couldn't decide whether they were large or small.

So based on my conservative count, and comparing:

with my zoomed out image I think I'm probably a 'normal' taster with a slightly higher density in some areas. This also fits with my taste preferences and the chart at the top of here.

Aaand I wish I'd done this with less than 1 day before I return to work.


That's 3 wishes, isn't it? Damnit.
BlackMage

Prototype #1 overview

So Tatjna asked me to make her some lights for her rather dim downstairs hall. I wanted to do something with LEDs and AVRs and so this project was born.

The brief:

  • Motion activated
  • 6 individual light sources to be housed in shades made by Tatjna
  • Practical and useful (prettiness encouraged)
  • Doesn't set her apartment on fire (this should probably be the first one)


After a bit of reading and consultation I thought I could probably do something based on 12v dc using Pulse-width modulation and an ATMega. A lot more reading about watts and micro candela and the myriad of differences between incandescent lights and LEDs and I realised I wasn't going to know how bright anything was without seeing it. RGB LEDs were nearly 3 times the price of buying each one seperately, so I got some of these:

Super bright LED Red 25 pack
Super bright LED Green 25 pack
Super bright LED Blue 25 pack

In my travels I stumbled across an LED array calculator. After messing around with it for a while I decided to start with 3 x 4 LED arrays.

red 4 in series plus 150 ohm resistor
green 2 in parallel pairs and 270 ohm
blue 2 in parallel pairs and 270 ohm

In this configuration the red channel draws 20mA max and the green and blue ones draw 40mA each. Originally I thought I'd have to use MOS-FETs to drive the 12v side of things, but these currents are well within the 500mA a BC548 NPN transistor will handle.

Schematic


I tried to arrange them so they were reasonably spread out and came up with
 GB
BRGR
RGBB
 GR

Some pictures of it. I'm using a small piece of light diffusion shield I bought from Stewarts Electrical. $18 for a 4' x 2' sheet should last me a while.

I may look into moving it to AVR GCC for the final version, but for now it's just running this Arduino code. I also have some TLC5940 PWM driver chips to play with in version 2. Given the low number of lights (6 requested) I may be able to get away with multiplexing. Further experimentation is indicated.

This is it running said code: http://youtu.be/cXbVj6ij21E

The green doesn't show through as brightly as I'd like, which seems odd given that they have the highest MCD rating, but such is colour matching with LEDs it seems.

Prototype #2 will have better green and I'm going to experiment with using 4 core telephone cable for leads. The nearest rating I can find is for 26awg wire at 360mA and my current design will max out the ground wire at 100mA. I've tested some with 500mA and it didn't even warm up (unlike my first resistor, RIP).
BlackMage

Arduino, ATtiny2313 & Hardware Interrupts

As part of a larger project I wanted to be able to get 2 AVRs talking to each other. I've been playing with a four digit seven segment display and a type-k thermocouple with the idea of making a temperature alarm and cooking timer. I had the prototype running on my Arduino briefly (until the MAX6675 thermocouple interface chip died a tragically early death, but that's another story), but the time taken to read the temperature from the interface chip is long enough that the display will go blank for a noticeable period.

Read more...Collapse )
BlackMage

Pizza Delivery Boy Detector

Apparently my doorbell is invisible to pizza delivery boys. I'm not entirely sure why, it's a pretty 'doorbell' looking thing.

I can't understand it. They knock, they yell, they hardly ever press.

A while ago I bought a PIR Detector from Dick Smith with the intention of playing around with it.

I figured I would add the two together and add a webcam for good measure. Until I think of something better to do with it I'm using a wireless webcam I also bought with the intention of playing with it. This counts as playing, right?

+ + = ?

There turned out to be quite a few separate components required to do what I wanted and I learned a bit along the way.

DetailsCollapse )