Home |
Search |
Today's Posts |
#1
Posted to alt.electronics
|
|||
|
|||
PIC Timing Acuracy
Hi,
I have a plan for a PIC project but im not sure about the acuracy that can be achieved with a PIC. Basicly I will be using a number of dealy routines but I need the PIC to run for 2 months and it must not lose more than 2 minutes per week. I intend to run it at 4MHz And the temperature should be fairly steady (code), Should this be possible? Also a question about relays, my understanding is you can use them to switch a high voltage from a low votage triger, and that you can use them as a simple switch, you aply voltage to one side and the other side contacts. Is this the case? Thanks for your time, any help is much appreciated. |
#2
Posted to alt.electronics
|
|||
|
|||
PIC Timing Acuracy
"Richard Harris" wrote in message ... Hi, I have a plan for a PIC project but im not sure about the acuracy that can be achieved with a PIC. Basicly I will be using a number of dealy routines but I need the PIC to run for 2 months and it must not lose more than 2 minutes per week. I intend to run it at 4MHz And the temperature should be fairly steady (code), Should this be possible? That's about 200 parts/million so yes,a 4MHz crystal will do the job nicely, but it will burn up a couple of mA. Do you really need that much speed for your application? You could run it from a 32,768Hz watch crystal and run continuously (without sleeping) for months (if not years) from AA cells. In either case, sleeping would increase your battery life. Also a question about relays, my understanding is you can use them to switch a high voltage from a low votage triger, and that you can use them as a simple switch, you aply voltage to one side and the other side contacts. Is this the case? Pretty much, but a PIC isn't going to be able to directly drive much of a relay. You'll need a driver transistor of some sort for most relays. How much voltage are you wanting to switch? A MOSFET may be the way to go instead of the relay. Thanks for your time, any help is much appreciated. |
#3
Posted to alt.electronics
|
|||
|
|||
PIC Timing Acuracy
"Anthony Fremont" schreef in bericht ... "Richard Harris" wrote in message ... Hi, I have a plan for a PIC project but im not sure about the acuracy that can be achieved with a PIC. Basicly I will be using a number of dealy routines but I need the PIC to run for 2 months and it must not lose more than 2 minutes per week. I intend to run it at 4MHz And the temperature should be fairly steady (code), Should this be possible? That's about 200 parts/million so yes,a 4MHz crystal will do the job nicely, but it will burn up a couple of mA. Do you really need that much speed for your application? You could run it from a 32,768Hz watch crystal and run continuously (without sleeping) for months (if not years) from AA cells. In either case, sleeping would increase your battery life. Also a question about relays, my understanding is you can use them to switch a high voltage from a low votage triger, and that you can use them as a simple switch, you aply voltage to one side and the other side contacts. Is this the case? Pretty much, but a PIC isn't going to be able to directly drive much of a relay. You'll need a driver transistor of some sort for most relays. How much voltage are you wanting to switch? A MOSFET may be the way to go instead of the relay. Thanks for your time, any help is much appreciated. Anthony is right, he missed one thing. You were talking about delay loops, these are not as accurate as timers. The only way you can use delay loops accuratly is when you now exactly what code is executed and make sure that if you want to switch something that it takes just as long as not switching anything. This is most of the times not possible. If you use timers, the accuracy is mostly depended on the crystal. Alexander |
#4
Posted to alt.electronics
|
|||
|
|||
PIC Timing Acuracy
Thanks you very very very much
That was exactly what i needed to know. I love the idea of using a watch crystal and yup I dont need to run at such speed. The reason i wanted to use a relay is I have a push button on a device and I need to triger it from a PIC, I dont know how the switch is hooked up, all I know is that the device is running of 3V, so i figured if I replaced the push button switch with a relay and trigered it from the PIC I would be sorted. (I know nothing about electronics so this seemed a simple sure way of achiving what I needed) Cant thank you enough. PS Im about to make a killing $$$$ with some electronics that cost a few dolars, aint that funy, considering :-) "Anthony Fremont" wrote in message ... "Richard Harris" wrote in message ... Hi, I have a plan for a PIC project but im not sure about the acuracy that can be achieved with a PIC. Basicly I will be using a number of dealy routines but I need the PIC to run for 2 months and it must not lose more than 2 minutes per week. I intend to run it at 4MHz And the temperature should be fairly steady (code), Should this be possible? That's about 200 parts/million so yes,a 4MHz crystal will do the job nicely, but it will burn up a couple of mA. Do you really need that much speed for your application? You could run it from a 32,768Hz watch crystal and run continuously (without sleeping) for months (if not years) from AA cells. In either case, sleeping would increase your battery life. Also a question about relays, my understanding is you can use them to switch a high voltage from a low votage triger, and that you can use them as a simple switch, you aply voltage to one side and the other side contacts. Is this the case? Pretty much, but a PIC isn't going to be able to directly drive much of a relay. You'll need a driver transistor of some sort for most relays. How much voltage are you wanting to switch? A MOSFET may be the way to go instead of the relay. Thanks for your time, any help is much appreciated. |
#5
Posted to alt.electronics
|
|||
|
|||
PIC Timing Acuracy
On 2006-03-12, Richard Harris wrote:
Hi, I have a plan for a PIC project but im not sure about the acuracy that can be achieved with a PIC. Basicly I will be using a number of dealy routines but I need the PIC to run for 2 months and it must not lose more than 2 minutes per week. I intend to run it at 4MHz And the temperature should be fairly steady (code), Should this be possible? if you use a crystal for the clock that could work. Also a question about relays, my understanding is you can use them to switch a high voltage from a low votage triger, and that you can use them as a simple switch, you aply voltage to one side and the other side contacts. Is this the case? yes. get a relay and some flashlight bulbs and have a play. Bye. Jasen |
#6
Posted to alt.electronics
|
|||
|
|||
PIC Timing Acuracy
Hi,
Ok me made a circuit diagram that i think is as simple as it can possibly be. http://www.synios.com/Circuit1.jpg Does this look ok? The technical data sheet on the pic states that it will operate at 12uA @ 32kHz 2.0V typical. So that is about uA = 0.000001(micro) * 12 = 0.000012 Amp hour Timer Oscillator Current 1.2uA @ 32kHz 2.0V typical. So that is about uA = 0.000001(micro) * 1.2 = 0.0000012 Amp hour 0.000012 + 0.0000012 = 0.0000132 Amp hour 0.0000132 * 24 (hours in day) = 0.0003168 0.0003168 * 60 (days in 2 months) = 0.019008 Amp So I would need 0.02 Amp battery then to run the pic for 60 days. It does seem a little to impressive, have I made some big mistake here ? Lastly, it seems that a relay is not such a good idea, because it uses to much current to operate. I know that the push button switches i need to operate simply contacts two terminals when the button is pushed and that the device is running of 3.6V also the current passing though cant be very much. What would be the simplest way of operating the switch from the output pin of a pic? would a Mosfet do the job? and any info on how to do this. Thank you for your time, it is very much appreciated.. RJH "Richard Harris" wrote in message ... Hi, I have a plan for a PIC project but im not sure about the acuracy that can be achieved with a PIC. Basicly I will be using a number of dealy routines but I need the PIC to run for 2 months and it must not lose more than 2 minutes per week. I intend to run it at 4MHz And the temperature should be fairly steady (code), Should this be possible? Also a question about relays, my understanding is you can use them to switch a high voltage from a low votage triger, and that you can use them as a simple switch, you aply voltage to one side and the other side contacts. Is this the case? Thanks for your time, any help is much appreciated. |
#7
Posted to alt.electronics
|
|||
|
|||
PIC Timing Acuracy
"Richard Harris" schreef in bericht ... Hi, Ok me made a circuit diagram that i think is as simple as it can possibly be. http://www.synios.com/Circuit1.jpg Does this look ok? The technical data sheet on the pic states that it will operate at 12uA @ 32kHz 2.0V typical. So that is about uA = 0.000001(micro) * 12 = 0.000012 Amp hour Timer Oscillator Current 1.2uA @ 32kHz 2.0V typical. So that is about uA = 0.000001(micro) * 1.2 = 0.0000012 Amp hour 0.000012 + 0.0000012 = 0.0000132 Amp hour 0.0000132 * 24 (hours in day) = 0.0003168 0.0003168 * 60 (days in 2 months) = 0.019008 Amp So I would need 0.02 Amp battery then to run the pic for 60 days. It does seem a little to impressive, have I made some big mistake here ? Lastly, it seems that a relay is not such a good idea, because it uses to much current to operate. I know that the push button switches i need to operate simply contacts two terminals when the button is pushed and that the device is running of 3.6V also the current passing though cant be very much. What would be the simplest way of operating the switch from the output pin of a pic? would a Mosfet do the job? and any info on how to do this. Thank you for your time, it is very much appreciated.. RJH "Richard Harris" wrote in message ... Hi, I have a plan for a PIC project but im not sure about the acuracy that can be achieved with a PIC. Basicly I will be using a number of dealy routines but I need the PIC to run for 2 months and it must not lose more than 2 minutes per week. I intend to run it at 4MHz And the temperature should be fairly steady (code), Should this be possible? Also a question about relays, my understanding is you can use them to switch a high voltage from a low votage triger, and that you can use them as a simple switch, you aply voltage to one side and the other side contacts. Is this the case? Thanks for your time, any help is much appreciated. I don't have much experience with solid state relays, maybe they consume less power. Alexander |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
pitch = timing belt pulleys tooth spacing ? | Metalworking | |||
Disc Tray timing of Panasonic SC-HT 670 DVD Home Theater | Electronics Repair | |||
Timing belt supplier | Metalworking | |||
Timing of the Lucy. | Metalworking | |||
Looking for source for 1/2 inch wide MXL timing belts | Metalworking |