# Output Limiter on the PID controller?

**URL:** <https://forum.liquidinstruments.com/t/output-limiter-on-the-pid-controller/569>\
**Category:** New Features, Requests, and Feedback\
**Created:** [August 30, 2022, 3:12pm UTC](https://forum.liquidinstruments.com/t/output-limiter-on-the-pid-controller/569 "2022-08-30T15:12:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azercoco](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@Azercoco](https://forum.liquidinstruments.com/u/Azercoco)\
**Post date:** [August 30, 2022, 3:12pm UTC](https://forum.liquidinstruments.com/t/output-limiter-on-the-pid-controller/569/1 "2022-08-30T15:12:53Z")

</div>

Hi there!

Is it possible to add an output limiter to the PID controller instrument like the one present in the Laser Lock Box ? I’m using it in a situation where negative tension could damage the instrument receiving the control signal. Curently, I need to manually clamp the signal using an external circuit.

Best,

Corentin

---

<div class="post-metadata">

**Author:** ![NandiW](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/nandiw/32/238_2.png) [@NandiW](https://forum.liquidinstruments.com/u/NandiW)\
**Post date:** [August 31, 2022, 6:57am UTC](https://forum.liquidinstruments.com/t/output-limiter-on-the-pid-controller/569/2 "2022-08-31T06:57:54Z")

</div>

Hi Azercoco,

We unfortunately do not have a built-in voltage limiter with PID controller at the moment. However, if you have access to [Multi-instrument Mode](https://www.liquidinstruments.com/multi-instrument-mode/) and [Moku Cloud Compile](https://www.liquidinstruments.com/moku-cloud-compile/) on your Moku, you can build a custom instrument for implementation on Moku:Go or Moku:Pro.

In [this blog post](https://www.liquidinstruments.com/blog/2022/08/12/building-custom-instruments-and-real-time-processing-on-mokugo/), you can find the Cloud Compiled voltage limiter in the second example, which should be sufficient for your application. The upper and lower voltage limits of each channel are set by two control registers. The VHDL code can be found [here](https://gitlab.com/liquidinstruments/cloud-compile/examples/-/tree/new-examples/voltage_limiter), you will just need to copy the code into a Cloud Compile project and compile for your Moku. The main thing to watch out for is that there is a conversion from bits to voltage when the signal is converted from a digital signal to the output analog signal. You can find the conversion summary table below.

| Source/Sink | Moku:Go bits/volt | Moku:Pro bits/volt |
| --- | --- | --- |
| ADC | 409.4 | 2270.02 |
| DAC (50R) | - | 29925.0 |
| DAC (High-Z) | 6550.4 | 14962.5 |
| Inter-instrument | 13100.8 | 29925.0 |

If you have not used Moku Cloud Compile before, you can sign up for a free trial on our [website](https://compile.liquidinstruments.com/) and you can follow this [getting started guide](https://download.liquidinstruments.com/documentation/guide/software/moku-cloud-compile/Moku-Cloud-Compile-Getting-Started.pdf?hsCtaTracking=c053fea1-786d-4d73-b21a-d2aed804a645%7C697c6f6b-38b0-40b8-b826-7a464ffdc357) to compile the project.

Please do not hesitate to contact us at [support@liquidsintruments.com](mailto:support@liquidsintruments.com) if you have any questions or encounter any problems.

Kind regards,  
Nandi

---

<div class="post-metadata">

**Author:** ![venusjin](https://avatars.discourse-cdn.com/v4/letter/v/d6d6ee/32.png) [@venusjin](https://forum.liquidinstruments.com/u/venusjin)\
**Post date:** [April 13, 2023, 1:52pm UTC](https://forum.liquidinstruments.com/t/output-limiter-on-the-pid-controller/569/3 "2023-04-13T13:52:19Z")

</div>

The blog and VHDL code links are failed. Could you send me a new link?

---

<div class="post-metadata">

**Author:** ![Sam.Speece](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/sam.speece/32/191_2.png) [@Sam.Speece](https://forum.liquidinstruments.com/u/Sam.Speece)\
**Post date:** [April 13, 2023, 9:17pm UTC](https://forum.liquidinstruments.com/t/output-limiter-on-the-pid-controller/569/4 "2023-04-13T21:17:36Z")

</div>

Venusjin, I have sent you new links in your other post, but I will copy them here for anyone else looking for a voltage limiter to use with their Moku:Go.

[Output voltage limiter - MCC](https://gitlab.com/liquidinstruments/cloud-compile/examples/-/tree/main/voltage_limiter)  
[MCC documentation](https://compile.liquidinstruments.com/?code=EZvKIN1RGe6uj_KIBJOezb17H6_n8N9o8zdaNTDQoL5E-&state=YmxQdklpZmgyT3o3eEhzb3gtVFcxLVhMZUp5bGthcVFPdEpqb3AxNVg4QQ%3D%3D#/docs/intro)
