Browsing Posts tagged programming

I was right! 20/11/11

The sudden realisation last night that I’d messed up Big Style with the addressing for the seven segment displays was right.

This morning, I’ve just connected four of the seven segments with one of the digit address lines, and it worked perfectly.

I just have to connect the other three segments up along with the other three digit address lines, and by early afternoon, I hope to have all seven segments of all four digits individually addressable.

Then it’ll be Big Fun as I work on the interrupts to get it to display different digits saying different things all at the same time.

Confused?

My powers of explanation are not good today, but it’ll become clear as the day goes on.

10:44 Update.

I’d made another error!  The ‘cross-piece’ of both the left hand most digits failed to light. (The middle of an ‘8’)

Turned out I’d wired some of the ‘underfloor heating’ incorrectly.

So now, it all works!

Soldering Iron: OFF

Coding Head: ON

This is where it gets really fun.

 

 

That’ll be me then, will it?

In fact, let’s all get together and shout as loud as we can:-

“Who’s the numpty??!!   WARDO!”

For the last twenty four hours or so, I’ve been kicking myself trying to figure out why the seven segment displays on the bike circuit refused to work, but not only refused to work properly, but partially worked in a really, really weird way.

I’d turn one LED on, and four would come on, one of them being much dimmer than the rest.

Then I try to turn another on, and the display would be blank.

I’d turn three on, and five would light…

Eh?  Major head-scratching.

Well Dear Reader, I’ve found my mistake.

I’m not going to go into any detail whatsoever -for fear of boring you senseless, but suffice to say, if my cat Alfie had been in, and he’d spotted it, he’d have laughed his little ratty socks off.

Its too late to do anything tonight -well past my bedtime, but first thing in the morning, you can guess what I’ll be doing.

Numpty.

 

Upgrade, upgrade, upgrade! 17/11/10

Busy in the background -just where we like to be, myself & Dave are working on ‘Bicycle Power – The Next Generation*‘.

I’ve previously wittered on about the displays needed.  These include Time, Distance Travelled and Speed.

Also included will be the depressing (…trust me on this!..) Calorie Counter, along with the JBM (Jon’s Biscuit Meter) and the JCBM (Jon’s Chocolate Biscuit Meter).  These last three are a piece of cake (…pun intended!..) -just number crunching, but the first three, while not impossible, will make serious dents in the processign power of the little PIC’s we’re using.

So, this evening, I rang Dave for a ‘weekly update’ session (…Okay, we had a gossip…), and amongst other things he told me that he’s just invested in some Printed Circuit Board (PCB) fabricating equipment, and now he’s learned how to use it (…no small feat!..), he’s very keen to begin fabricating boards for LEAF.  Circuit boards at cost?  Thankyou! Small fortune = Saved.

We also talked about these displays for the bikes, and he’s convinced that we should eventually go to a full LCD moving graphics display -the type found in car onboard navigation systems and the like.

Funnily enough, Microchip have just announced that they are moving into LCD displays, and are offering a ‘demo’ board for Not A Big Lot Of Money.  Methinks in a couple of weeks, one of these Bad Boys will just need to be purchased!  I’ll let you know how we get on.

So, while chatting about his new ‘fabbing’ equipment, he’s found some great ‘Open Source’ (…i.e. Free…) software called ‘expresspcb’.  A simple ‘Google’ will get you there to download it.

However, the only drawback is that this software won’t allow you to print in reverse.  The idea is that you mail the company with your designs and they reverse it for the actual PCB process, charging you for the circuit board.

Well, we liked everything up to the ‘You Pay Us’ bit, so Dave, being Dave, set about The Net and came up with a really neat solution.

You simply download ‘Cutepdf’ which then installs as a virtual printer, and as part of that process, you can reverse your PCB designs with virtually no effort on your part.

We like this!

Dave was also bemoaning the fact that despite ‘winning’ a laser printer from ‘FreeCycle’, it really isn’t up to the job as the circuit board drawings need to be ultra-sharp to allow you to make really fine tracks in copper.

