Testing Qspice monostable

Hello
I am testing the built-in Qspice monostable component. I need to control the on time externally from a voltage source. It seems that it is not possible. Only constant values are accepted?
Any suggestion?
Thanks!

Using C-block may make it easier. I hope I didn’t make a mistake. By the way, I have only implemented the basic features and have not considered special situations such as a period less than the on-time or changes in on-time during Q is set. May need to revise it if something goes wrong. Just share an idea.

parent.ConstantOnTime.qsch (3.4 KB)
ConstantOnTime.qsym (493 Bytes)
constantontime.cpp (3.8 KB)

Nice solution. However at this time I think I prefer using an analog implementation to keep it simpler. I am working now on the Qspice version of the one-shot circuit I did before for LTspice.

A little bit disappointed with the monostable implementation in Qspice. It would be nice to allow using external variables for the component parameters. Could be a suggestion for Mike.
Thanks!

If it eventually becomes a ¥-Device, it could also be a C-block device, with the only difference being that it is authored by Mike. :sweat_smile:… (not 100% sure).
I believe that an analog version can exist, and perhaps some community members will have suggestions very soon. Just whenever I see something that needs to sync with the clock, I will prefer C-block.

1 Like

This is ConstantOnTime with Qspice device (not C-block), and can input On-Time and Frequency setpoint to generate PWM pattern.

Constant-OnTime-FreqStp.qsym (953 Bytes)
Parent2.ConstantOnTime.qsch (3.1 KB)

Finally, this is ConstantOnTime with Qspice device (not C-block), and can input On-Time and CLK to generate PWM pattern.

Constant-OnTime-CLK.qsym (1.0 KB)
Parent2.Constant-OnTime.qsch (3.9 KB)

Thank you very much.
I am curious how you implemented it. Can you share the internal schematic of the circuit if you have it available?
Thank you!

Here is the circuit ideal. I have only considered normal operating conditions. If you believe anything can be improved here, feel free to let me know.

Idea.Constant-OnTime-CLK.qsch (8.0 KB)
Idea.Constant-OnTime-FreqStp.qsch (8.6 KB)

1 Like

This is another implementation of the monostable I have come up with, which is more reliable than my previous one.
1.- One-shot-circuit-design.qsch (9.5 KB)
2.- One-shot-circuit-design-ac-test.qsch (10.4 KB)
3.- One-shot-circuit-design-component.qsch (7.8 KB)
4.- One-shot-circuit-design-component-test.qsch (11.1 KB)
one-shot.qsym (917 Bytes)

Here is my take on the content of one-shot.qsym. There is a current source of 1 ampere and there is no initial value in the circuit node to which it is connected. This forces the user to use the UIC!
Some schemes do not want to start working with UIC.

I have tested the files without uic option and they are working fine too

1 Like

I apologize. I’m wrong, I didn’t pay attention to the bypass switch.

1 Like