Laser fired on machine power up (sometimes)

If you think you've found a bug post it here.

Laser fired on machine power up (sometimes)

Postby richardk » Sat Oct 07, 2023 5:02 pm

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.
profile.zip
(18.5 KiB) Downloaded 206 times
richardk
 
Posts: 12
Joined: Sat Oct 07, 2023 9:32 am

Re: Laser fired on machine power up (sometimes)

Postby ger21 » Sat Oct 07, 2023 6:10 pm

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.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: Laser fired on machine power up (sometimes)

Postby richardk » Mon Oct 09, 2023 10:04 am

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?
richardk
 
Posts: 12
Joined: Sat Oct 07, 2023 9:32 am

Re: Laser fired on machine power up (sometimes)

Postby danut1234 » Mon Oct 30, 2023 7:14 am

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...?
danut1234
 
Posts: 40
Joined: Thu Aug 25, 2022 9:26 am

Re: Laser fired on machine power up (sometimes)

Postby cncdrive » Wed Nov 01, 2023 2:12 am

AXBB-E outputs are on low level on power up until the pins are configured when the UCCNC software is loaded.
cncdrive
Site Admin
 
Posts: 4901
Joined: Tue Aug 12, 2014 11:17 pm

Re: Laser fired on machine power up (sometimes)

Postby richardk » Mon Nov 06, 2023 8:21 am

OK, and what is state of outputs of UC400ETH after power ON?
richardk
 
Posts: 12
Joined: Sat Oct 07, 2023 9:32 am

Re: Laser fired on machine power up (sometimes)

Postby dezsoe » Mon Nov 06, 2023 10:11 am

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.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Laser fired on machine power up (sometimes)

Postby richardk » Mon Nov 06, 2023 12:40 pm

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 :-)
richardk
 
Posts: 12
Joined: Sat Oct 07, 2023 9:32 am

Re: Laser fired on machine power up (sometimes)

Postby dezsoe » Mon Nov 06, 2023 3:00 pm

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.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: Laser fired on machine power up (sometimes)

Postby richardk » Mon Nov 06, 2023 10:43 pm

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.
richardk
 
Posts: 12
Joined: Sat Oct 07, 2023 9:32 am


Return to Report a bug

Who is online

Users browsing this forum: No registered users and 6 guests