Grandpa needs help!!!!!!!

Grandpa

New Member
Hello people. I bought the picaxe 18m2 (18mths ago) and i installed the software disc onto the pc but after that i got a white page but i have no idea what to do next? I am trying to set ports 1-4 to 5minutes ON with ports 5-8 5minutes OFF. & then ports 1-4 5minutes OFF with ports 5-8 5minutes ON. My aim is to connect a wired led light to each port and have half of them on and the other half off when in use. If anybody could could show an extremely outdated old man how to do this i would be very grateful (but please be patient as i wouldn't get it quickly) OR i would gladfully provide another 18 m2 & pay for someone to programme it for me. Many thanks for any help/advice given.:confused:
 

JimPerry

Senior Member
Hi Grandpa, from another Grandpa. Welcome to the forum.

Did you get a starter pack with board and download cable? Have you downloaded and read the manuals? What is your electronics/computer background? :confused:
 

Grandpa

New Member
Hi Grandpa, from another Grandpa. Welcome to the forum.

Did you get a starter pack with board and download cable? Have you downloaded and read the manuals? What is your electronics/computer background? :confused:
Hello Jim & thanks for the prompt reply. yes i bought the package and i had all the correct items in the package. My background is zero. I have a project in mind and absolutely no experience whatsoever of electronics and my computer background is poor (but i have just learnt how to attach pics to send in emails) ;) sadly i am a NOOB as my grandaughter tells me.
 

JimPerry

Senior Member
There are dozens of ways to do it - you could even do it with 1 port and a TOGGLE command - if you used a couple of transistors and a changeover relay. This is where learning, equipment available and skill level come into it. A more comprehensive explanation of what you are trying to achieve and what tools etc you have would help tremendously :rolleyes:
 

Grandpa

New Member
Cheers Jim. a TOGGLE command? That's new to me. I have...... a collection of 5mm straw hat leds (3.5v)) and cable, a picaxe 18m2 starter pack & a vision. I have to get soldering equipment (it will be my first soldering experience). I plan to have 2 x picaxe 18m2s for christmas projects. 1st project is to insert a led into our old/vintage glass christmas baubles (they have been in the family over 70 yrs and very special to me). when they light up they will look spectacular (no other lights on the tree next year, just olde world decorations). And the other project is to have lighting on my nativity scene (again very old nativity pieces being set up with a proper nativity scene). That's my vision, but my skills/experience with leds & picaxe are zero. While i am positively confident about the nativity scene i am clueless with picaxe and computers. So this will take me a long time to comprehend. I am so illiterate with computers/tech and i am probably too old to learn. Cheers
 

Buzby

Senior Member
... i am probably too old to learn. Cheers
What !!!!.

Don't be so self-deprecating !!!!.

If you have enough capability to use a PC and join this forum, then you have all the resources you need, no matter what your age !.

The 70 year old baubles sound like they may have significant financial, not just sentimental, value - so be very careful.

Your biggest problem is going to be how to do the wiring, not writing the software.

First question, Are your baubles mains powered, or just glass with no electric ?

Cheers,

Buzby
 

JimPerry

Senior Member
You need to write up a shopping list for parts and tools (the forum can help) ..

Soldering Iron - I use an Antex XS25 with needle point for fine work and a Weller W60 for heavy stuff - don't get a cheap junk iron from the DIY superstore!

Get some Veroboard (stripboard) to practice soldering on
Solder - get a supply of old-fashioned 60/40 multicore lead-based solder - the modern "Lead-Free stuff is horrible to work with.
Decent multimeter.
Prototype breadboard and jumper leads.
Bunch of resistors and capacitors in different values
Heat-shrink sleeving is useful


You can get all this from web stores such as Tech Supplies or Spiratronics.com (in Peterborough) - or if you fancy a drive then Potts in Babington Lane Derby :rolleyes:

Also get a few plastic storage boxes from a pound shop or similar.
 

Grandpa

