Browsing Posts tagged thoughtful

Adding memory? I forgot. 16/04/13

You’d have thought that with all this learning and fun stuff happening here at Wardian Towers, that as I get further and further into this electronic ‘lark’, first with PIC’s, then I2C, then real time clock counters, then I2C input/output devices, then into iButtons and all the wonders they produce; you’d have thought that it would get easier as time went on.

Scientists do say that the brain is in fact like a giant muscle, and that the more you use it, the easier it gets as it becomes more familiar with cramming it with yet more and more knowledge.

Well, I can report that from this end, it most certainly doesn’t seem to.Before...

But then again, I guess I’m not as young as I used to be, and maybe doing this kind of stuff is really for the twenty-somethings.

But then again, if I was twenty-something again, I’d be either playing on my X-Box, or drooling over a new Porsche, or Armani suit.  BUT, I’ve been there.  Got the T-shirt; read the book.  Boring.  Shallow.

Whatever.

To the right here is the board before I fitted the new memory chip.  The chip itself is a Microchip device called a ’24FC512′.  This denotes it’s from the ’24’ series of serial EEPROM (Electrically Erasable Programmable Read Only Memory) chips, and it will store up to 512 K bits of information.  Note the ‘bits’ bit.  In more user-friendly language, it will store up to 64 K Bytes of 8-bit words. (As we all know, there are 8 bits to a byte.)

The datasheet tells me that I can have up to four of these little guys sat on the same I2C lines, each individually addressable, so I could have up to 256K bytes of information storage on just four chips.

Frightening.

Hooking the thing up was ridiculously easy, and took a matter of minutes -I just had to remember to wire the SDA (data) and SCL (clock) lines properly.  Mix them up and all kinds of exciting and unexpected stuff would happen....After

There’s also a pin which you can either wire up, or even have sat on another output pin from the PIC.  This pin is the ‘Write Protect’ pin.  With it sat at 5-volts, you can read the contents of the chip, but it won’t let you write, while tying the pin to ground gives you unfettered access to everything.  This is a pretty useful feature, and I may well use it if I get the opportunity.

And here is the chip in circuit.  As I said, ridiculously easy to wire up, and you can barely notice any other new components.  They’re there, though.

And so to programming it.

And this is where all the ‘fun‘ started.

I set up an entirely new project in the X-IDE program I use from Microchip so as not to contaminate the other stuff I’ve written.  Okay, doing it this way may take longer, but it gives you a ‘fresh canvas’ to work on, and it prevents great lumps of code being sat in the program for other functions that you will never use in this.  It also focuses the mind on just what you really need in there to get the program running.

For this program, I needed the new RS232 program I’d written the other day so I could actually see in a box on the screen what the processor was putting into the RAM and also what was coming off the RAM.  Yes, I could have done it with simple LED’s already sat on the board, but that would have been pratty.

After several hours, many cups of tea, and of course, ‘consultation chats’ with young Alfie (…He’s a bit ropy on I2C, but learning fast…), I finally nailed it when I realised that you never use the ‘Acknowledge’ pulse when you’re writing to the device, but when you read from it, you must acknowledge every byte apart from the last one where you send a ‘NotAcknowledge’ pulse.

Oh, and to be on the safe side, you need plenty of ‘IdleI2C()’s thrown around, just for good measure.

Again, last night was another late one, but I can report total success.

I can now write data to this chip, switch the whole thing off, have a cup of tea, switch it all back on, and the data is still exactly as I wrote it.

Today, I have other, much less fun stuff to do, and of course Wednesday and Thursday are ‘Plotting’ days.

But I shall return soon to this project -hopefully before I forget everything I’ve done.

Unlike the RAM I’ve just fitted and programmed, unfortunately, I do forget stuff when switched ‘off’.

 

Better than Christmas. 16/05/12

I can still vividly remember Christmas as a child.  In many ways, the actual anticipation of the Great Day was as good, if not better, than the day itself.

And so it was this morning.

I was up well before the alarm went off (…one of the many advantages of having a cat who’s ruled by his stomach…), then just a few minutes ago, the doorbell rang with it’s usual ‘Ding - Dooooong’, and I wondered who it could be.  …Surely not?

