Just a few minutes ago marked a real ‘turning point’ in my endeavours with the bike charging circuit.

Now, given that Diane and I did so much shopping on Friday, and I can hear all those shiny brand-new parts calling to me (…I can hear them teasing me, and my fingers are itching!…), I could be ‘playing’ with them.  I could have got at least a couple of solar cells out on the balcony to see just what kind of outputs I could get -it is full sunshine after all.  Maybe a few years ago when I was younger and more ‘wet behind the ears’, I would have done.

But no!  I am now much stronger than that!

The PIC16F887 in place.

The PIC16F887 in place.

Instead, I’ve been working on the circuit and as I said at the start of this, I’ve so far made real, measurable progress.  A week last Wednesday the 6th, I told you of the ‘Big Boys’ moving in, namely the 40 pin 16F887’s I was planning to use.

Well, what I didn’t mention was that some time ago, my PIC programming board developed a very unusual fault in that it refused to program PICs in their target circuitboard as it should.  At the time, after only a cursory inspection, I decided to live with it and simply move the 14 pin 16F684 into the programming board each time I needed to program it.  A bit of a hassle, but one I could live with.  I would deal with it later.

Well, today, ‘later’ arrived with a bump.

Enter the big 40 pin ‘monster’ that is the 16F887, and I had a problem.  My programming board’s largest socket was only 28 pins.  The chip wouldn’t physically fit!

SO, I had to get the ‘in circuit programming’ working.  And this I have done!  Thanks to the magnifying glass I bought from Maplin’s the other day, I managed to track down a short across two tracks on my board that was completely invisible to the naked eye.

Furthermore, I have successfully ‘ported over’ the PIC16F684’s code to make it work on the 16F887.  I was using different port pins for different inputs and outputs, but the main parts of the code -the voltage sensing and the Pulse Width Modulation (PWM) work on the new chip with very few modifications.

Now, if you look closely at the above photo, you can just see four LEDs above the new chip -three greens and a single red.  My next task will be to get the circuit to accurately measure the voltage at the battery and give a ‘bar graph’ output on these four.

This’ll be fun!

More to follow…