“No problem, Dave!” I exclaimed. “Diane still hasn’t picked up that HP LaserJet that I won for her from FreeCycle yet, so until she does, I’m sure she wouldn’t mind us running off a couple of circuit prints for you.  It is for The Project, and anyway, its a full laser, and you know how you need to run a few sheets off those things every week, just to keep them in shape, don’t you?!

So, a few days down the line, and we hope to have fully professional quality (…well, nearly…) PCBs to stuff with components and program.

I can finally see the end in sight for ‘VeroBoard’.

Joy Of Joys!

* A bit like ‘Star Trek’, but without Captain Picard. Or Deanna Troi. Unfortunately.

A few quick calculations.

Ah, before you click away, we’re not asking you to do them!

No.  I’ve been doing some rough calculations on battery usage, and given that the bike wasn’t really used as much as it could be, and even then wasn’t really being ridden hard in a high gear, I reckon that for the riding that was done -about three quarters of an hour in total- that we ‘added’ another hours’-worth of life into the battery with the bicycle attached. continue reading…

Moving forward.

So, this last couple of weeks really has seen a massive jump forward with the power generation plans.

What had been just that -plans- have now come to fruition.  We can now generate our own power down on The Plots -despite the nights drawing in, meaning that for get-togethers and celebrations, we’ll no longer have to fumble about in the dark with battery-driven torches.

We can simply put the three gazebos up -a very simple job- while its still light, hook up the lamps where we want them and throw the switches.  Ta-Da!  Get cycling!

Last post I mentioned the future developments with the generators -the addition of displays to show time, distance and current speed of cycling.  Also requested is another display to show a read-out of just how many calories have been burned off.  Remembering my visits to various gyms over the years and their exercise cycles, I think our volunteers may be a little surprised -and depressed- at just how few calories are burned off during a session.

Still, onwards and upwards!

Adding simple displays to our bike system may sound easy, but after the hardware is constructed -pretty straight forward- the coding, well, there’s the rub.  The coding will be a ‘challenge’, to say the least!

With all that done, there’s just the job of the ‘iButtons’ so the system can store individual ‘profiles’ of various volunteers.  That really will be a toughie!

Still, if it was easy, it wouldn’t be so much fun!

Sunshine!

Well, the day dawns sunny and bright.  Checking the BBC weather website this morning shows that apart from maybe a little light rain later this afternoon, the day promises clear blue skies.  The temperature may not be up to much, but an extra layer of clothing or two and the promise of a leaf clamp to empty, and I’m sure we’ll not get too cold. continue reading…

Waiting for the paint.

Diane very kindly bought me some ‘proper’ paint the other day with which to paint the new box.

This came as cans of car spray paint -both primer and matt black -the kind used for bumpers and wheels.

Great stuff.  Easy to apply, but a bit of a swine because of the fumes!

I’ve set my kitchen up as a ‘spray booth’ (!!!), having both the windows wide open and the extractor fan on, but even so, when you walk in, a couple of deep breaths, and you’re off ‘playing with the pixies’.

Anyway, the beauty of this stuff is that it only takes minutes to dry, and the finish is really good -much, much better than that awful blackboard paint I had to use.

So, all this is in preparation for tomorrow night’s Bonfire Bash, which we’re all looking forward to.

Loads of great food, loads of good friends, and hopefully loads of light to see by!

Our new ‘Twisted Firestarter’, Barry will be lighting the fire at about 4.00pm, with food hopefully hot and ready to eat for about five-ish.

Hope to see you there!

Direct A – B testing.

2 comments

Sounds complicated, but its not really!

This Saturday marks ‘Bonfire Night’ where all Britain ‘celebrates’ the failure of the ‘Gunpowder Plot’ by Guy Fawkes and his motley crew to blow up the English Houses Of Parliament.

We’ll be ‘celebrating’ with a bonfire of our own and, more importantly, electric lighting.

