Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Trigger mechanisim with time delay??

Status
Not open for further replies.

pepsimax007

Newbie level 4
Joined
Sep 12, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
how to make a delayed trigger

Hi guys,

Could you please tell me how to make a device that sends three pulses (close circut, then open again) in a sequence with time delay?

So that it sends:
Pulse wire 1
> waits for 5 seconds
Pulse wire 2
> waits for 5 minutes
Pulse wire 3
> done

Please see attached drawing for a better explanation.
 

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
symbol for time delay relay

This would be very easy to do with a cheap, low-pin count microcontroller. It would require very little code.

Do the outputs need to be 'dry contacts' or can you use a voltage output. If you need contacts you may be able to drive a relay directly, or you may need to drive it using a transistor - depends on the size relay you need.

Microchip has lot's of controllers that you could use http://www.Microchip.com
 

pepsimax007

Newbie level 4
Joined
Sep 12, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
Thank you so much for your answer. Do I need a lot of expensive product to be able to program a microchip? I have never used that, but I am a programmer - so the technical part is fine. But could someone guide me in where to buy what I need?

Preferrably they would need to be try contact, if not I could probably just use a relay or something:)


Thank you SO much!
 

pepsimax007

Newbie level 4
Joined
Sep 12, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
Dude! You are a legend!

Last question: Do I program in assembly, or C? or something that is specific for microcontrollers ?
Do you have some code samples , just so I get an idea.
Is it like IF somethen, then blabla ... or push AEX(12) etc?

Thanks :)
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459

GSM Man

Banned
Joined
Apr 15, 2009
Messages
671
Helped
168
Reputation
338
Reaction score
94
Trophy points
1,308
Location
New Jersey, USA
Activity points
0
As IanP pointed out, products like the PICAXE are easy to program. If you're building only a couple of these then that's a good option. 'C' gives you a lot more flexability but is more difficult to learn. Microchip has a Free IDE (MPLAB), and 'C' compilers that have free student versions.

You'll have to decide what to use based on trade-offs of cost, easy of development, speed, flexability, etc.
 

pepsimax007

Newbie level 4
Joined
Sep 12, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
That was definately the way to go. Downloaded the software, and my project is done :) .. All I need are the parts so I can load it onto the chip.

Final question:
When input 0 = 1, then the sequence starts. A sequence that takes about 4 minutes in total.

Will that sequence re-start if input 0 receives a secondry pulse, in between those four minutes?Or will it run the program from start to end, then after its done ... check to see if it receive a pulse to start up again ?
 

IanP

Advanced Member level 5
Joined
Oct 5, 2004
Messages
7,942
Helped
2,309
Reputation
4,620
Reaction score
531
Trophy points
1,393
Location
West Coast
Activity points
66,459
pepsimax007 said:
Will that sequence re-start if input 0 receives a secondry pulse, in between those four minutes?Or will it run the program from start to end, then after its done ... check to see if it receive a pulse to start up again ?
That depends entirely on how you program the microcontroller to read the inputs ..
It can do (almost) anything you like ..

Rgds,
IanP
 

pepsimax007

Newbie level 4
Joined
Sep 12, 2009
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
That is true. Here is how my code looks now, does this help you interpret the action now? .... Im just curious, since I've ordered all the parts and hopefully have everything I need for my project.


Code:
symbol varA = b0
symbol varB = b1
symbol varC = b2
symbol varD = b3
symbol varE = b4
symbol varF = b5
symbol varG = b6
symbol varH = b7

main:
		low 5
		if pin0 = 1 then label_14	'Decision command
		high 5
		pause 2000	'Wait command
		low 5
		goto label_88

label_14:	high 0
		high 7
		pause 500	'Wait command
		low 0
		low 7
		pause 3000	'Wait command
		high 1
		high 7
		pause 500	'Wait command
		low 1
		low 7
		high 6
		pause 10000	'Wait command
		pause 10000	'Wait command
		pause 10000	'Wait command
		low 6
		high 7
		high 1
		pause 500	'Wait command
		low 7
		low 1
		pause 1000	'Wait command
		high 0
		pause 500	'Wait command
		low 0
		high 7
		high 6
		pause 200	'Wait command
		low 7
		low 6
		pause 200	'Wait command
		high 7
		high 6
		pause 200	'Wait command
		low 7
		low 6
		pause 200	'Wait command
		high 7
		high 6
		pause 200	'Wait command
		low 7
		low 6
		pause 200	'Wait command
		high 7
		high 6
		pause 2000	'Wait command
		low 7
		low 6
		goto label_88

label_88:	let pins = 0
		stop
 

senthilkumar.b

Member level 3
Joined
Aug 29, 2009
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
india
Activity points
1,594
Hi,

Really i cannot able to study your program.

First you should configure the microcontroller.

You should assign the I/O port configuration

You should configure ADC if required.

you should initilize your default port status which are assigned as output .

Now you are ready for logic development.

You should provide suitable subroutene for delay otherwise should configure your timer.

if you have doubt about these, welcome with doubt about and expected way of solution.

if you go through this datasheet means, you can get much more idea.


Take care.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top