“Farnell Delivery!”  Said the guy at the door.

“Oooohh!  Goody!” I exclaimed.The parts have arrived!

And so I took the large box from the chap, went inside and unwrapped it like a nine year old on Christmas morning.

Wrapping paper everywhere (…Laddo just loves this…), I found the delivery note and started to check stuff off.

Squeals of delight as all the new components were laid out.  A PIC processor, chip sockets, transistors, resistors, 7-segment displays, it was all there.

BUT, like the Victorian children of old, this will all have to wait ’til ‘Boxing Day’ this Friday because until then, I’ll have no time -there’s way too much to do down at LEAF this week!

Yes, I’ll still be working on the oven, but I can feel the end is definitely in sight with this.  One more mix, maybe two, then it’ll be done, and we’ll be able to enjoy pizza, bread and whatever else our Plotting Chefs can think of.

So, the washing machine has very nearly finished, the weather is looking good, so its on with the shorts (…Eeek!..), lace up my boots and off to work I go…

Hi-ho.

Yet more clay puddling. 14/05/12

I must confess, I’m starting to get more than a little bored by all this clay work now.

Its starting to lose it’s shine as I trudge to The Plots, secure in the knowledge that bar a lightning strike, a freak whirlwind or it suddenly raining washing machines, there’s going to be Wardo with his shoes and socks off, trudging round the polythene tarpaulin, suffering the stares and jeers from folk and kids on the road above in just a few minutes.

This morning, Wardian Towers was a hive of misplaced activity as I put off the moment of finally going out of the door.

All the dishes were washed, dried and put away; I’d cleaned the bathroom, hells, I’d even thought about washing my bedding.Happy Mitzi!

Luckily, that activity was put off in favour of opening up my old camera to discover that, as I’d suspected, the display had got broken in my fall a couple of months ago on the ice.  So, I’ve ordered a new one from eBay, and Matt has his name on it when its fixed, fettled and fully functional.

So, back to the early afternoon, and I met Matt on his plot, busy in his greenhouse.  A quick ‘Hello!’, then a short walk up the lane.

Back at The Plots, and I quickly got out the stuff I needed.  Once I got started it wouldn’t seem so bad, I was sure of it.

And I was right!  Within just a few minutes, I was bouncing away on the clay which started off very tough, but soon worked into a smooth paste, happy as a happy thing.

Yes.  You’re right.  It doesn’t take much.

Today, I was back to traditional ‘puddling’, so there was no straw involved, just sand, clay and lots of toe-breaking effort.

Once again, no cameras allowed -certainly not mine- so that’s why there’s a shot of Mitzi-Moos looking very happy today after I’d fed her.

I’ve yet to see a bad shot of Mitzi.  Maybe in a previous life she was a model?

Aaaah, you beat me to it!  Yes, a Cat Walk model!

Anyway, today I managed three ‘little mixes’ which probably equals about one and a half of the larger ones we were doing last Saturday, and I figure that we’ll need another two, possibly three before we can let Matt have his way and decorate the oven wildly.

Matt came up as I’d just finished my second mix, and very thoughtfully lit the oven again.The oven, lit again.  He very quickly had it going nicely, and if you click to enlarge the photo on the left, you should hopefully just be able to make out the waft of steam coming off the oven, drifting to the left.

Maybe I’m imagining it, but it seemed to me that not only did Matt get it hotter, quicker today, but that it held it’s heat much better.  Even as we were leaving a couple of hours later it was still very hot, and it didn’t seem to need feeding every couple of minutes like it used to.

Maybe it’s all in my imagination, but you can be sure that when we get the final coat of clay on it, I’ll be checking it very thoroughly to see just what it can do.

I’ll leave you, Dear Reader with a shot I took just before we left for the evening.Close up of the straw layer.

If you click on the photo to enlarge it, then use your imagination a little, you will possibly smirk as you try to imagine the elephant that must have been flying high overhead at just the right time, and suddenly got very, very scared.

Or is that just me having been out in the sun too long?

Back in your cage, Wardo.

Tomorrow, it looks set for rain, and anyway, I have a load of seeds to plant and young plants that need to go outside, so no LEAF fun for me.

