Attempting to control with an arduino, Now Nothing

Home Forums TinyG TinyG Support Attempting to control with an arduino, Now Nothing

Tagged: , ,

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #6859
    bryceflug
    Member

    I have been testing out the tinyg v8 all week(loving the acceleration profile). I have been successfully controlling it with coolterm, tgfx and chilipeppr. For the my specific application I am going to need to pass code to it through an Arduino Due. I have yet to successfully issue a move command to it through the RX and TX port (RX-TX,Tx-RX,GRD-GRD).

    In my attempts I have lost control of it with coolterm. The last thing I did was set flow control to 0. Then attempt to send “g91 g0 x20 CR” from my Arduino.

    Now the board does not respond to any commands, the tx does light up when Im sending commands from coolterm though. Another thing Ive noticed is the PWM light no longer lights us on reset.

    Things I have tried:
    Reset board multiple times
    Disconnect and reconnect from external 24V
    Unplug and move around USB Cable multiple times
    Tried sending $defa=1 from multiple programs.
    tgFX doesnt connect anymore.

    Is there something that I could try in order to regain control to the tinyg.

    Thanks,
    Bryce

    #6860
    cmcgrath5035
    Moderator

    Have a quick look at this item

    Due is 3.3V or 5V TX RX? If 3.3V, you might have to do some level shifter adjustments.

    But, not being able to boot, or I presume run via USB sort of implies more dramatic events. Do you still see good 3.3V on board? The tinyG Schematics are HERE:

    Poke around a bit (carefully) with a DVM. My 50% gut thinks you likely fried tinyG, “When the lights aren’t on, nobody’s home…” Maybe U7 (3.3V regulator) has died?

    You might also want to peruse the G2 Wiki, perhaps that approach will better match what you want to achieve?

    #6861
    bryceflug
    Member

    Thanks for the quick response!

    So I poked around as you said and still see a good 3.3 everywhere. The power led still lights up and the spindle direction still blinks on start up, just not the pwm pin. The Tx still appears to receive the signal as well (blinks) just doesn’t do anything.

    As far as the Arduino Due is concerned your right that it is 3.3V, I can use a level shift to bring it up to 5V if that is the case.

    #6862
    cmcgrath5035
    Moderator

    I don’t have any other great debug ideas. Perhaps Alden will.

    Do you have a Atmel programmer?
    You could try re flashing tinyG, to see if that function works.
    There no obvious reason that should help in this case, but if the re flash does not verify, that might be another indicator of failure.

    You could level shift the Due to 5V, or you could fiddle with the tinyG level shifting resistors per post 6801.

    BTW, should you get up and running again, I would expect XonXoff flow control to work with the serial interface. Running with no flow control likely not good for Gcode runs.

    Good hunting

    #6863
    bryceflug
    Member

    Thanks for the help, Unfortunately I don’t have an Atmel programmer but I guess I should look into getting one.

    Thanks,

    Bryce

    #6864
    cmcgrath5035
    Moderator

    Programmer – that is really up to you.
    Boot Loaders get the job done, when the base platform works….

    If you are into creative thinking on Atmel based platforms, then maybe a good idea,

    It appears to me you might be into some creative platform coding; then debugging is likely in your future.

    Disclaimer: I have not used this debugging platform, have no idea how “essential” it might be.

    #6867
    JuKu
    Member

    I’m not quite clear what you are trying to do, but in general: If you are doing programming on Atmel, a JTAG debugger/programmer is essential. Like, if your time is worth $0.50/h, it is still worth it.

    #6870
    chmr
    Member

    As long as the bootloader is still functional (blinking spindle-dir led), you should try a firmware-update via USB. That also tests the hardware of the serial port.

    #6872
    alden
    Member

    It sounds like the boot loader is working but the main program is not starting. You should reflash with the current Edge (438.02). The wiki explains how.

    If you are going to program with an outboard programmer at this point we recommend the Atmel-ICE. The basic kit ($55) is all you need. THis gives real-time debugging in Atmel Studio 6.2.

    Lastly, you should not need a level converter to use the Due serial. But please confirm serial operation. Carl pointed out the Espruino thread earlier. Please refer to this if you have serial signal level issues.

    • This reply was modified 9 years, 11 months ago by alden.
    #6880
    bryceflug
    Member

    I appreciate all the advice,
    It would be great to implement this motion controller into our products and designing an easy system for calibration and talking to it through a microcontroller should help accomplish all of our needs. Furthermore this community seems to be full of people willing to help which is great to see.

    I will try and get it functional with a firmware update and post the results.
    Thanks

    #6881
    bryceflug
    Member

    I able to get it back up and running. I was not able to get it to load for the longest time but then I found an forum post stating that version 6 of avrdude doesn’t seem to work. Once I switched to 5.11 things worked fine.

    Yes I am using Serial operation from the due which outputs 3.3V. Even with a level shift I seem to have difficulty getting the RX or TX light to even flash let alone a move command. Would anyone have an example of a move command that could be serial printed to the tinyG that should work?

    Thanks,

    Bryce

    #6886
    cmcgrath5035
    Moderator

    bryce
    Reread

    Did you remove the voltage divider resistors as Alden suggests?
    Needless to say, you need a fine tip soldering iron and care.
    If you don’t want to muck with your tinyG, then build a 3.3v to 5v level shifter for the the Due to tinyG interface

    The movement command from Due to tinyG should be the same one you send from Coolterm. You should see on the schematic that the TX and RX leads on tinyG are connected to the outputs of the USB to serial device – a “wired OR”.

    Perhaps you should describe to us how you send commands via the Due. Are you connected to a console app on the Due? Don’t assume we know much about the Due platform code.

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