Browsing Posts tagged bicycles

And counting. 25/11/11

I finally did it!

Okay, with a little help from undoubtedly Sheffield’s best electronic engineer, who actually said it as an almost throw-away comment; “…You have to reset everything to zero with a PIC because by default, everything is left on.”

Too true, as I finally turned OFF the PORT B analogue inputs and shazam!  Its counting like crazy.

So, in just a few minutes I have to pop back up to Diane’s office in the library to finish up the wording for a bid we’re putting together, then on my return, I will connect my circuit board up to the bike, do a little math as to how far you cycle with one wheel revolution and then, when I cycle, I’ll be able to tell how far I’ve gone.


Of course, the more cynical reader will simply say; “Why not buy one of those cheap bike computers you can pick up for less than a fiver?” And they’d be right to say this, but that’s missing the point.

The point is, without having to hack a ready-made piece of kit, I’ve actually done it myself.

And very quickly, from getting the distance travelled, I can work out all kinds of other stuff -speed, calories burned off; all manner of interesting stuff.

Yes, you can do that with a cheap bike computer, but it wouldn’t be anything like as much ‘fun’ to simply do that!

I use the word ‘fun’ there in inverted commas, because if truth be told, sometimes its been anything but fun, but I’ve sure leaned a Big Lot about the PIC interrupt system!

More soon…

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.



Seven Segments. 18/11/11

‘Seven Segments’ refers to the little displays I’m currently wiring up to give us a distance traveled and speed.

This is not as easy as it may sound.  Big maths, thanks to ‘C’, and the wiring is a nightmare!

I have photos I’ll post later of the ‘underfloor heating’ required to hook these displays up.

Still, its a very pretty violet colour!

Interrupts are go! 16/11/11

Just a few minutes ago, I soldered the last joint to a little ‘flying board’ I’ve built that connects into the original PIC programming board we bought all those months ago.

For reason known only to the Velleman designers, they’d put the main interrupt input pin as an LED output, but this hasn’t stopped me.  That link above takes you straight to the page of said programmer.

I unhooked the resistor feeding the little LED and connected one of the three flying leads (…the other two are +5 volts and ground…) so the new circuit was fully connected.

I then turned it on, and…


Shouts of disbelief as again and again I touched a wire across the two terminals and two LED tell-tales faithfully lit up twice to show me that yes, it had gone into the Interrupt Service Routine (ISR) and yes, it had taken notice and to prove it they lit.

Thankfully, I was fully dressed at the time, so couldn’t do the full “I’m Too Sexy For My Cat” dance routine, but this was probably for the best.  There were mothers and small children walking past, and I wouldn’t really have enjoyed explaining ISR’s and LED’s to our friends in blue ‘down the yard’.  Methinks they wouldn’t have quite understood the intricacies of it all.

So, the next step is to neaten up the code then build the first seven segment display board so when the bike wheel clicks, there’s a display you can refer to.

Of course, at first this will just be numbers that don’t actually mean anything, but very quickly -thanks to the math routines embedded within ‘C’- I’ll be able to make it display in Kilometers.

Then its the small matter of providing a speed output, but as that involves using the timers on the PIC, well, that’s for another day I feel.

In the meantime, the Wardian Household tonight is a happy place, and Heaven knows, we need all of those we can get right now.

More soon.

PIC-ing like crazy. 16/11/11

You may have wondered just what has happened to the much-trumpeted project of a few months ago; namely the Plot Power Project and the electric bikes we were getting all in a fizz about.

Well, Dear Reader, you can wonder no more!

Now the growing season has just about finished and the utter circus that was Allotment Soup is finally out of the way, along with those three major projects, I’ve gone back to the bikes with renewed vigour.

Well, I think its vigour, because once again its keeping me awake at nights.

‘So whats the latest??!!’ You scream.

Well, things have definitely moved on.

Whereas before we were using PIC assembler language (PIC ASM), now we’ve had to move on to ‘C’ for the PIC.

We’ve had to do this because the maths required has just leaped up a notch as we implement the distance traveled and mean speed functions.

For those not in the know, assembler is the real nuts-and-bolts, individual bits and bytes control; ‘C’ allows for more ‘English’ looking and reading code.

For those of a certain age, it looks and reads a little like the BASIC of old so favoured by the BBC B and ZX81 micros but with added refinements.

There were, of course problems with this.

Firstly, getting the ‘C’ compiler to bolt-in to the Microchip Integrated Development Environment (IDE) was a nightmare.

Then, there was the problem that Hi-Tec who produce the compiler have released virtually no how-to manuals, so you’re on your own!

Anyway, I’ll not bore you further dear reader until I have some pretty photos of it in the coming days.

Suffice to say, the other night, I got an LED to flash with a ‘C’ program, so now I just have to get the interrupts working, and we’re away.

So close, and yet so far…


Its all gone blurry. 19/05/11

No, not my vision; my recollections of yesterday!

It all started off pretty ‘normal’ for a Plot Day.  Well, as ‘normal’ as any Plot Day can be, but then it all seemed to go haywire and confused.

I know we had loads of visitors and committee members and volunteers and all, but I really can’t for the life of me remember much about the whole proceedings.Testing for the main event.

Luckily, I had my ‘Point and Pray’ camera (…A bit like ‘Point & Shoot’, but for the even less skilled photographer.  Perfect…) and that records times and dates of photos, so I can tell exactly what I was doing at any given time.

Tuesday had been ‘Dress Rehearsal Day’, and I’d taken the bikes over, and Diane had very kindly taken the two electronics boxes and lights over in her car.

Difficult to believe, but everything had worked first time!

Lights: Go.

Charging: Go.

Willing cyclists: Plenty!