Still, there’s always Wednesday!

…exactly where I am right now.

I think you’d called it ‘hitting the bumpers’ kind of stuck.

I have trawled the ‘net at quite some length -remember I know exactly what I’m looking for- and come up with completely zilch.

Yes, there are quite a few pieces of PIC programming software out there, and virtually all of them are for free, but there are absolutely none that will do what I want them to do; namely program a PIC16F876A with the Velleman PIC programming board via the serial port.

This was after many hours of searching, and in the end, I had to ring up Dave -my local ‘PIC God’.  I told him of my problems, and he duly sucked his teeth, and said that he was amazed I’d got the Velleman kit to do as much as I have done.

Is there a solution?

Of course: A brand-spanking new PICKIT3 programmer from Farnell will do exactly what I want.  Just under £30.00 +VAT.  Pick your trousers up.

It also has the added Party-Bonus of being produced and fully endorsed by Microchip themselves, so it will fit in sooooo snugly alongside the Microchip Integrated Development Environment and the Hi-Tec ‘C’ I’m using.

Seamlessly.

So, its out with the credit card and we’ll take it from there.

In the meantime, I’m going to fully finish off the new time and speed display board so when my new toy arrives, I’ll be all ready to go.

Normally, Halloween and ‘Bonfire Night’ are pretty busy events for us coming as they do ‘back-to-back’ on consecutive weekends, but this year things really did get out of hand.The cute little fire.

With it being our tenth anniversary year, we’ve hosted ‘Allotment Soup’ to celebrate, and in doing so, managed to almost complete not one, not two, but three of our ‘wish-list’ projects we’ve seemingly been putting off for years.  These were the composting toilet, the Geo Dome and the wood-fired pizza and bread oven.  Each on its own would have been a major accomplishment to be completed in the time we’d given ourselves, but all three at the same time?  Lunacy!

Also, remember that we’ve grown (..and eaten!..) more than we’ve ever grown this year whilst doing all the above.

So as it stands, the composting urinals are done, thanks largely to the Sheffield University Architecture Students.

The Geo Dome is fully finished -and decorated- thanks largely to Diane’s massive work, along with all the hard work put in by Matt and New Ian along with our friends at Cape UK.  This has now been ‘taken out’ to three local primary schools where smaller versions were successfully built by groups of parents and children who then came down to LEAF and built the ‘Real Thing’ down on our Children’s Plot.  Yes, I’ll get you the photos of it fully built and decorated.

And the pizza oven, as you can see in the photo to the right here, is about 90% of the way there after its first hugely successful firing at the ‘Allotment Soup’ celebrations a couple of weeks ago.  This was done largely by Matt and Jon.

Looking back on all the utter madness of the last few weeks and months, I really have to shake my head in total disbelief.

Having to organize and deliver on all three simultaneously and organize ‘Allotment Soup’?

Mad, bad and seemingly silly.

So, as you can appreciate, yesterday’s ‘Bonfire Night’ celebrations were er, somewhat muted.

Fire lit and burning nicely.Ian (no relation), Diane and myself made a slight modification to the guttering and rainwater collection system on the roofing of our new toilets, then Ian and I dragged out this little hand-built stove from its secure storage and decided to fire it up for the first time.

We were given this little beauty by our welder friend down the road who so kindly helps us out when we get broken in to and sorts out the locks on our metal shed.  Every few months, some bright sparks decide that because we’ve got such a good security system on that shed, we must have something worth stealing.

We haven’t, but lets not go down that road right now.

Anyway, he’d built this stove for a customer who for some reason didn’t want it, and we gratefully accepted it, and its been sat for at least a couple of years gathering dust.

Yesterday we decided that we’d finally fire it up and see what it could do.There she blows!

Very impressive, we thought!

While we did this, New David and Derek did a valiant job of collecting dead leaves from the banking and from the pavement just the other side then moved barrows and barrows of them into the newly-refurbished leaf clamp up by the top compost bins.

All through the afternoon as Ian and I tested this fire, we had visits from other plot holders and various LEAF members came and went, then Sara came down with her two girls and had brought one of her awesome fruit cakes!

