New to forum need help with a project

Hello have a project i would like to under take but need some help with the picaxe which i am new to so please be kind.
When young i use to stay with my auntie who had a wind up clock which chimed on the hour for the hour (eg 4 times for 4 o clock)
would like to reproduce the chimes using a picaxe (the tick tock would be the next project) on a 12 hour cycle and would like to
ask some questions if i could ? I see that connecting the chip to a PC is very straight forward with few parts required
I would also add that iam only really need the chime and would not look or use a visual display

What picaxe chip would be best for this job ? is a picaxe the right thing for the job ????
Do the chips have an on board clock ?
If yes how accurate is it ? (a reset every month is ok by me)
Would like to run a small solenoid for the chime any suggestions ?
How long would the pin need to go high to run the solenoid circuit ?
Other than the 5 volt regulated power what else is required to run the circuit

Managed to get a copy of the picaxe editor and getting my head around the Basic programing format ok
I would like some assistance (not done for me ) but wish to learn more about picaxe and progress on to
bigger and better projects
Thanks for your time
Ron ronb28@hotmail.com
 

pxgator

Senior Member
Hi Ron and welcome to the forum...:)

First of all I would recommend changing your handle to just ronb28 or something else without the email address.
Bots will be able to pick up the email address and your inbox will be full of spam!!
Secondly...this part of the forum is for finished projects. Post your question to the active forum (link below)
and you will get more help and replies.

http://www.picaxeforum.co.uk/forumdisplay.php?2-Active-PICAXE-Forum
 

AllyCat

Senior Member
Hi Ron,

Managed to get a copy of the picaxe editor and getting my head around the Basic programing format
The PICaxe Editor is available FREE from the link at the top of the forum. Best to download from there, to ensure that you have the latest version. The "legacy" PE5 (which some of us still prefer for some applications) is also available lower down in the "Obsolete" section. There are also user manuals and on-line command definitions, etc..

To answer a few of your questions: Yes any PICaxe should be fine for your applications, but the "clock" in the basic M2 chips (or X2s with an internal resonator) is not accurate enough to use directly for a "timekeeping" application (perhaps a few parts per thousand, or minutes/day). Use either a PICaxe X2 with an external resonator (crystal), or apply an external synchronising signal (perhaps a 1 or 2 second pulse from a salvaged analogue or digital battery "travel" clock). Or other possibilities are an external RTC (Real Time Clock) module, interfaced via the I2C bus (on any PICaxe), or even very precise 1 second pulses from a GPS module.

You probably don't need a "5 volt regulated" supply; three or even two AA cells are often sufficient. But you will almost certainly need a driver (transistor/FET) to operate a solenoid. Beyond that, it's "horses for courses"; pulse times and voltages, etc. will depend almost entirely on whatever solenoid you choose to use. Or PICaxe might manage a reasonable representation of say "Westminster Chimes" using its SOUND command and a Loudspeaker. ;)

Cheers, Alan.
 

JPB33

Senior Member
Hi Ron I've been working on something similar on and off for ages. I intend triggering my chimes from a mechanical clock using a magnetic sensor. Sure others will advise about using the internal timer but I'd also thought of counting the 1sec output from a GPS module or a real time clock and using that.

Basically its a X12 counter which puts a high out every time it loops after being triggered and re sets after counting 12. Start 1 is the half hour strike which is another looping counter using pause for 1 sec, after 1800 seconds it also produces a high to strike the bell and then waits for the trigger on the hour to start the process again.

I'm only a learner so I'm sure my code could be improved a lot but it works on simulation in PE6. As yet I havent got round to trying it as I found it difficult to get a nice "ring" out of my bell being struck by a solenoid but sure its possible. Another approach to the strike which I want to try, is to energise a small dc motor for a short time (150ms) so that the arm strikes the bell and is pulled off by a spring, think I saw a pic of this on a musical instrument somewhere.

Hope Ive put my code in the right place---everything I know about Picaxe I've learned from this forum, great place, everyone very helpful. Hope this helps.

Peter




Code:
 #Picaxe 08M2
	#No_Data			
	output C.1,C.2	
	
	symbol Del_ay = w1
	Symbol Master_Number = b0
	symbol Counted_Number = b1
	symbol Half_Hour = b4
main:
	pause 100
      do
	loop	until pinC.3 = 0  ; PinC.3 low then high to operate
      do
	loop until pinC.3 = 1  ' waiting for high on C.2 to start
	inc b0                 ' inc master number
	do
	b1 = b1+1                ' inc counting number
	pause 1000
	high C.1 			'Output to actuator              
	pause 150              ' output pulse to chime
	low C.1			'Output low
	if b0 = b1 then        ' comparing variables
	goto skip:             ' skip loop
	end if
      loop                   ' looping until equal
      skip:                  ' skipped to 
	if b0 = 12 then  
	b0 = 0                 ' reset master number to zero after counting 12
	endif
	let b1 = 0             ' reset counted number to 0
	goto main

	start1:
	do 
	loop	until pinC.3 = 1
	do
	Half_Hour = Half_Hour + 1
	pause 1000
	loop until Half_Hour >= 10	'loop for ~30 minutes
	high C.2				'Output
	pause 150
	Half_Hour = 0 low C.2		'reset time and output to zero
	goto start1	'loop
 