For this Saturday, I had wanted to show another generator, this time with displays showing time cycled, distance travelled and speed of cycling, but on reflection, this would be a bad move.  Too much to do in too little time and therefore a recipe for certain disaster!

Instead, I’m going to show the first one again, and alongside it another box with everything identical apart from the electronics.  This box will simply be a battery box, connected to identical lights.

To do the test, I’m going to make sure that all the lights are switched on and off at the same time.  The following day, I’m going to check the levels of charge in each battery -the one that just had the lights on and the one with the charging circuit.  This will give me a direct comparison as to just how much charge was put back into the battery, and just as importantly, just how much was taken out by the lights being connected for so long.

So, I’m really sorry to disappoint, but as someone famous once said, ‘A man’s gotta know his limitations.’

Is that it?

Yesterday afternoon and evening, for me, went with a strange sense of anticlimax.

Nearly everything went according to plan!

Amazing and somewhat off-putting.  This is not how things normally go for a ‘Big Switch On’ on a Wardian project.

Things just worked.  Nothing blew up, there were no tell-tale plumes of blue smoke; there were no bad smells of burning silicon; there were no muffled ‘crumps‘ as something big and expensive died.

So, as the title today suggests, I’m sat here, with a slightly dazed feeling.

How could it all have gone so well?!

Yesterday, I got back from that meeting much later than planned -I’d been kept waiting for over an hour, and there were still a couple of soldering jobs to finish -I had to re-solder the 9-pin serial connector, the power switch and the programming switch so that it would all fit in the box.

Diane texted me saying she’d be round imminently, leaving me barely half an hour to finish it all off.

This was how a project ought to go!

But by the time she’d arrived, miraculously, I’d just about done.  While she made herself a cup of tea, I finished it off, screwed the lid down and switched it on.

Flashing lights, and briefly getting on the bike and pedaling to confirm the PWM was working, yes, it was.

Strange!

Diane took the box, the bike holder and the lights over to The Plots in her car while I cycled over.  This was fun, as the back tire is a ‘slick’ (…to reduce noise when pedaling…), and luckily the roads were quite dry.  Had there been any rain in the air, then I’d have been kissing the backside of a bus as the back tried to catch up with the front when I touched the rear brakes.

Claps and cheers as I arrived (…Thanks, Diane!..), and there were quite a few ‘Junior Plotters’ about.  I’d come down on my bike, was there any chance that the we were having a demonstration of the power project?  Yes, there was.

Initial shouts and cries of disbelief were quickly quelled as I explained that Diane had all the bits in her car.

So myself, Sara, John and Gary put up the three gazebos in an ‘L’ shape, then tie-wrapped the legs together where they met.  Junior Plotters were bouncing around, obviously keen for me to set up the bike, so I eventually gave in and set it up.

Then I had an idea.  The recent light frosts have meant that the nasturtiums on the mound have now mostly died back, but they’ve left their seeds.  You may recall that I pickled a jar’s-worth a few weeks ago, and I was keen to get some more for another pickling session.

So, I told the Plot Kids that I’d only let the taller ones have a go on the bike if they picked me enough nasturtium seeds.  Well, they set off as if possessed, eager to bring me as many of them as possible.  Kyle in particular was very anxious to ‘have a go’.

Is this enough?

Is this enough?

Here he is with the bowl.

After a cursory scout round myself; “You missed this one!  And this!”, I finally, ‘reluctantly’ gave in, and we all went over to the bike.

I switched it on, and yes, as Kyle had requested, they could see the blue LEDs!

I got on, started pedaling, and more lights came on -to show that the PWM was working and that charge was being put back in the battery.

The ‘Grown-Ups’ heard all the commotion and came over, and quite soon, quite a crowd had gathered.

Kyle cycling to keep the lights on.

Kyle cycling to keep the lights on.

We were also celebrating Chloe’s birthday, and various cakes and pastries had been brought to share, so we set them up under one of the gazebos, and here you can see the interest is pretty evenly split between the food on the table and the bike.

In the meantime, nearly everybody ‘had a go’, and here’s Gary doing his ten minutes-worth.