No further excuse needed for us to stop what little work we were doing, put the kettle on and ‘help her out’ by sampling some of this.

Well, we had to.  It would have been very rude to do otherwise!

As I left for the evening, Matt had invited everyone down to his plot where he and Kyle were having a ‘burn’ to get ride of some brambles and rubbish, so a great excuse to go and try out the sparklers.Holly berries.

So Dear Reader, if you were expecting tales of fun and wild abandon, I’m afraid you’ll be disappointed this year.

But then don’t despair.

As the photo to the left here reminds me, Christmas is but a few weeks away.

Fleabane.

Fleabane.We’re pretty sure this is ‘fleabane’.

Its sat at the top of the rose bed on the Top Plot above the roses, next to the horseradish.

So, you may ask just why fleabane is called fleabane.

Apparently, it was used in medieval times to control… You guessed it: Fleas!

It was spread on the flooring of cattle sheds and kitchens in homes (…often the same room…) amongst the straw to control the pesky little mites.

Nowadays, we have ‘flea spray’ for cats.  In expensive aerosol cans, this stuff is absolutely guaranteed to have your cat running up the curtains to get away from you as you come at it wearing elbow-length leather gauntlets with a determined look in your eye wielding the dreaded orange and white can.

Well, Dear Reader, I have the answer!

A few months ago my cat, Alfie started scratching and fussing, and sure enough, he’d caught a good dose of fleas -probably from ‘Big Orange’, a particularly large and evil, smelly tabby who lives a few doors down.  Obviously, he’s Alfie’s best mate.

Remembering an old trick a friend told me many years go, I took a bottle of ‘lazy garlic’ (…pre-chopped…) from the ‘fridge and while Alfie was sat on my knee, I simply took a half-teaspoon or so of the stuff and carefully smeared it on his back by the base of his tail, making sure I got it well down in his fur towards his skin.

Now, unlike Big Orange, Alfie is particularly fastidious when it comes to his personal grooming, so he meticulously cleaned his back, consuming quite a bit of the garlic in the process.

Result?

Well, he probably wasn’t that popular with the ladies for a night or two, but the garlic got into his bloodstream, and fleas hate garlic!

Result?  A week or so later, his fur was back to its original black and silky gloss!  There was no sign of him scratching, and his skin was back its usual smoothness.

Now, every month or so, I repeat this treatment, and it seems to work brilliantly.

Okay, its not the ‘instant’ cure of the dreaded flea spray, but it doesn’t send your cat into paroxysms of fear and loathing, it saves your precious furniture and curtains, and more importantly: Its cheap and organic!

This also proves that despite other overwhelming evidence to the contrary, my cat isn’t an Evil Vampire Cat.

That’s just a story he puts out to impress his mates.

 

 

After all the excitement of the last few days, Saturday was a day of gentle ‘Zen Weeding’.The oca bed before weeding.

I’d set my sights on one of the top-most beds we are growing oca in.  If you single click on the image to the right here, you will see it beforehand.

Quite a mess, you’ll agree, and because the oca is so young and small, it was impossible to simply use a hoe to get all the weeds out.

This meant I had to take a bucket and a prayer mat and get down on my knees and pick out all these weeds by hand.

Several volunteers asked me why I was doing this when there was planting and other much ‘sexier’ jobs on offer, and I had to tell them that for me, this is one of my favourite jobs.Young, delicate oca.

Strange, but true!  When I’m ‘in the mood’, I love nothing more than getting ‘up close and personal’ and sorting out the young weeds from the young and fragile oca.

For me, its a great way to clear my mind of all the ‘junk’ its normally full of, ‘forget my troubles’ and just concentrate on the delicate job in hand.

Okay, I may not actually want to do it before I start, but I tell myself beforehand that I’ll ‘pretend’ I’m enjoying it, and within minutes of starting, I find I am enjoying it.Done!

And here’s the bed once completed.

Okay, at a casual glance, it may look pretty much the same as before, but the main difference is that in a few days time it won’t be full of big weeds, choking the life out of the oca.

While I was busy up at this bed, Diane again welcomed quite a few visitors and new volunteers -the more the merrier!

