Another firmware flash required

Home Forums TinyG TinyG Support Another firmware flash required

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #4237
    Edward
    Member

    Chaps,

    Just a quick note to say that the shapeoko ran pretty well all day yesterday at the science show I attended, but this morning I fired up the TinyG controller to find that the power light was on and I have the boot loaded flashes but it did not go into the usual steady Spindle PWM LED state. No comms appeared possible, although I could see responses on the USB port to serial commands at least. Resets made no difference. Reflash of the firmware has now resolved the problem.

    I have noticed that turning the motors (if the head moves about while I’m moving the machine) can cause enough power to momentarily light the power and other LEDs on the board – is it possible that this erratic feedback might be causing corruption? In both cases where I have had to reflash the firmware I have physically moved the machine.

    Just a thought, but I guessed I should report the problem in any case.

    Cheers

    E

    #4238
    alden
    Member

    Edward,

    Are you disconnecting the board using the Estop? I’m wondering if transients on the DC power line are killing the board. Also, if so, was the board running when it was stopped, or was it idle?

    Let’s see if we can get to root cause on this. Do you have 2 boards? Is the behaviour the same on both? If it’s a transient problem perhaps it would be useful to experiment with a capacitor across the Estop.

    BTW: Turning the motors will cause the green LEDs to flash due to the back-EMF from the motors – this is normal and should not be an issue.

    –Alden

    #4239
    Edward
    Member

    Hi Alden,

    The board is disconnected using the Estop (and indeed no power supply is even plugged in), but I have this simply breaking the +ve input lead from the supply, as per the shapeoko instructions for the Arduino + Grbl, so I’m not sure that this can have any role in the back EMF issue from the motors?

    Just to clarify – moving the machine head manually in this configuration lights the motor LEDs, as you would say above, but *also*, briefly, the blue power LED and Spindle CW/CCW LED (normally associated with the boot loader sequence).

    In the process of checking this statement, the firmware seems to have gone again (boot sequence flashes no longer complete). I’ll reflash the board now and do the same steps in a more methodical way, then I’ll swap over boards to check that I can reproduce on more than one card. I will report back in due course.

    Cheers

    E

    #4241
    Edward
    Member

    Yep – I’m near certain that this is the cause of the issue and I can reliably (but with variable amounts of movement) reproduce it on at least two boards.

    I’m in an unusual situation of lugging my machine around with me quite a bit recently, so that is probably why I have seen it fairly frequently. Isolating the motors from the board electronically would be a bit awkward to implement, but now I am confident of the source of the problem I will be able to take care to mechanically ‘lock’ the machine in place when I move it to prevent the problem from now on. I hope this feedback (no pun intended) is useful 😉

    Cheers

    E

    #4242
    alden
    Member

    Edward,

    Thanks for the diagnosis. I can also see the blue lights and USB LEDs flash if I move a motor.

    Question: In this situation do you normally have the power supply connected or disconnected? (Whether or not it’s actually turned on).

    I also have to ask – is the Estop switch in line with the positive DC voltage (+24volts), or does it break the ground and leave the positive line connected?

    I am able to get the blue lights and startup USB LEDs to light as well, but my board survives this and has not lost flash.

    One last question – can you read me the chip number off the MCU? It’s going to be either ATXMEGA192A3 or ATXMEGA192A3U

    Thanks for the help

    –Alden

    #4243
    Edward
    Member

    Hi Alden,

    – I believe that I can reproduce the issue whether the power supply is connector or not, but the initial occurrences were both after I had physically moved the machine, so power supply definitely disconnected.

    – EStop breaks the +24v. I understood from the shapeoko forum that, with the arduino & Grbl at least, breaking the -ve could allow power back through the USB line? Please see this link for a diagram my wiring set-up.

    – By ‘variable amounts of movement’ in my earlier post, I meant that it might take a dozen or more physical moves of various speeds to trigger the flash loss. It is not instant or entirely predictable, but, even if it takes a couple of minutes, I believe can reliably cause the problem. Regarding your first question, the power supply was connected but Estop down during my tests of this from yesterday.

    – Chip is: ATXMEGA192A3

    Let me know if you need anything else,

    E

    • This reply was modified 11 years, 4 months ago by Edward.
    #4245
    alden
    Member

    Edward, Thanks for the note and the diagnosis. I actually drew that crude picture on the Shapeoko forum to advise people to disconnect the power and not the ground.

    I will try to reproduce your issue with the good instructions you have provided.

    –Alden

    #4246
    Riley
    Keymaster

    Edward,

    I think I found a fix for this. Turns our the brown out detection was not enabled in the fuses. I have attached a picture of what I set my fuses to in Avrstudio 4. I have not been able to “break the flash” again since I set my fuses. Before I set them, I could replicate your issue with ease. Give this a try and see if you can break it again. I have not been able to as of yet.

    http://www.flickr.com/photos/rileyporter/9167890590/ Check out that pic.

    Riley

    #4249
    LTMNO
    Member

    Riley, the funny thing is that interestingly enough that I was also playing with the led lights with movement prior to testing out my board and my boot-loader was corrupted too. (Hence you sent me a new one)

    Currently I did try again not knowing what I was doing/damaging and the reset button doesn’t work anymore on the board for resetting the system. The only way I can get the board to boot again is to turn on the power and enable it again. If I hit reset, the board goes blank, Blue light on and not Red Spindle lights return or flash.

    I am not 100% sure that this is related but suspiciously coincidental.

    I don’t have the AVRISP MKII programmer, is that the only way to flash the TinyG. I do have AVR programmer for my Atmega328’s

    #4261
    Riley
    Keymaster

    This sounds like you do not have a valid download of the tinyg.hex file. Try this.

    TinyG Hex

    Right click save as on that link. Then try flashing that.

    #4262
    LTMNO
    Member

    Hi Riley, do I program this with the FTDI? or my avr programmer?

    #4264
    LTMNO
    Member

    Hi Riley, I might be confusing the matter here…
    I never flashed anything…. or did any programming of my TinyG.
    I was referring to, when the TinyG is connected to the ShapeOko and you move the x,y,z around, the LEDs on the TinyG light up. An earlier post suggested that might have corrupted the EEPROM or something. That being said, I was mentioning that is what I did and perhaps, that is what Bricked, or damaged my other board. WIth this board, i have it working for the most part.

    SYMPTOMS,
    If I turn the board on, it works and I can send it commands.
    What doesn’t work, is that If I send a CTRL X command it will not reset the board.
    If I hit the reset button, it will no reset the board. The only way to achieve that is to cut the power and turn on the power again.

    I thought that perhaps from moving the x,y,z around and seeing the pretty LEDs light up might have caused a problem somewhere that has done this.

    That being said, I have a AVR USBASP programmer. I can use it to program the board along with a FTDI Adapter. I don’t have the AVRISP. I was asking if I should program the TinyG.Hex file to the board to fix this reset issue. But more importantly, will those programmers work to flash the board?

    The board does boot up when turned on.

    Hope that clears up any confusion.

    Thx

    Pino

    #4267
    Riley
    Keymaster

    LTMNO,

    This is what I get for replying to posts at 1am. That reply was meant for a completely different topic!

    What firmware version do you have? Can you paste what comes back at startup? Also, you will need an AVRISP MKII to re-program your tinyg. Does your board start blinking when you power it on? If it does that means you are in bootloader mode.

    If you can get into bootloader mode I suggest you try flashing the tinyg.hex and see if this clears your issues up.

    #4270
    LTMNO
    Member

    Hi Riley, I was able to time this right and capture this msg.

    {“r”:{“fb”:375.01,”fv”:0.950,”hv”:0,”id”:”9H3583-QTW”,”msg”:”Loading configs from EEPROM”,”f”:[1,15,0,693]}}
    {“r”:{“fb”:375.01,”fv”:0.950,”hv”:7,”id”:”9H3583-QTW”,”msg”:”SYSTEM READY”,”f”:[1,0,0,6403]}}
    tinyg [mm] ok>
    line:0,posx:0.000,posy:0.000,posz:0.000,posa:0.000,feed:0.000,vel:0.000,unit:1,coor:1,dist:0,frmo:0,momo:4,stat:1

    I am able to hit the “control X” and duplicate the above msg…. but the reset button doesn’t seem to do anything. What happens is that the red light goes off.

    Video 1 – http://www.youtube.com/watch?v=D7-BFsCuxl8
    This is what happens on Power On (p.s. dubbed out sound as the phone rang)

    Video 2 – http://www.youtube.com/watch?v=R9EOR-Rz34k
    This is what happens on Reset Button Attempt

    #4277
    Riley
    Keymaster

    Cool thanks for the video. Ok so it looks like you still have the ability to on “power on” enter the “bootloader update mode” which is when the red led is flashing a pon power up. Have you tried getting your avrdude command to update your firmware all queued up (read just ready to hit enter button) power on the board then hit enter while the lights are flashing?

    Here are the instructions for doing so:
    https://github.com/synthetos/TinyG/wiki/TinyG-Boot-Loader#wiki-updating

    Just to be clear all you need to do this is your USB cabled hooked up to your tinyg like normal. Then using avrdude you should be able to re-flash the tinyg firmware (not bootloader).

    See what happens when you try that.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.