Accidents happen... hoppefully only in 2009

I apparently only write about my bike(s) when something bad happens, well today I was ran over by a car...
I was comming from Pavillonengracht through the Stille Veerkade, night had just fallen, I was returning home after a small "shop tour" looking for agendas for 2010, a small computer mouse and a couple of pen refills.

View Larger Map
I had my lights on, as I remember turning them on when leaving the last shop. I had the priority and I saw the car waiting, I thought he saw me... Unfortunately he did not! The car hit me on the pedals, lost my balance and fell to the floor on my side and hit the head. I was amazed on how fast the general public reacted, immediately someone came to me, told me not to move and called emergency service. They started talking to me too fast for me to understand, I asked if they could speak in English and they all changed to English. They asked the usual questions, "if I had lost conscience?, pain in the neck?, if I thought I had anything broken?", "No,No,No" I said... the police arrived checked how I was, followed in a few minutes by the ambulance. By then I was pretty sure that I had nothing very serious, but I could have a broken rib.
In the ambulance a quick check was made, nothing broken just some bruises... Blood pressure and pulse a bit high (I think I was in shock), but nothing serious apparently.
Coming out of the ambulance, the police was waiting for ID check and note taking of the accident.
The man that hit me was also a bit nervous, I greeted him told him that I was OK, we exchanged addresses and contacts for the insurance and parted ways. I'll have the bike at the repair shop next week.
My sincere thanks to everyone that helped me, the casual people that called the police and came to help me, the Haaglanden politie and the Emergency Service in the ambulance.
The Kronan was not left in a good shape, she had taken most of the hit... we'll see how she'll recover from this one...

.... Update, after taking the bike to the incompetent bike shop under Den Haag Centraal Station, on the first ride I noticed the frame was bent... really bad... I'm not very hopeful that the bike can be repaired :-( ...


SolarLight (3) - First Prototype

Well after the initial breadboard, I decided to do some extra work on the Solarlight. I built a perfboard/smd board prototype and as usual I had to do some "adjustments".
Since my ATTiny45U in DIP are "precious" I wanted to use instead one of my ATTiny15L that I had around (a previous buy in ebay).

There are some major differences between the Tiny45 and the Tiny15L:
- Software - the Tiny15L does not have RAM and has a fixed length stack (3), programming it using avr-gcc is difficult and involves "tweaking" the code (see more here). The Tiny15L also does not have the debugwire interface, so debugging is a bit more difficult. Therefore I decided to develop the code in AVRStudio in windows (bah!) in assembler, as much as I like linux the simulators available are still far from perfect. One final remark on the simulator in AVRStudio, always read the notes about your processor, in the case of the ATTiny15L the watchdog is not simulated and the noise reduction sleep/wake-up on ADC conversion complete is not simulated!!
- Hardware - the pins and ADC input PB3/PB4 are switched (mentioned here), the ADC converter internal reference is fixed to 2.56V (ATTiny45U has 2.56V and 1.1V), the ATTiny45U has more power saving options and the frequency of the maximum PLL frequency (important for a high speed converter) is higher on the Tiny45 (8x8MHz=64MHz) than on the Tiny15 (16x1.6MHz=25.6MHz), the CPU clock also higher on the Tiny45 (8MHz) against the Tiny15 (16MHz).

The light is working but there are still some software issues to solve. As I mentioned the ATtiny15L does not have the debugwire interface, in order to debug the project I decided to encode data in the status LED as a bit-banged serial port (like this one), when I want to see a value of a conversion or get a check point or value, I change the code and wait for it to show up on the scope.
I also decided that I had to have a way of forcing a full light mode and a half light mode (both independent of the battery and charging) in case I connected the light using an adaptor (no solar light mode). For this I thought of using this same status pin, curiously this pin is placed between VCC and GND in the programming connector, so a simple jumper could activate these modes in the final product.