Random pin output on serial connect

edited May 2017 in Motherboard
Hi all,

I've implemented a variable intensity laser output in the firmware. I'm using a Due and an adapted RAMPS 1.4 board. I've disabled servos and hijacked pin D5 as a 26khz PWM output using the laser event system. However, on serial connect I get a brief high output on pin D5. I've disabled all of my code yet it is still present. Obviously, I don't want the laser firing every time I connect. Is there any reason this would be happening? I can't see anything else mapped to pin D5.

I plan to debug the connect sequence unless someone can shed some light on the problem before then.

This is the log output during the serial connect. The output is so brief I can't say when it happens, just that it happens during this sequence.

20:08:16.218 : Printer reset detected - initalizing
20:08:16.218 : start
20:08:16.218 : Info:PowerUp
20:08:16.222 : Free RAM:86556
20:08:16.394 : N1 M110*34
20:08:16.394 : N2 M115*36
20:08:16.394 : N3 M105*36
20:08:16.394 : N4 M114*35
20:08:16.397 : ok
20:08:16.397 : ok 2
20:08:16.413 : N5 M111 S6*98
20:08:16.414 : N6 T0*60
20:08:16.414 : N7 M20*22
20:08:16.414 : N8 M220 S100*105
20:08:16.414 : N9 M221 S100*105
20:08:16.414 : N10 M80*42
20:08:16.415 : N11 M105*23
20:08:16.415 : N12 M111 S6*84
20:08:16.415 : FIRMWARE_NAME:Repetier_0.92.9 FIRMWARE_URL:https://github.com/repetier/Repetier-Firmware/ PROTOCOL_VERSION:1.0 MACHINE_TYPE:Mendel EXTRUDER_COUNT:0 REPETIER_PROTOCOL:3
20:08:16.415 : PrinterMode:FFF
20:08:16.415 : ok 3
20:08:16.415 : ok 4
20:08:16.415 : N13 T0*8
20:08:16.418 : X:0.00 Y:0.00 Z:0.000 E:0.0000
20:08:16.418 : ok 5
20:08:16.422 : DebugLevel:6
20:08:16.422 : ok 6
20:08:16.422 : ok 7
20:08:16.422 : Unknown command:N7 M20
20:08:16.422 : ok 8
20:08:16.427 : SpeedMultiply:100
20:08:16.427 : ok 9
20:08:16.427 : FlowMultiply:100
20:08:16.427 : ok 10
20:08:16.430 : ok 11
20:08:16.430 : ok 12
20:08:16.430 : DebugLevel:6
20:08:16.430 : ok 13
20:08:17.425 : wait
20:08:18.425 : wait
20:08:19.428 : wait
20:08:19.453 : N14 M105*18
20:08:19.457 : ok 14
20:08:20.457 : wait

Thanks,
Stu

Comments

  • On connect firmware resets. So could it be that resetting the board causes the flash until the variable gets initialized by firmware? As a test remove usb and just press reset pin.
  • edited May 2017
    If that´s the case use a resistor to pulldown or pullup (depends on your laser driver)the pin that controls your Laser during initializing.
    Value of 10 KOhms usually works.
    This is just necessary as the Pin doesn´t "know" of being input or output and what state during initialize process.
  • Thanks. My next step was to add a pull-down as I could see it floating for a second before powering on. However, it does look very much like an output and not just a floating pin on my scope. I'll add a pull-down this evening and test the board reset and let you know.

    Thanks,

  • Yep, that's it. It's the board reset. A 10k pull-down brings the random output down to a tiny 0.3v blip which isn't enough to trigger the laser. 

    Thanks.
Sign In or Register to comment.