New Member
Hello and good morning. Thank you Buzby for your kind words, i shall endeavour to rise to this occasion and do my best to emulate your faith in me (although i do know my limits and all of this is "out of my comfort zone". The glass baubles are just glass with no electric, i have bought some green and black cables for the wiring and i plan on lowering them into the funnel neck of the bauble (where the clasp fits on to the bauble to attach/hang them from the tree branch). I used to have the usual multi coloured fairy lights around them giving the usual look, but this year i want to show my grandaughter and great grandaughter how beautiful the older things can look and try to capture the olde victorian magic of a real tree. The actual wiring from ebay is as thin as cotton thread and the two wires fit under the clasp lovely and i aim to attach the led and situate it behind the handpainted christmas deco on each bauble. As for joining this forum, it has been a godsend for me. I can see the possibility to make this happen is now achievable. Many thanks
 

neiltechspec

Senior Member
If all else fails, you could always go to Maplins !.

As much as I hate their prices, I do still use them occasionally.

Neil.
 

Grandpa

New Member
Thank you Neil. I actually went to Maplins but it was a most unpleasant experience. After being treated like an idiot with dementia i purchased their recommended equipment and it was expensive and mostly unsuitable for what i actually needed. I paid an electrician to solder some of their leds and the soldering iron failed after just six leds! I have to consider that it could have been the sparkys fault but i somehow doubt it. Either way it was a terrible experience and a waste of time and money. It actually stopped me dead in my tracks and i put the whole thing on hold (ready to give it up) but a neighbour told me to go and find a forum online and maybe someone will be able to help. 18 months later i am in need to get this project done and see my idea in action, hence joining this site and so far i am more than happy (thanks to you all). Cheers
 

neiltechspec

Senior Member
Yes, Maplins can be a bit like that.

I have 50 years experience in Electronics & they sometimes try & treat me like that until they realise I know infinitely more than they do.

All I ever buy from them is plastic boxes , switches, buttons & occasional veroboard & once a few resistors.

But I only ever go there when I'm desperate.

Neil.
 

Grandpa

New Member
Thanks Neil. I wish i had 50yrs experience in electronics. Then i wouldn't feel so stupid and hopeless trying to do this project. It seemed like such a great thing to do, but i didn't realise how complicated the picaxe and all that NASA stuff was going to be! Cheers
 

ZOR

Senior Member
So it sounds like Grandpa wants to put LED's inside the baubles and run some sequences of light changes. From another Grandpa to another is that correct, then maybe solutions might pop up.

Also if correct, then say how many baubles you have with LED's and what sequences you want
 

Dippy

Moderator
Grandpa, with age comes wisdom (usually) , patience (often) and more spare time (this Forum proves that). So stick at it ;)


I would have a look at some of the sample programmes supplied with the PE (Program Editor) and get a feel of the way the programme (= program code) works and flows.
By studying them and the manuals you'll get used to commands and jargon ("straw hat" LEDs is new to me :) ).

In addition to the aforementioned soldering iron (with stand and sponge) think about getting some of those short test-leads with croc clips at each end.
And some plug-in breadboard which is SO handy for experimenting.
I completely go along with JimPerry regarding avoiding cheap junk .

I'll try and avoid spending your money but a collection of commonly used capacitors and resistors would save money/time in the long run.

Get an A4 notebook/logbook to draw your circuits and notes. Keep it for records/reference. It WILL prove handy; trust me.
Have a look for on-line tutorials on basic electronics and bookmark them. There are many. Don't rush.


Start simple and slowly build up - we all had to do that. Good luck .
You'll have made a Grandparry Pi before you know it!


Additional: I haven't been to Maplins for many years. I'm lucky insofar as having no carriage charges from places like Farnell and RS. Not the cheapest but I'm happy to pay an extra penny for a resistor that I know will be substituted next-day fuss-free if duff. And places like them are a bit more fussy about quality.
 

Grandpa

New Member
So it sounds like Grandpa wants to put LED's inside the baubles and run some sequences of light changes. From another Grandpa to another is that correct, then maybe solutions might pop up.

Also if correct, then say how many baubles you have with LED's and what sequences you want
Hello ZOR. That is correct. i have 16 baubles in total. I would like 8 ON for 5minutes (the other 8 OFF) & then change over so the first 8 go off and the 2nd 8 come on for 5minutes and cycle continues. Cheers
 