Bill.b

Senior Member
This is part code from my clock program that produces Westminster chimes and chimes the hour.

Code:
Chime15:	'15 min chime

	tune b.0, 8,($07,$05,$04,$AB)
	return
	
Chime30:	'30 min chime

	tune b.0, 8,($04,$07,$05,$AB,$04,$05,$07,$84)
	return
	
Chime45:  '45 min chime

	tune b.0, 8,($07,$04,$05,$AB,$2B,$05,$07,$84,$07,$05,$04,$AB)
	return
	
chimehour: ' hour chime 

	 tune b.0, 8,(04,$07,$05,$AB,$04,$05,$07,$84,$07,$04,$05,$AB,$2B,$05,$07,$84)
	 pause 200
	 for b0 = 1 to temphour  'Hour count chime - this is from the main program.
 		tune b.0, 8,($19)
 		pause 400
 	next b0
	return
I could not send the full program because of the down load problem with the forum.

Bill
 
Thanks Peter

Hi Peter
thanks for the reply and i have been looking at your code trying to figure it out. Iam new to this and i thought that i should be able to get a handle on it but am finding it a up hill battle
I may send some code i have been writing for the project if you would like a laugh !! Do you skype ? would be great to talk to someone with some of the same ideas
Regards Ron





Hi Ron I've been working on something similar on and off for ages. I intend triggering my chimes from a mechanical clock using a magnetic sensor. Sure others will advise about using the internal timer but I'd also thought of counting the 1sec output from a GPS module or a real time clock and using that.

Basically its a X12 counter which puts a high out every time it loops after being triggered and re sets after counting 12. Start 1 is the half hour strike which is another looping counter using pause for 1 sec, after 1800 seconds it also produces a high to strike the bell and then waits for the trigger on the hour to start the process again.

I'm only a learner so I'm sure my code could be improved a lot but it works on simulation in PE6. As yet I havent got round to trying it as I found it difficult to get a nice "ring" out of my bell being struck by a solenoid but sure its possible. Another approach to the strike which I want to try, is to energise a small dc motor for a short time (150ms) so that the arm strikes the bell and is pulled off by a spring, think I saw a pic of this on a musical instrument somewhere.

Hope Ive put my code in the right place---everything I know about Picaxe I've learned from this forum, great place, everyone very helpful. Hope this helps.

Peter




Code:
 #Picaxe 08M2
	#No_Data			
	output C.1,C.2	
	
	symbol Del_ay = w1
	Symbol Master_Number = b0
	symbol Counted_Number = b1
	symbol Half_Hour = b4
main:
	pause 100
      do
	loop	until pinC.3 = 0  ; PinC.3 low then high to operate
      do
	loop until pinC.3 = 1  ' waiting for high on C.2 to start
	inc b0                 ' inc master number
	do
	b1 = b1+1                ' inc counting number
	pause 1000
	high C.1 			'Output to actuator              
	pause 150              ' output pulse to chime
	low C.1			'Output low
	if b0 = b1 then        ' comparing variables
	goto skip:             ' skip loop
	end if
      loop                   ' looping until equal
      skip:                  ' skipped to 
	if b0 = 12 then  
	b0 = 0                 ' reset master number to zero after counting 12
	endif
	let b1 = 0             ' reset counted number to 0
	goto main

	start1:
	do 
	loop	until pinC.3 = 1
	do
	Half_Hour = Half_Hour + 1
	pause 1000
	loop until Half_Hour >= 10	'loop for ~30 minutes
	high C.2				'Output
	pause 150
	Half_Hour = 0 low C.2		'reset time and output to zero
	goto start1	'loop
 
how in the heck do you change your user name

how in the heck do you change your user name ?


how in the heck do you change your user name
Hi Ron and welcome to the forum...:)

First of all I would recommend changing your handle to just ronb28 or something else without the email address.
Bots will be able to pick up the email address and your inbox will be full of spam!!
Secondly...this part of the forum is for finished projects. Post your question to the active forum (link below)
and you will get more help and replies.

http://www.picaxeforum.co.uk/forumdisplay.php?2-Active-PICAXE-Forum
 

hippy

Technical Support
Staff member
how in the heck do you change your user name ?
Email 'support at picaxe dot com' from the email address you signed up with along with a couple of preferences for what you would like your user name to be and we can change that.

We will send an email to let you know we have changed it and what your new password is. We recommend changing your password when you log in.
 

inglewoodpete

Senior Member
@Ron, Did you see (and hear) "Little Ben" at this year's "Sculpture at Bathers Beach" (Fremantle - I presume you are in Fremantle, Western Australia)?

Little Ben had a series of metal buckets and rubbish bins with (roughly) the notes of the Westminster Chimes. There was a solenoid hammer inside each bin/bucket controlled by a PICAXE which played the chimes every 15 minutes and then stuck the hour on the largest bin. Doing the Westminster Chimes accurately in code is a surprisingly complex task.
 

