# Pull down resistors for banana plug inputs to AIN

**URL:** <https://forum.midibox.org/t/pull-down-resistors-for-banana-plug-inputs-to-ain/19038>\
**Category:** MIDIfication\
**Created:** [May 4, 2015, 2:55am UTC](https://forum.midibox.org/t/pull-down-resistors-for-banana-plug-inputs-to-ain/19038 "2015-05-04T02:55:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![widdly](https://forum.midibox.org/letter_avatar_proxy/v4/letter/w/58f4c7/32.png) [@widdly](https://forum.midibox.org/u/widdly)\
**Post date:** [May 4, 2015, 2:55am UTC](https://forum.midibox.org/t/pull-down-resistors-for-banana-plug-inputs-to-ain/19038/1 "2015-05-04T02:55:53Z")

</div>

I am building a module that takes an analog CV and converts it to a midi message. &nbsp;I am connecting the CV via a 1K resistor to an AIN input with &nbsp;a diode clamp to protect against over/under voltage. &nbsp;

&nbsp;

I am using Banana cables so when no signal is connected the AIN inputs are floating and will produce randon results. &nbsp;My solution is to connect a 1M resistor to GND on each input. &nbsp;Is this the correct way of doing this? &nbsp;

&nbsp;

My other question is with regards to the schematic here… &nbsp;[http://www.ucapps.de/midibox\_ext/lfo/lfo\_schematic.pdf](http://www.ucapps.de/midibox_ext/lfo/lfo_schematic.pdf)

The diode clamp is using 1n4148 diodes so the PIC pin will get -0.7 to 5.7. &nbsp; But the datasheet quotes -0.3 to 5.3 as being safe. &nbsp;Is it ok to use 1n4148 with a PIC or would it be better to use a BAT48 or similar that would limit the voltage closer to the datasheet range?

---

<div class="post-metadata">

**Author:** ![latigid\_on](https://forum.midibox.org/user_avatar/forum.midibox.org/latigid_on/32/107_2.png) [@latigid\_on](https://forum.midibox.org/u/latigid_on)\
**Post date:** [May 4, 2015, 12:00pm UTC](https://forum.midibox.org/t/pull-down-resistors-for-banana-plug-inputs-to-ain/19038/2 "2015-05-04T12:00:01Z")

</div>

First thoughts:&nbsp;

The 1M resistor will create a voltage divider, I guess you chose 1M to minimise the effect of this.

Definitely go for Schottky-type diodes for clamping. You’re correct in that the reverse voltage will kill your IO otherwise.

&nbsp;

You might want to check this out:

&nbsp;

[http://discourse.midibox.org/t/topic/18525](http://discourse.midibox.org/t/topic/18525)

&nbsp;

It’s designed for an STM Core but could be easily adapted for PICs. The concept is to use a rail-to-rail opamp as a second inverting amp stage instead of diodes. There’s no chance that a higher voltage gets through unless it manages to raise/lower the power rails (unlikely in a modular setup). The design has input attenuators and switches/jumpers for selecting the voltage range (unipolar 0-5, 0-10 V or bipolar -5 to +5).

&nbsp;

I might have some spare boards available, currently I haven’t tested them due to other commitments. Let me know if you want some and I’ll look into it for you.
