Hi,
I am using both interrupts on a 3.3v pro mini. I have the mode set to 'INPUT_PULLUP'. The diodes are switching between 12v to ground and floating to ground vice versa. When I connect one of the pins to ground, I have found that one interrupt triggers the other interrupt although it has not changed state and sometimes also random triggers. This is using a 1n4148 diode connected directly to D2 and to D3.
I have tried a voltage divider of 10k and 3.3k, but this will not provide the correct voltage when the input is floating (logic level). Is there a different way of achieving the above? or how can I remove the spurious signals picked up by the diodes ?
If an input is floating, that's an issue you have to fix. If you have a voltage divider, then it is definitely
not floating.
Your post is hard to understand. "The diodes" - which diodes? What is your circuit, where are the diodes,
etc etc - we can't guess such details you have to provide them.
Hi,
Sorry for the confusing post.
I have a 1n4148 diode connected to both inputs d2 and d3, which are set up as interrupts, mode input_pullup
I have connected a wire to each of the diodes which then is used to trigger the interrupts.
I am trying to get the interrupts to operate when the input goes from 12v to 0v and 3.3v to 0v and vice versa. I say 12v and 3.3v (pull-up voltage) as the wire may or may not be connected to a battery when used, but to get the interrupts to work I need a change in logic level.
When using the diodes, I am getting issues with random interrupts even when the interrupts have not been triggered, also one interrupt triggering the 2ND.
I have also tried resolving this with a voltage divider network, but it would not operate correctly due to the logic level requirements of the arduino. Eg trying to maintain a high enough voltage when the wire to one of the interrupts is not connected to a battery for correct logic level ( using input_pull-up) interrupt triggered from 3.3v to 0v.
I will add an image as soon as I get a chance.
Thanks
Dan