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.

PIC - how?

Status
Not open for further replies.

upn

New Member
Hi!
I need to make a circuit to do the following:
-An hydraulic motor is started
-A switch is giving pulses of the hydraulic motors revolutions
The issue:
-At the pulse 3 an electric relay (A) needs to be activated
-At the pulse 33 another electric relay (B) needs to be activated
-At the pulse 36 a third relay (C) needs to be activated

After this sequence there should be a manual switch to reset the counting, stand by to start over again when the hydraulic motor is started again.

I would also need a 2 digit seven segment display to record the number of pulses during a sequence. In addition, a 3 digit seven segment display would be useful to record the total number of sequences.

I've been studying different circuits and components. As far as I can tell, a PIC would be able to to this job.

Is there anyone who can tell me wether I'm right or wrong? Are there any other, easier ways to solve this issue?

Best regards,
Anders
 
"Are there any other, easier ways to solve this issue?"

Maybe if you gave us a better discription on what you are doing from a big picture view.

Lefty
 
Picture

Would this help you?
1.PNG

It's really quite simple. To see it from a different view:
-One switch is depressed 36 times, giving pulses to a "processor".
-A 7seg display is counting the pulses
-At the pulse#3 Relay 1 is activated
-At the pulse#33 Relay 2 is activated
-At the pulse#36 Relay 3 is activated - to stop the sequence

Than, a reset switch should reset the "processor" and the 2digit seven segment, and also give a pulse to the 3digit 7seg, that should count +1 for each sequence performed.





Anders
 
upn said:
Would this help you?
View attachment 14755

It's really quite simple. To see it from a different view:
-One switch is depressed 36 times, giving pulses to a "processor".
-A 7seg display is counting the pulses
-At the pulse#3 Relay 1 is activated
-At the pulse#33 Relay 2 is activated
-At the pulse#36 Relay 3 is activated - to stop the sequence

Than, a reset switch should reset the "processor" and the 2digit seven segment, and also give a pulse to the 3digit 7seg, that should count +1 for each sequence performed.





Anders

A PIC should be able to do that task easily and I can think of no simpler way as far as component count & costs.

Things to pay attention to:

Be sure you handle switch contact bounce with either external RC or software debouncing code.

Also you might consider using a LCD display to show all the various count data, using software to format the display as required. Either a parallel or serial display would work.

Lefty
 
Answer on your question is YES.
You can do it with any PIC. Some more advices:
-For power supply use switching supply
- use optocoupler for input and output
- with LCD will be easier the reading of both parametter in same time
(if you dont need a larger display)
 
What do you mean by "switching power supply"? The only thing available is 12Vdc, from a battery. The display that's showing the sequence-count is not nescessary to read more often than approxematly once every second hour. Its the other, the pulse-count, that I need to read at any time. In my opinion a 7seg would be best, since I most likely has to read it from a distance of 8-10meters. (I guess I'm talking about a fearly big 7seg...)
 
OK
If you use battery you don't need switching power supply.
If you must use 7-segment leds my sugestion is to use MAX7219 7-segment led driver.It.s much easier with it becouse you don.t have to think about refresh mode of leds when you programing a PIC and if you use PIC16f84 or same other 18-legs PIC you will not have enought pins for your project.
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top