Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

chronograph trouble, PIC oriented

Status
Not open for further replies.
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
 

Attachments

  • PICChronograph.jpg
    PICChronograph.jpg
    366.4 KB · Views: 277
  • 100_2128.JPG
    100_2128.JPG
    326.3 KB · Views: 249
  • PICCHRT2.asm
    3.7 KB · Views: 181
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.
 
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.
 
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.
 
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.
 
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)
 
I just noticed that the caps on your crystal are 22uF. They should be 22pF. This would stop the oscillator working.

Mike.
 
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top