+ Reply to Thread
Results 1 to 9 of 9

Thread: chronograph trouble, PIC oriented

  1. #1
    electronicsfreak Newbie
    Join Date
    Nov 2008
    Posts
    79

    Default chronograph trouble, PIC oriented

    Alright, here is what the project is. it will be once completed a simple chronograph which will calculate how fast an object can fly between the two gates (phototransistor/white LED) it will then either display the speed or the time that it took for the object to travel between the two gates on the three 7segment common anode displays through 3 CD4026AE's with transistor IC's now I know that the counter works when all of the certain pins on the first 4026 in the chain are connected directly to either 0v, or +4.5VDC (shown in the video on the link below.)

    YouTube - 4026 counter
    (i made sure I was dicharged in the video before I touched the counter)

    Here's my problem. When it is connected to the microcontroller it doesn't do what it is suposed to do. when it turns on (in the program), it has all of the outputs off until one of the switches is pressed--which should just display the three decimal points as the displays are common anode. Instead, it displays the 000 as if the screen was enabled, and then finally after about 25-30seconds everything goes dark leaving the three decimal points. During the whole time pressing the input switches does nothing.

    This told me that it was an oscillator problem, but I've already tried swapping out the PIC as well as the 4MHz oscillator which does nothing.

    When you pull out the PIC and reconnect the necessary pins on the 4026 to ground/4.5v thecounter still works, I just cant get it to respond to the PIC.

    I know that a very probable second problem that I will have is with the actual gates and if anyone has any suggestions on what to change please post them as well.

    attached are the schematics, a photo of the circuit, and a program that should increment the counter every 2 seconds.



    note----in the actual circuit the microcontroller is a PIC16F627, MCLR-pin4 is actually connected to +4.5vdc with a 56Ω resistor, and Vdd-pin 14 is actually connected to +4.5Vdc
    Attached Images
    Attached Files


  2. #2
    Help us help you blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent blueroomelectronics Excellent
    Join Date
    Jan 2007
    Location
    Toronto, Canada
    Posts
    10,694
    Blog Entries
    5

    Default

    Very neat, may I ask why you chose to use glue logic instead of a single larger PIC?
    Bill
    Smart Kits build Smart People

    http://www.blueroomelectronics.com/

  3. #3
    electronicsfreak Newbie
    Join Date
    Nov 2008
    Posts
    79

    Default

    While I could accomplish the same thing using a PIC16F877, this project is being entered into a contest where the circuit is being graded by how complex that it is rather than by its simplicity (hopefully putting it ahead of the simple single IC circuits that everyone else has done every other year. If I make it to nationals I may build a second one just using one pic attached to the same board to show just how a PIC with multiple I/O's can greatly simplify the circuit while at the same time allow the programmer more options such as displaying basic words.


    if only I can get the PIC to communicate with the counter.

  4. #4
    jrz126 Newbie
    Join Date
    Sep 2004
    Location
    Erie, PA - USA
    Posts
    1,122

    Default

    [QUOTE=electronicsfreak;695356]While I could accomplish the same thing using a PIC16F877, this project is being entered into a contest where the circuit is being graded by how complex that it is rather than by its simplicity.
    QUOTE]

    It'd make more sense to me to have the circuit complete a more complicated task rather than have a more complicated circuit for a simpler task.

    Looks like your circuit has some problems? Here's a few things I noticed:
    You have the ungated C output of the counters connected to ground.

    No bypass caps on the IC's (put a 0.1 or 1 uF cap) near the power pins of the IC's.

    Whats the voltage range of your PIC? 4.5V seems alittle low.
    Jeff
    To the optimist, the glass is half full.
    To the pessimist, the glass is half empty.
    To the engineer, the glass is twice as big as it needs to be.

  5. #5
    electronicsfreak Newbie
    Join Date
    Nov 2008
    Posts
    79

    Default

    [QUOTE=jrz126;695709]
    Quote Originally Posted by electronicsfreak View Post
    While I could accomplish the same thing using a PIC16F877, this project is being entered into a contest where the circuit is being graded by how complex that it is rather than by its simplicity.
    QUOTE]

    It'd make more sense to me to have the circuit complete a more complicated task rather than have a more complicated circuit for a simpler task.

    Looks like your circuit has some problems? Here's a few things I noticed:
    You have the ungated C output of the counters connected to ground.

    No bypass caps on the IC's (put a 0.1 or 1 uF cap) near the power pins of the IC's.

    Whats the voltage range of your PIC? 4.5V seems alittle low.

    -I'll try putting in the caps.

    For the ungated C output, it is infact connected to the transistor IC. (it turns on like it should in the video when I'm just testing the counter) it is the NOT 2 OUTPUT that I have connected to ground because I don't have any use of it in this situation pin 14 on the seperate 4026's



    The PIC16F627 runs anywhere from 3v to 5v, and the other 6 IC's can run anywhere from 3v to 15v. 4.5v just seemed like the best and easiest option to use.

  6. #6
    electronicsfreak Newbie
    Join Date
    Nov 2008
    Posts
    79

    Default

    Alright, I just tried adding the capacitors, but it doesn't change anything.

    I"ve also tried replacing the PIC with brand new never been programmed PIC16F628 (of course changing the program slightly to account for it) and it still makes no difference.


    I'm guessing it's a programming or an ossilator problem as when it is connected every minute or so it will increment the counter to a random # and I tried completely disconnecting it from everything except for the two led's, oscillator, MCLR resistor, and switches and I can't even get it to oscillate between the two leds. (added a few BCF and BSF commands in the code along side with what is suposed to increment the counter for the pins that they are on)

    anyone have anyideas here, I'm completely lost.

  7. #7
    electronicsfreak Newbie
    Join Date
    Nov 2008
    Posts
    79

    Default

    UPDATE---

    there was more than 1 problem, but still a very large issue



    now, I never would have expected this,but those small 4026 7-segment counters/ transistor IC's/7-segment displays were drawing so much current, that the microcontroller wasn't be able to start up.


    so, I'm gonna have everything be run of of a lm7805 +5v voltage regulator which is in turn powered by an 8.4v 1600mAh NiMh battery pack--(yes they are the same one's from my other post, and yes this project is also due in less than a week)

    I still haven't been able test if that setup for a photosensor would work.


    Does anyone have any input that they might be able to give on that simple circuit? (the photodiodes are NPN FPT100A 's)

  8. #8
    Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent Pommie Excellent
    Join Date
    Mar 2005
    Location
    Brisbane Australia
    Posts
    6,784

    Default

    I just noticed that the caps on your crystal are 22uF. They should be 22pF. This would stop the oscillator working.

    Mike.

  9. #9
    electronicsfreak Newbie
    Join Date
    Nov 2008
    Posts
    79

    Default

    Quote Originally Posted by Pommie View Post
    I just noticed that the caps on your crystal are 22uF. They should be 22pF. This would stop the oscillator working.

    Mike.
    Thankyou, I'll have to change that in the diagram, I never did notice that.
    They are infact 22pF in the built circuit. I just mislabeled those components in the circuit diagram.

+ Reply to Thread

Similar Threads

  1. chronograph
    By freckle101 in forum Electronic Projects Design/Ideas/Reviews
    Replies: 1
    Latest: 16th October 2008, 11:54 PM
  2. i am having trouble to understand this one..
    By transgalactic in forum Electronic Projects Design/Ideas/Reviews
    Replies: 0
    Latest: 19th May 2008, 06:17 PM
  3. LCD trouble
    By Electronics4you in forum General Electronics Chat
    Replies: 6
    Latest: 21st November 2006, 04:18 PM
  4. LED TROUBLE
    By windozeuser in forum General Electronics Chat
    Replies: 2
    Latest: 27th November 2003, 04:47 PM
  5. Arrow Chronograph Circuit
    By bledsoam in forum Electronic Projects Design/Ideas/Reviews
    Replies: 4
    Latest: 25th September 2002, 10:48 AM

Tags for this Thread