Go for it Gary!

Go for it Gary!

John and I had positioned the lights such that three of them were on the pillar where all three gazebos me in the elbow on the ‘L’ shape with the fourth light shining directly down on the bike itself.  Well, it was centre stage!

Also to note was that there were a couple of comments about the height of the saddle, and Diane in particular found it quite painful to be so low because she has problems with her left hip.  So, before the next ‘outing’, a quick-release adjuster for the height adjuster will be bought.

Another comment was the fact that the bike was positioned so it was ‘pointing uphill’ on the driveway.  This was to counteract the fact that the back wheel is slightly raised by the frame in which it sits, so it ended up being fairly level to ride, rather than feeling like you’re going downhill all the time.

All too soon it was going dark.

Now, on a ‘normal’ Plot Day -as much as one ever can be normal, we always treat the dusk with a ‘groan’ for it means that very soon we have to stop work, but yesterday, we couldn’t wait!

People had started to drift off, but there were just enough of us left to put down the gazebos and stow the equipment away ready for its first ‘official’ outing on Saturday for Halloween.

Control box and cables, lit as it goes dark.

Control box and cables, lit as it goes dark.

Here, you can see a final shot before we packed it all up with the plain black control box, surrounded by the lighting cables, bathed by the light of some of the spotlights.

A suggestion was made that for a future version.  I should make the top out of clear perspex so interested people could look inside.

Of course, people are ‘spoiled’ by ‘Star Trek’  and other sci-fi where there are lights behind all the panels, so if I do make a clear lid, I’ll have to make sure there are plenty of flashing tell-tales.

Of course, people will then ask what each LED represents, so I’ll have to get creative with the various functions inside.  Words like ‘plasma flow injectors’ and ‘wave-guides’ will have to be thought up.  ‘Manifold’ will have to come into is somewhere.

Oh, and there’ll be blue LEDs.

I promise.

Yesterday.

…Was utterly manic.

After I’d posted that last post, I carried on.  And on.  And on…

Diane, who’d got business around Sheffield with a meeting over the bees and many other jobs to do kept popping in to see the progress, and I think she was as amazed as I, when every time she came back and asked ‘How’s it going?’ the answer was ‘Fine!’.

Overnight, I’d painted the lid and touched up a few other places that needed it, so the case was just about dry to work on when I came to it.

So, amongst other jobs yesterday, I had to wire up all the lamps with all their power plugs, individual switches and long cables to connect them to the box.  This took forever, and I’d forgotten just how time-consuming and ball-aching wiring can be.

Then came work on the box itself as I wired up the power lead from the bike, then wired up the power outlet plugs and leads for the lights.

Then came the crunch time as I wired up the indicator LEDs on the new display board.

I then sprayed the board black -being careful to mask off the LEDs, then I masked off the top panel with coloured paper dots corresponding to where the LEDS were beneath.

A couple of coats of some excellent black spray Diane had bought, fifteen minutes drying time, then the little dots came off very very carefully with a scalpel to prevent damage to the surrounding still-tacky black paint.

Then I wired up the display board to the main processor board.

Then I wired up the ‘grunt electronics’ mounted on the box’s end cheeks to the processor board.

Then, after checking things though again, I said a quick prayer to whichever Gods may have been listening, and got on the bike.  And pedalled.

And lights lit, and there was definite resistance to my pedalling -meaning the PWM was working.

Well, I couldn’t quite believe it.  It had worked first time!

Anyway, I’d better get off -I have a meeting down in sunny Hillsborough this morning, then I have to come back and finally make sure everything’s ship-shape before Diane comes to pick me up with all the gear to take me down to The Plots.

Today is one of our ‘Junior Plotters’ birthday, and to celebrate we’ll be putting up a gazebo or two, wiring up the new lighting and singing ‘Happy Birthday’ to her this afternoon under the lights of our new, totally green power and lighting system!

Oh, and there’ll be cake as well.

Mmmmmm.  Cake…


SEO Powered By SEOPressor