Home     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
   
 Home     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

Author Topic: clock circuit problem  (Read 7294 times)

0 Members and 1 Guest are viewing this topic.

lefteris_

  • Newbie
  • *
  • Posts: 16
clock circuit problem
« on: May 01, 2013, 20:03:04 PM »
Hello!

I build i clock with 7-seg digits and my problem is that the clock is "ticking" a litle bit faster than the normal time.

5 days now and the clock shows 5 minutes forward than the conventional time.

Here is the circuit, the  file and the components.

cheerio

  • Sr. Member
  • ****
  • Posts: 306
Re: clock circuit problem
« Reply #1 on: May 01, 2013, 23:19:00 PM »
maybe the clockrate is not stable? try a precision oscillator instead of the crystal.

George

  • Jr. Member
  • **
  • Posts: 73
Re: clock circuit problem
« Reply #2 on: May 02, 2013, 00:26:46 AM »
Linear regulator needs a minimum of 2V differential - you have only 6V on a 5v Reg - output will be problematic.

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: clock circuit problem
« Reply #3 on: May 02, 2013, 09:41:51 AM »
Watch out for parasitic capacitance. Where have you implement this circuit? If its on a breadboard, then it will not work because breadboards add huge parasitic capacitance. If you've got a PCB, make sure that the crystal is very close to the chip, as close as possible, and you have grounding planes around it. Microchip gives the proper footprint for this.

lefteris_

  • Newbie
  • *
  • Posts: 16
Re: clock circuit problem
« Reply #4 on: May 04, 2013, 18:06:33 PM »
The circuit has a 9v power supply.

Yes this circuit is on a breadboard.

So, if this was on a pcb i wouldn't had this problem?

Is there any other circuit or chip that i can build an accurate 7 seg clock?

Any suggestions?

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: clock circuit problem
« Reply #5 on: May 04, 2013, 19:10:00 PM »
If any chip requires a crystal to operate, it will have the same problem on a breadboard. To achieve good results you must make a good PCB with very sort tracks between the chip and the crystal, and grounding layers around. For better results you have to match the chip's input capacitance with the crystal capacitance. Also you need to have good quality crystal. This way you may achieve much better results.

lefteris_

  • Newbie
  • *
  • Posts: 16
Re: clock circuit problem
« Reply #6 on: May 07, 2013, 18:45:47 PM »
Now i have another problem. I use the ULN2003A chip to display each segment of the digit with an led strip, so i need to control 7 led strips.

I have connected the gnd of the supply to pin 8 wich is the emitter, the gnd of the led strip to pin 16 and the + of the led strip to the +12 of the supply.

But the led strip is on at low and at hight state of B pin 1.

I want to replace the 7 seg display with 7 led strips using the ULN2003A

Any help?


« Last Edit: May 07, 2013, 19:27:09 PM by lefteris_ »

cheerio

  • Sr. Member
  • ****
  • Posts: 306
Re: clock circuit problem
« Reply #7 on: May 08, 2013, 11:56:31 AM »
did you connect the pin 9?

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: clock circuit problem
« Reply #8 on: May 08, 2013, 14:50:10 PM »
But the led strip is on at low and at hight state of B pin 1.

When you say "LOW", how low? The ULN has darlington transistors, which means that little above 1.3V for input it will conduct a lot of current. Try it by connecting 1 directly to 0. If still works, then the ULN has a problem. And as cheerio noted, leave pin 9 unconnected.

lefteris_

  • Newbie
  • *
  • Posts: 16
Re: clock circuit problem
« Reply #9 on: May 08, 2013, 15:50:15 PM »

The ULN has darlington transistors, which means that little above 1.3V for input it will conduct a lot of current.

Thats the problem.when one segment out of seven is on, the voltage is 2.6v and when the same segment is off the voltage is 1.8v. thats why the led strip is always on.
What i need is when a segment of the digit is on, i want the higher voltage that the pic can supply and when the segment needs to be off , i want the lower voltage. How can this be possible?Has to do with the programm of pic?

The pin 9 is unconnected.
« Last Edit: May 08, 2013, 16:28:00 PM by lefteris_ »

kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: clock circuit problem
« Reply #10 on: May 08, 2013, 17:42:39 PM »
post a schematic. this is very strange. The output of the PIC goes 0 when LOW, not 1.8

lefteris_

  • Newbie
  • *
  • Posts: 16
Re: clock circuit problem
« Reply #11 on: May 08, 2013, 19:21:20 PM »
My first post has the schematic and the .asm file.

Another strange point is that the output of the pic is not stable. the led for the seconds,is on and off with a stable rate for seconds but  not with the same voltage every time.

lefteris_

  • Newbie
  • *
  • Posts: 16
Re: clock circuit problem
« Reply #12 on: May 09, 2013, 21:48:36 PM »
any ideas of what may happenig here?


kam

  • Administrator
  • Hero Member
  • *****
  • Posts: 1849
Re: clock circuit problem
« Reply #13 on: May 10, 2013, 10:06:30 AM »
I mean a schematic with the ULN. Do you have one?

lefteris_

  • Newbie
  • *
  • Posts: 16
Re: clock circuit problem
« Reply #14 on: May 12, 2013, 22:30:31 PM »
There is going to be one pcb for the pic and the main components and one pcb for each digid uln chip.

I will post the schematics and the boards.

As i looking at the schematic i realize that i was connecting the gnd of the uln wrong.

The uln opperates as switch for the led strips and them lights up each time a signal is given from the pic to each segment of the digit from A to G.

I was connecting the gnd of the uln  to the main gnd of the circuit, but there's a transistor for each digit gnd.thats my problem. i dont know where i should groung the uln.I did some tests and the uln works better if i ground it to the collector of transistor of each digit.But but does not work 100%.

I thought that i wouldn't had so many problems with this project, and that it would be a bit easy..

All the testing of the uln is done with the 4 7-seg digits connected to the breadboard.I will try with the digits unconnected.