Page 1 of 1
Laser fired on machine power up (sometimes)
Posted:
Sat Oct 07, 2023 5:02 pm
by richardk
I am not sure if this is a firmware bug or a hardware problem. I have UC400ETH and classic Chinese BOBs. The relay on BOB switches 12V power for the laser plus I am using laser PWM pin. Sometimes the laser is on full power on power up! It seems to have a random matter. My question: is state of outputs of UC400ETH guaranteed somehow immediately after power ON? Plus here is the problem that electronics needs to be switched ON prior the software is started so the problem is not solvable by switching the electronics after the software is up. The only reliable solution for me at the moment seems to be disconnect the laser before powering ON. Or am I doing something wrong? Thank you.
Re: Laser fired on machine power up (sometimes)
Posted:
Sat Oct 07, 2023 6:10 pm
by ger21
Plus here is the problem that electronics needs to be switched ON prior the software is started so the problem is not solvable by switching the electronics after the software is up.
Only the UC400 needs to be powered up first. Everything else should be powered up after UCCNC is running.
Re: Laser fired on machine power up (sometimes)
Posted:
Mon Oct 09, 2023 10:04 am
by richardk
ger21 wrote:Only the UC400 needs to be powered up first. Everything else should be powered up after UCCNC is running.
Thank you for the info. Knowing that before, I would probably go for another hardware. Isn't any possibility to change that? Plus maybe make "reconnect" possibility (when HW is switched OFF and ON, it would be helpful if software is able to reconnect again)
Back to my original question: is state of outputs of UC400 guaranteed after startup? Or are they in HiZ (floating) state so I would need to add some pullup/pulldown rezistors for critical ones?
Re: Laser fired on machine power up (sometimes)
Posted:
Mon Oct 30, 2023 7:14 am
by danut1234
I am also waiting for the answer regarding the state of the pins because i have AXBB and it does the same thing on random occasions, it starts the milling motor at power up, and after the software is connected to the board, it automatically turn off the motor. Maybe the pin is in an undefined state...random state...?
Re: Laser fired on machine power up (sometimes)
Posted:
Wed Nov 01, 2023 2:12 am
by cncdrive
AXBB-E outputs are on low level on power up until the pins are configured when the UCCNC software is loaded.
Re: Laser fired on machine power up (sometimes)
Posted:
Mon Nov 06, 2023 8:21 am
by richardk
OK, and what is state of outputs of UC400ETH after power ON?
Re: Laser fired on machine power up (sometimes)
Posted:
Mon Nov 06, 2023 10:11 am
by dezsoe
Some background information about microcontrollers (MCUs). When you power up a MCU all the pins are set to high impedance input mode to prevent any conflict. When the power gets stable the program on the MCU starts and sets the pins as it wants, in the UC400 all outputs to low level (off). This takes a little time, in the range of milliseconds. Because how TTL ICs work the high impedance mode looks like the pin is high (on), so when you power up the UC400 you can see a very short flash if you have LEDs on the outputs, but it will not stay high after some milliseconds. A problem could happen if you have any output that is active low, because those outputs will be turned on until UCCNC is loaded which will set the pins to the required state, but all your important outputs are active high. So, there must be some other problem, that I can't find out now.
Re: Laser fired on machine power up (sometimes)
Posted:
Mon Nov 06, 2023 12:40 pm
by richardk
Hi Dezsoe,
Thanks much, yes, I am a C/C++ developer and have also background on many embedded project and electronics. I understand and agree what you wrote. However this is not my case. This is not a short flash but laser ON till I unplug the cable or UCCNC software starts. And it seems to have a random matter. BTW is there some specific reason the UCCNC needs to be started after UC400 is alive? It would vote for a change if possible
Re: Laser fired on machine power up (sometimes)
Posted:
Mon Nov 06, 2023 3:00 pm
by dezsoe
The motion controllers can't find out the configuration. UCCNC (or Mach3) must start up and set it. As always, I recommend using a charge pump circuit to enable anything connected to the motion controller only when the PC side is up and running. The UC400 always starts with the outputs turned off.
After some thinking there may be an issue. I've never seen this using other than UC100, but it may be the problem. If the break out board gives a high level output to one or more of the inputs on the UC400 then it may start up incorrectly. (It gives parasitic power to the UC400.) You can test this by disconnecting the ribbon cable while you power on and connect it back only a second later (when the UC400 booted). If it always start normally with disconnected cable then you'll need to power up the break out board after the UC400.
Re: Laser fired on machine power up (sometimes)
Posted:
Mon Nov 06, 2023 10:43 pm
by richardk
Those cheap BOBs have 5 inputs with NPN optocouplers and 10k pull up resistors. I have 2 BOBS so impedance on all UC400 inputs to 5V power supply is about 1kohm. Could this create that problem? I use 5V from UC400 to supply BOBs so they are on common power supply thus this problem (a parasitic weak supply of UCCNC through those pull ups) should not happen I think. In each case I will try your advice as soon as I will have laser hooked.