After we’d got set up and tested, there was loads of planting to do, both to be ready for the ‘Big Day’, but also because our ‘Hardening Off’ mini-greenhouses were full to bursting with seedlings just begging to be planted in ‘proper’ earth.

We happily obliged, and planted out as much as time allowed.

Yesterday was much of the same, but this time, there was no dress rehearsal.  This was it!

I can remember volunteers coming and going (…and in most cases returning again…), I can remember setting up three of the gazebos, then Ian wandering round with a long tape measure and a determined look in his eye; “We’ll get another one in here right outside the metal shed,” he exclaimed, and it was so!

I can remember visitors arriving, then a photographer from ‘The Sheffield Star’ arrived and took some great photos of Ian, mugging for the camera.Emma on the 'light bike'.

I can then remember a reporter from ‘The Star’ arriving, and Ian giving him ‘The Tour’ (…This is a guided walk round our Plots, pointing out this and that.  It often takes an hour or more, there’s so much to see at the moment…), then the reporter coming back to talk with me, then more visitors, then excellent soup, then a cup of tea (…it had gone cold while I talked, but no matter…), then loads of people trying out both the bikes.  One was the one I’d temporarily blinded people with at the AGM last year, the other was the ‘new’ one that actually charges the battery and lights the ‘main’ light in the gazebos -much more difficult to pedal!

Then I can remember taking shots of the children’s artwork down on the Child Friendly Plot.The kids' Big Artwork.

This one in particular stood out -not least because it is more than life-sized.Cardboard fork and spade.

Then I took a picture of this cardboard fork and spade.  These colourful creations had been carefully painted in by our ‘Plot Kids’ last year and then stored over the winter in the top wooden shed.

It hadn’t yet gone dark, but soon would, so I wasted no time in having another look round and took some shots of the many beans we’d planted during the day.New Beans!

These beans had been planted by Ian in the space where Diane had said we could ‘have a strawberry bed’.  I think she relented after we all refused point blank to actually plant strawberries!  Strawberries on the LEAF Plots are for pulling out and giving away! We have far too many, so are always encouraging people to grab a hand fork and bucket and take as many as they need.

Actually, it was Diane’s idea to plant these beans in such an unusual ‘in and out’ pattern, and Ian duly planted two different varieties alternately, so in a few weeks, we’ll see what happens!More runner beans.

Here you can see the same pattern, but these are all runner beans rather than the climbing french beans we’re so fond of.

Today, Ian and I arrived for ten, and Diane was on an essential First Aid course, so after such a mad few days/weeks, we decided to ‘take it easy’ with some gentle wandering, watering and weeding.

This was just to see if any dreaded slugs had been partying in our crops overnight (…None found!..), pick up any litter left by visitors (…None found!..) and see what needed watering.

What needed watering?  Just about everything!

So, a gentle ‘coda’ after the Big Night, and tomorrow will be much the same, with maybe some sweetcorn being planted.

Anyway, my coach had just turned into a pumpkin (…more on those in the coming weeks!..), so I’d better call it a night.

Until tomorrow!

Of course, I could say you’d have to turn up to find out, but that’d be pretty mean, so here’s a quick ‘taster’…

Seed planting on the new worktop by the greenhouse.We’ve been working pretty hard over the last few months to get our plots ‘up to scratch’ and ready for visitors to see, but because it is a ‘working allotment’, as you walk round, you will see areas that look untended and unloved.

Well, let us tell you, they aren’t!

They’re work in progress.

What you will see are many more beds than last year with crops growing.  There are many different varieties of onions, garlic, shallots, spring onions, radishes, potatoes, leeks, oca, sweetcorn, courgettes, tomatoes, cucumbers…  The list goes on!  But how could we forget the now-famous ‘LEAF Strawberries’!  This year you’ll be encouraged to go and ‘Pick Your Own’.  Not merely strawberries, but actual strawberry plants! We’ll lend you a hand fork, and point you in the right direction, and you’ll be free to dig up as many as you want to take home and plant in your garden or even in a pot on your balcony!

On other ‘fronts’, we have a newly-and-greatly-expanded seating area up by the metal shed for many more volunteers and visitors to relax under a couple of our gazebos.  The 'Zen' seating area.We also have a new ‘Zen’ seating area on the patio you can relax in.

More ‘hardware’ to show off this year is our now fully glazed, fully functional, and ‘fully full’ of young plants greenhouse!

A gentle wander up to our ‘Orchard Plot’ and you’ll be able to see our five, fully functional beehives kindly supplied by ‘Groundwork Sheffield’ and the ‘Bee Buddies’ project last year.

Further up The Plots, up by the wooden shed, there’ll be a new area for our new ‘electric bicycles’ and you can try for yourself and see just how much fun it can be to generate your own electricity, and as the evening light draws in, you’ll be able to see the power generated earlier in the day actually lighting up the gazebo under which the bikes will be sat!

Then, there’ll be a selection of young, ready-potted plants in exchange for a donation for your own garden; you’ll be able to drink the now world-famous (…well, nearly…) Plot Tea we rave about so often on our Website; you’ll be offered a taste of ‘proper’ home-cooked food, and if the weather’s fine, we may have a fire lit so you can taste for yourself the awesome baked potatoes we often cook on a Saturday evening after a hard day’s work.Mitzi, shouting at us!

Finally, there’s ‘our’ allotment cat, Mitzi, who may well make an appearance.  From this photo, she may look fierce, but she really is just a Big Softie, unless you try and tickle her tummy!

Who could want for more!

So, get out your diary, make a date and we’ll see you then!

The Environment Week Bash Poster.

Simply click once on the image above and select ‘Print’ to your printer, and you have your own poster to put up to display.

We hope to see you then!

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!

SEO Powered By SEOPressor