D n T

Senior Member
Grandpa,
If you can list exactly what you want to do,
how many LEDs you want to turn on and off,
what power supply you would like to use, etc,
and you can wait another 6 weeks I will build you a PCB with a 20M and terminals to screw in your fine gauge wires.
All you will have to do is program it, I might even write that for you and send it along with the goodies.
I might even include some getting started bits and pieces ( bread board, 330 ohm resistors, 10k pot, LDR etc).
That will save you having to have a stress.

Private message me if you like.
It might take a couple of days for me to read it.
 

Grandpa

New Member
Dippy thanks for your message. Your synopsis of the maturer aged people is very accurate except for me! I am still in the pre age of electric! All this tech talk is most beyond me and i have an headache taking it all in! But i will slowly but surely absorb it and hopefully master it. Cheers
 

JimPerry

Senior Member
When the Forum changed a while back existing members had their join date reset to 1970 - more than 20 years before Picaxe :rolleyes:
 

D n T

Senior Member
Try looking at this site, we use it for students, it easy to understand: technology student.com
And browse through the 3 PICAXE manuals.
One day you make an LED flash, you will be wrapped(happy) everyone else will not know what the fuss is about.
Remember:
Keep Calm and Carry On
If you can get onto this forum you are half way there.
 

Grandpa

New Member
When the Forum changed a while back existing members had their join date reset to 1970 - more than 20 years before Picaxe :rolleyes:
phew. I thought i had slipped into senile dementia as i was sure picaxe was more recent than that! I have been going through the manuals and i have even watched a few youtube videos, but i still can't understand it. I am a wooden top!!!! Cheers
 

ZOR

Senior Member
Hello ZOR. That is correct. i have 16 baubles in total. I would like 8 ON for 5minutes (the other 8 OFF) & then change over so the first 8 go off and the 2nd 8 come on for 5minutes and cycle continues. Cheers
Has someone done anything like this to get the project off the ground? I thought something like a 555 timer and let Grandpa get to speed with the Picaxe device.

As well as 555 timer circuits there are counters
http://www.electroschematics.com/6261/xmas-decoration/

But keep learning about the Picaxe, you can do so many things with it.
 
Last edited:

SAborn

Senior Member
Grandpa,

I love your name, and your openness to your skill level.

Back to what you require in code, im not sure if i understand correctly.
From what i read you have 2 sets of lights you wish to control, with a simple... On lights_A and On lights_B, or Off/On with each set in a preferred order.

If im correct than you only need 2 output pins to do that, so a 08m2 chip or greater pin chip can easy do that.

The hardest part with picaxe is loading the program to a chip for the fist time, and that is so easy once you have done it, but i respect its a nervous moment first up.

As once you can load a chip, then i or anyone on the forum can write a program and email it to you, and you simply load it to the chip.

Can you describe your lighting routine as ....... lights_A on/off periods and lights_B on/off periods, as we write code for a on period and a off period for each light, they can be both Off or ON at any one time, its just a matter of what you want to see.
 

Grandpa

New Member
Hello SAborn. Thank you for everything. i have 16 single/seperate wide angled (straw hats) leds (to be soldered to cable). The plan is to place a led into each bauble and connect all 16 ends to 2 x 18m2 picaxe so i can have 8 leds ON for 5minutes (the other 8 are OFF at this time) and then the next 8 leds switch ON 5minutes (while the first 8 turn OFF for 5minutes) and that is the cycle for the duration. 8 leds ON 5mins and 8 leds OFF at all times. I am sorry if what i am saying doesn't make sense, this is another world and language to me. Best wishes
 

Grandpa

New Member
Yes that looks like the board. I have one and i need another as they hold 8 ports each and i have 16 leds to connect. I have bought 5mm red, blue & white leds. I am trying desperately to put the leds, wires, etc up on here but each time i try to add image i just get exclamation marks!!!!!!!! And if i can't even do this, what chance do i have at trying to conquer this space age double dutch?
 

Buzby

Senior Member
Hi Grandpa,