New Sarah helped Tim with a load of ‘potting on’, Carol arrived with her son and grandchildren, and they did some planting in the ‘Zen Area’, and great fun was had by all.

All too soon it was 4 o’clock and time for me to light the fire for baking potatoes so that by about 5.30pm we were able to rest our weary bones and enjoy the potatoes and some excellent soup made by Sara.Whoops!  These really need weeding...

I strongly suspect there to be a few volunteers there tomorrow, so as soon as I finish this, well, I’ll get changed and head over there -I can feel more weeding coming on, this time in our ‘Zen Area’ and the radishes and spring onions myself and Ian planted a couple of weeks ago.

As you can see here, they certainly need it!

Any April fools at LEAF? 01/04/11

Nope!

Apart from Gary pulling an awful prank on a member of his family that I won’t go into, today we were entirely ‘April Fool-free’.  Good!  -We’re here to volunteer, not have fun.  Pah! continue reading…

A good day.

So, when all’s said and done, yesterday was a good day.

Not only did I manage to resurrect Diane’s laptop, but an HP printer came up on ‘FreeCycle’ -an ‘old’ HP LaserJet 2100M that was being ‘retired’ because the owner had bought himself a shiny new colour laser to replace it.  I’ve had experience of these printers, and apart from the odd paper jam, I’ve never had one go down on me.  The only thing was, I was very late in seeing it -it’d been posted for at least a couple of hours.  It had to have gone.

Still, undeterred, I sent in a reply saying that our project would really love it, and gave this web address as an example of what we do, but all the while aware that in all probability, it had long gone.

Several hours later -about 8.00pm last night, I got a call on my phone from the printer’s owner.  Did I want it?

Does The Pope wear a pointy hat in the woods?

The absolute kicker was that the chap said he’d bring it round to my flat!  So, a half hour later, and we’re now the proud owners of an HP printer.

The only slight downside is that it has no USB connection, but a quick look at Amazon.com, and sure enough they sell a USB to parallel connector.  Its on order!

Comms away!

Comms away!

On the right here you can see the latest board I’m building.  As I’ve wittered on about before, this board will effectively replace the PIC programming board I’ve been using.  If you click a couple of times on the photo, you will hopefully see the circuitry I’ve soldered above the big PIC.  These five transistors, associated diodes, resistors and a green LED are the programming bit which ‘glue’ the PIC to my PC.  They provide all the comms between the two.

So last night, Diane was here, and we were just ‘winding down’ from the day’s excitement, and I thought I’d finish this board off while we were talking -just the regulator and the 9-pin serial socket -that’s the plug on the end of the short length of wire to the left of the photo.

Diane was in the kitchen doing something or other, so I thought I’d just plug it in, just for the look of the thing, and maybe see which bits of it didn’t work.

I popped a PIC16F887 in, plugged the board in, checked for smoke, then loaded up the various programs to run it all.

No smoke, but the green LED was lit.  …So far so good…

I then tried to load up a PIC program in the programmer, and…

It loaded fine.

This was extraordinarily good.  Normally, if you forget to even switch the programmer into ‘program’ mode (…thats the switch on the black flying leads to the right of the photo…), it will bleat at you.

So I hit the ‘Program!’ button.

And it only programmed perfectly!

A real and proper; ‘Whose Cat!!??’ moment.

Diane came rushing from the kitchen.  ‘Whats wrong!?’ she exclaimed.

‘It only works!!!‘  I was dumb-founded.  Gob-smacked.  This little circuit that I’ve been putting off building for days because it was such a ‘toughie’ had just worked the first time.  Those five transistors may not look like much, but trust me in this, building analogue electronics on ‘Veroboard’ is no walk in the park.  Digital’s easy by comparison.

So, I’ll carry on with the rest of it.  By tomorrow I want this circuit to be doing what the previous one does -monitoring and controlling, but with the added Party-Bonus in that I don’t have to take the PIC in and out of the board to be able to program it.

Yes.  Definitely a good day.

Last thoughts on the day.

Its getting a little late, so I shan’t be long in this, but these last few days really have been quite a big deal, both for me and for ‘The Project’, and I really feel that now in this ‘quiet time’, its maybe a chance to reflect on just what’s been achieved.

