Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

[Moved] Pulse Sequence Generator / Smart Timer

danadakk

Advanced Member level 3
Joined
Mar 26, 2018
Messages
998
Helped
194
Reputation
392
Reaction score
206
Trophy points
43
Activity points
4,680
Often users, developers, hobbyists need timed and qualified event generators,
many resorting to 555 timers and the like. The venerable 555 has had a long run
but its limited in accuracy and capability.

This approach uses block language to create pulse streams of desired width and inter
pulse delay. In addition it has the capability to gen a series of pulses, then halt waiting
for a trigger from an A/D value or a pin state. All intermixed in any order. More features
can be easily added later, like compound qualified triggers. And or frequency/pulse
with input qualifiers. Even the ATTINY85 can run the code, 8 pin mini dip, with
internal oscillator accuracy of +/- 2% if I recall correctly.

Can run on UNO, Nano and the like boards.

IDE is mBlock 5.0, freebee.

This is not meant to replace lab grade instrumentation, but is fine for broad simple applications.

mBlock, you drag and drop and configure blocks, when done mBlock converts that to Arduino code
and programs board.

1622919291857.png



The above particular example puts out 3 pulses, 10 mS, 100 mS, 1 Sec, with inter-pulse delays of
500 mS, 400 mS, 300 mS respectively, then waits for A/D to trigger on > 2.5V to issue the
next pulse of 700 mS with delay of 5oo mS, then waits for a pin to fire, lastly putting out a
pulse of 300mS and a delay 0f 2S. Could have done a train in years if needed, of NN
# pulses. Different pins can be pulses or the same, different analog pins used for analog
triggering....

Lots of fun, easy to program, not rocket science.

To program ATTINY85 additional steps needed, eg. use another Arduino as a programmer.
But not difficult once you know how to do it. Multiple examples on web. Programing
Nano, Uno boards done directly with mBlock.


Note I did not invoke the intermediate triggers for this screen shot.

1622919061673.png



Regards, Dana.
 

Attachments

  • 1622919105834.png
    1622919105834.png
    366.8 KB · Views: 33
Last edited:

danadakk

Advanced Member level 3
Joined
Mar 26, 2018
Messages
998
Helped
194
Reputation
392
Reaction score
206
Trophy points
43
Activity points
4,680
No question, just a capability, post in wrong forum section ?

Also I need to take it down because I have an error in it, I need to edit and repost.

Regards, Dana.
--- Updated ---

Note there is an error in block structure, here is corrected version -

1622926610305.png




Regards, Dana.
 
Last edited:

danadakk

Advanced Member level 3
Joined
Mar 26, 2018
Messages
998
Helped
194
Reputation
392
Reaction score
206
Trophy points
43
Activity points
4,680
Added a qualified Pulse Width trigger. This is good for 10 uS to 23 minutes only in PW.

1623004985869.png


Note all the triggers are blocking, code is sequential and halts at triggers until
that trigger is satisfied. The A/D voltage trigger one exception since it HW.

And here is the basic mBlock project you can customize to your liking. Attached.

Regards, Dana.
--- Updated ---

Project
 

Attachments

  • PulseGen (4).zip
    57.3 KB · Views: 1
Last edited:

LaTeX Commands Quick-Menu:

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top