1

I am building Arduino Due based project called MiniEngine v2 (an open-source motion control software for timelapse photography).

The project is not very active anymore but there are still all the documentation at github. Project owner had webshop where he sold MiniEngine shields for arduino but they are not available anymore. There was gerber files available at project github page so I orderer PCB's form seeed.com.

Project's Github page is at: https://github.com/airiclenz/miniEngine2

Everything seems to work ok but one of the buttons is not working. There is only 2 buttons and one rotary encoder.

I think the reason why the button is not working is that the output voltage for button from 74HC14N (hex smith trigger) is too low (I am not very good at electronic so I might be totally wrong.

I tried to measure values with voltage meter and here is the result what I got for those two buttons:

Here are the values in written format ( I took measurement from SN74HC14N )

  • btn_2 (pin9 input, pin8 output)
  • btn_1 (pin11 input, pin10 output)

SETTINGS BUTTON (btn_2) -> this one works fine

  • 1) button up - metering from input pin 11 => 3.26
  • 2) button down -metering from input pin 11 => 0
  • 3) button up - metering from output pin 10 => 0.6
  • 4) button down - metering from output pin 10 => 2.38

START/BACK BUTTON (btn_1) -> this one does not work

  • 1) button up - metering from input pin 9 => 3.26
  • 2) button down - metering from input pin 9 => 0
  • 3) button up - metering from output pin 8 => 1.43
  • 4) button down - metering from output pin 8 => 1.53

Here is how the buttons are initialized:

    void input_init() {

  // set pin modes
  pinMode(PIN_ROTARY_PRESS, INPUT);
  pinMode(PIN_KEY_1, INPUT);
  pinMode(PIN_KEY_2, INPUT);


  // attach interrupts for the keys
  attachInterrupt(PIN_ROTARY_PRESS, input_interrupt_keyRotary_press,  RISING);
  attachInterrupt(PIN_KEY_1,        input_interrupt_key1,             RISING);
  attachInterrupt(PIN_KEY_2,        input_interrupt_key2_press,       RISING); 

  // attach interrupts to both encoder pins for every state change
  attachInterrupt(PIN_ROTARY_A,     input_interrupt_rotary,           CHANGE);
  attachInterrupt(PIN_ROTARY_B,     input_interrupt_rotary,           CHANGE);


  // set the initial rotary values & configurations
  rotary.setPosition(0);
  rotary.setKeyMode(true);
  rotary_old_pos = 0;
}

And here is function for btn_1 press that is never called (except once in powering the shield/arduino due)

void input_interrupt_key1() {

  if ((key_1_time + DEF_INPUT_DEBOUNCE) < millis()) {

    key_1_time = millis();
    setBit(input_status, BIT_2);

  } 
}

I can only use 2 links in posts (I do not have 10 reputation) so you can find the code for inputs at Github (link above). (folder MiniEngine2/Software/miniEngine2/mE2_input.ino)

All code files are at Sotfware at folder: MiniEngine2/Software/miniEngine2

I have put Serial.println command in code and nothing is printed when btn_1 is pressed. When I plug power on then the btn_1 is triggered once...

Here is link to the the schematic for that shield ( it is quite big so that's why I did not embed the photo):

Schematic for shield is at Github folder : Hardware/miniE shield v2 revB BED board - schematic.pdf

Here is also link to the video where you can see how I took the measurements: https://youtu.be/wFR7P65qMGA

Please ask if I need to provide more information...

  • First thing to try - power the board without the arduino connected and verify that you see the same results. That would eliminate the possibility or an arduino or software related issue. My best guess is a soldering issue on the output pin or the connector to the arduino. A digital output pin that's stuck halfway between high and low normally means either a design fault or a short somewhere. – Andrew Jun 6 '17 at 15:29
  • I forgot to mention that I soldered two similar shields and both have the same problem. So I do not believe that it is soldering issue (but of course it still might be it). Now I try without arduino connected... – user1394520 Jun 6 '17 at 15:44
1

It was the Arduino Due issue. Arduino digital pin 43 was faulty or something. I managed to change 43 to 53 and now the button works...

  • 1
    You should accept this answer as the solution so that the question no longer shows up as open. – Andrew Jun 7 '17 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.