If all you want is '8 on and 8 off' followed five minutes later by '8 off and 8 on', then even a single 8-pin PICAXE could do this. ( Google for serial wiring of LEDs.)

What you describe, with every LED having it's own pin, gives you lots more flexibility, like chasing and twinkling, so let's take that route.

To drive 16 LEDs you will need 16 pins, so you need two 18M PICAXEs, right ?.

Well, with a tiny change to the wiring, one 18M can drive all 16 LEDs individually.

Would you like to see how ?

Buzby
 

Grandpa

New Member
Hello Buzby. Yes please, would love to see. If you could possibly keep it to laymans terms (i am extremely dim) i would be delighted! Thank you
 

SAborn

Senior Member
I think buzby is correct but at a later stage i think from what Grandpa tells us of his skill level.

Me think better to get Grandpa to walk before we try to teach him to run, so for that reason i suggest we stick with 2 states of 2 sets of lights.

Often best intentions become overwhelming to a newbie with picaxe, so for Grandpa i suggest we keep it simple, then move forward with twinkle lights after he has the basics working.

It sounds like flashing a led is a huge step for grandpa, so lets just climb 1 mountain at a time, and not get too advanced with twinkle lights.
 

lbenson

Senior Member
Run this in the simulator to see how it might work with a 20M2:
Code:
#picaxe 20M2

dirsb=%11111111 ' set port B pins as outputs
dirsc=%11111111 ' set port C pins as outputs

do
  pinsb=%11111111 ' turn all port B pins on
  pinsc=%00000000 ' turn all port C pins off
  pause 5000 ' 5 seconds; uncomment below to pause 5 minutes
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
  pinsc=%11111111 ' turn all port B pins off
  pinsb=%00000000 ' turn all port C pins on
  pause 5000   '  uncomment below to pause 5 minutes
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
  ' pause 60000  ' pause 1 minute
loop
Cut and paste this code into PE5 (download using the "Free Software" link at the top of this page--don't download PE6 at this point), and press the "Simulate" button.

To make the cycle 5 minutes (instead of 5 seconds), you would "uncomment" (remove the sinqle quote at the beginning of the line) the "pause 60000" lines.

Note that pinC.6 cannot be an output, so you would have to gang two of the leds together on one of the C port outputs.

I agree that flashing the first led will be the hardest part of this task.

 

Attachments

Last edited:

Buzby

Senior Member
Hi Grandpa,

The technique is called 'multiplexing', and works because of 'persistence of vision'.

It is used in thousands of applications, because it can drive many LEDs with just a few pins.
( There are some other types of 'plexing, that can drive even more LEDs with even fewer pins, but we're not going there today ! )

You can physically see multiplexing in action if you swing an LED clock across your field of vision. The digits seem to 'break up'.
Modern car tail lights do the same, but it's a bit hard to swing a car, so you usually see it if your eyes sweep across them instead.

These LEDs are not lit continuously, but are flashing at a high rate, fast enough to give the impression of solid light.

In the 'gap' between the flashes of a single LED the pin driving that LED can be used to light a different LED. Repeat this every few milliseconds and both LEDs seem to be lit continuously.

A PICAXE pin can both 'sink' and 'source' current, so an LED wired from the pin to +V will light when the pin is driving 'Low', and another LED wired from the pin to 0v will light when the pin is driving 'High'.

Two LEDs from 1 pin !.

This is the idea that will let you drive 16 LEDs with 8 pins from the PICAXE.

I've got to go out for a few hours now, but I'm sure someone will chip in with a drawing.

Cheers,

Buzby
 

Grandpa

New Member
woo hoo. Firstly many thanks to you all. I will be trying this later, so i apologise if there is a lot of absence from me while you are all trying to contact me. I will be here honestly, but i take a considerably long time to do things and thus it will take me a while to get back to you. But i thank you all and i will be back on here as soon as possible. Cheers
 

The bear

Senior Member
Hi Grandpa,
You have had some good advice, I'm a beginner also.
My advice is; Don't give up. Keep plodding on, you can beat it. Sometimes I use a cricket bat!

Regards, Bear..
 
Top