# Best way to find threshold voltage levels

**URL:** <https://forum.opentap.io/t/best-way-to-find-threshold-voltage-levels/2351>\
**Category:** General\
**Created:** [February 10, 2025, 3:16pm UTC](https://forum.opentap.io/t/best-way-to-find-threshold-voltage-levels/2351 "2025-02-10T15:16:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert.lamoreaux](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@robert.lamoreaux](https://forum.opentap.io/u/robert.lamoreaux)\
**Post date:** [February 10, 2025, 3:16pm UTC](https://forum.opentap.io/t/best-way-to-find-threshold-voltage-levels/2351/1 "2025-02-10T15:16:33Z")

</div>

I need to find the threshold voltage when the DUT sees a signal changes between true and false on multiple inputs. I can use sweep to change the stimulus and read the signal from the DUT. Now I would like to save the voltage where the signals change so it doesn’t have to be postprocessed. I don’t want to waste time having a sweep loop for each of the inputs so I don’t want to have the sweep exit when a signal changes

I have thought about using mixins to save the previous state of the signal so I could have something to save the stimulus voltage if the previous signal is false and the current one is true. If there was a test step like the if verdict one but that evaluated an expression to true/false I could do it easily. Or if expressions had logic operators so I could do it.

I have considered modifying the If step, but I can’t find the source for it.

Has anyone found a way to do this or can give me advice?

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [February 12, 2025, 7:43am UTC](https://forum.opentap.io/t/best-way-to-find-threshold-voltage-levels/2351/2 "2025-02-12T07:43:27Z")

</div>

Hi @robert.lamoreaux,

Sounds like you are on the right track.

You can find all the basic steps with the OpenTAP source code: [opentap/BasicSteps at main · opentap/opentap · GitHub](https://github.com/opentap/opentap/tree/main/BasicSteps)

---

<div class="post-metadata">

**Author:** ![robert.lamoreaux](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@robert.lamoreaux](https://forum.opentap.io/u/robert.lamoreaux)\
**Post date:** [February 14, 2025, 7:09pm UTC](https://forum.opentap.io/t/best-way-to-find-threshold-voltage-levels/2351/3 "2025-02-14T19:09:56Z")

</div>

I spent an hour during a boring meeting and made an IfValue step in python since i had other things I created in Python, but now I am getting SQLite result errors from the Enum I used for selecting different comparison operators.