AllyCat

Senior Member
Hi,

Yes, the Westminster Chimes tune/pattern doesn't "work" the way that most people believe it does.

@Ron: You could "do a hippy" and change your username to ronb28athotmaildotcom ;) . It does appear that there are already 13 "Rons" on the forum, but you should be able to get "ronb" or certainly "ronb28" if you want. I was a little disappointed not to be able to get Alan (15 of those). :(

Cheers.
 
Little Ben

Hi Pete
I always have intentions to go down to Cottesloe with the family and have a look at sculptures by the sea but manage to never make it and talk to other that do and regret i didnt make it.
You have managed to add to my disappointment !! Do you know if the sculpture was made locally ? I gather you are in Perth i am in Yangebup
Regards Ron



@Ron, Did you see (and hear) "Little Ben" at this year's "Sculpture at Bathers Beach" (Fremantle - I presume you are in Fremantle, Western Australia)?

Little Ben had a series of metal buckets and rubbish bins with (roughly) the notes of the Westminster Chimes. There was a solenoid hammer inside each bin/bucket controlled by a PICAXE which played the chimes every 15 minutes and then stuck the hour on the largest bin. Doing the Westminster Chimes accurately in code is a surprisingly complex task.
 
Hello Alan

Hi Alan
thanks for the message have a quick question for you and the group. How do you manage to learn the code writing ? Have been playing with basic which i am getting my head around it but tried MPLAB and other C and it is a complete mystery to me
Regards Ron


Hi,

Yes, the Westminster Chimes tune/pattern doesn't "work" the way that most people believe it does.

@Ron: You could "do a hippy" and change your username to ronb28athotmaildotcom ;) . It does appear that there are already 13 "Rons" on the forum, but you should be able to get "ronb" or certainly "ronb28" if you want. I was a little disappointed not to be able to get Alan (15 of those). :(

Cheers.
 

inglewoodpete

Senior Member
Do you know if the sculpture was made locally?
Little Ben is the brain child of my business partner and fellow public artist, Philip Gamblen. It was made locally (powder coating in O'Connor, just a stone's throw from you). I stands about 5 metres tall.

I helped out with the hardware (PICAXE AXE401 shield (28X2), DS1307 clock chip and Sparkfun MOSFET Shield), and did the software. Also helped with the installation at Bather's Beach (not Cottesloe). We had to take it apart and put it in storage at the end of the exhibition, so it's not longer in situ.

LittleBenLoRes.jpg
 

inglewoodpete

Senior Member
I'd love to see a video of "Little Ben" on youtube!
As far as I know a video was not made of the installation - hindsight is a wonderful thing :). There is a sound recording of it but I don't have the file. We are hoping that it will get a permanent home - I can't say much more at this point.
 

hippy

Technical Support
Staff member
How do you manage to learn the code writing ? Have been playing with basic which i am getting my head around it but tried MPLAB and other C and it is a complete mystery to me
The big advantage of PICAXE and the PICAXE programming software is that it is fairly easy to get one's head around what one's doing, avoids the sometimes overwhelming effort which may be required with other programming languages, tools and hardware programmers. There may be hurdles along the way but, in most cases, smaller ones which are easier to get over with a little help.

It is not that one doesn't have to learn to code with PICAXE; it's more that it's easier to do, 'the learning curve' is not as steep. For other languages and devices it is the same as learning to code for a PICAXE, just that there is often more to learn, more to understand, set-up and configure before one can actually get down to coding. It will often not be quite so intuitive, especially if one hasn't gone through that before.

Learning to code really comes down to understanding how to do things, by study or by doing, and getting better and more knowledgeable with practice and experience.

A big factor in how easy it is to learn and become proficient is how much help you get from documentation, manufacturer and community support. Some manufacturers and communities do seem to have a, 'you chose to use it; so it's up to you to figure it out', or even, 'if you aren't able to use it; you shouldn't be using it'.

We would like to think we and the PICAXE community are far friendlier than that, appreciate people are often starting from the ground up, with little or limited experience of what they are hoping to achieve, and try to be friendly, encouraging and help wherever we can. It's not a club where we want to keep people out; it's a club we want to welcome everyone into.

And that's the perfect opportunity to again thank all members of the PICAXE community for their contributions, assistance, help, advice, praise and constructive criticism, all generously given.
 

lbenson

Senior Member
To add to what hippy says, there have been some absolute beginners who have learned enough to build complex systems. There are people who just want to learn enough about programming and picaxe hardware to be able control devices in their area of expertise. The forum caters to all levels, and the picaxe system of chips and software and forum support provides a relatively easy path from blinking an LED up to reading various sensors and controlling machinery.

You can start to get a handle on what the picaxe can do without even having any chips in hand--the PE6 program editor allows you to build code and test it in a simulator. It can be as easy as
Code:
  do
    toggle C.1
    pause 1000
  loop
which will blink a [visibly simulated] LED in the simulator (for any chip you select, I think).
 
Top