In just over a week, the project has moved forward in leaps and bounds.  Just ten days ago, I was still scratching my head trying to get it round the idea of ‘dummy loads’ and all other manner of problems.  Now, as I’m sat here, I simply turn behind me to see the bike with its generator attached, and attached to that is the ‘shiny new’ electronics board that will measure not only voltage, but current flowing into the battery as well.  And now, not only can I monitor these things, but I can control them as well! By simply changing just a few bytes of code, I can make it do whatever I want!  You want a gentle start?  No problem!  You want an Alpine mountain climb?  Easy!

…Dave came round this afternoon to see what I’d been up to, and aside from being pretty impressed that I’ve still ‘got the touch’ when it comes to building things, he’s anxious that I just ‘put the finishing touches’ to the circuit so that next week, he can start in earnest with the coding.

So tomorrow, I’m just going to put some strain-relief on the input and output cables, I’m going to change over the polarity of one of the plugs and sockets so nothing can be plugged in incorrectly, then build a little circuit and mount it on the board to smooth the power coming from the chopping FET’s in exactly the same way as a computer power supply works.  BIG diodes, BIG coil and a BIG smoothing capacitor.  Easy stuff that will take no more than an hour or so.

THEN I/we have to design the ‘user interface’.

Now this will be the really, really fun bit.

Of course, I haven’t forgotten the ‘JBM’ and ‘JCBM’ buttons.  What? You forgot?  Pah!

‘JBM’ = ‘Jon’s Biscuit Meter’

‘JCBM’ = ‘Jon’s Chocolate Biscuit Meter’

If you recall, press either of these two buttons, and you have to put so many Joules into the battery by pedalling faster for a given period of time.  Obviously the ‘JCBM’ requires quite a bit more work for the lamp to light to say you can have one!

Other features will be two buttons -one for ‘Less!’ and one for ‘More!’ to decrease and increase the loading on the back wheel.  Of course, if you press the ‘More!’ button, for each turn of the pedals you put more into the batteries, so your calorie count will go up accordingly.

Another idea er, ‘borrowed’ from gymnasiums up and down the land is that of a ‘hill profile’ so you will be able to see on the display in front of you when you are coming up to a ‘steep hill’ or a ‘gentle pedal’.  A timer, perhaps?  A ‘Watt Meter’ (…or ‘Calories Meter’…)?  A distance travelled/mileometer? Aah, the choices!

A good way down the line will be when each bike ‘remembers’ each rider because they’ll have an ‘iButton’ attached to their keyring.  The user will simply start pedalling to turn the bike ‘on’, then touch the iButton into a little round receptical -like they have on some bar tills, and it’ll know who they are.  Eventually, each bike will be linked in with the central ‘mother’ unit, and this will have stored each user’s ‘profile’ and their history.

I mentioned this almost as a ‘throw away’ when I gave a few minutes talk at the excellent ‘Grow Sheffield’ AGM a few months ago (…see the new ‘Links’ section at the top of the page for their address…), and there were several ‘health professionals’ in the audience who have dealings with the public and the growing national problem of overweight and even obesity.

Well, their eyes lit up at this, and there were quite a few questions afterwards as to how this would be achieved, and exactly what it would involve.

Obviously, an awful lot more work needs to be done yet, but I can only see the outcome as being a win:win situation:-

People want to come regularly to use our bikes, under cover(!) and in the fresh air to lose a few pounds, then great!  We’ll keep the energy they ‘burn off’ to power our lights and heat our water!  Who knows, they may even want to stay afterwards to pull some weeds or do some watering!

Anyway, that little scenario is quite a few months off yet, so lest we get carried into ‘Fantasy Land’, when I’ve got the circuitboard neatened up and ‘bullet-proof’, Dave will be writing some pretty ‘basic’ code just to get us up and running. That’ll be when we can let our imaginations out to play.

So, Dear Reader:  Is there anything you’d like to see on the bikes?

Sensible answers please to nick(AT)leafsheffield(dot)org(dot)uk!

-That was just to try and stop ‘web robots’ from getting my e-mail address.


SEO Powered By SEOPressor