Can't set switch to limit mode

Home Forums TinyG TinyG Support Can't set switch to limit mode

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3822
    mkeeley
    Member

    Hi.
    I’ve just set up my v7 tinyG. Fantastic!
    I’ve flashed to the latest version 0.95.

    I have a “kill” switch that I want to connect to a-min to act as a kind of e-stop. I therefore tried to set a-min as a limit switch, but I can’t set $asn=2:

    tinyg [mm] ok>
    $asn=2
    [asn]  switch min                1 [0=off,1=homing,2=limit,3=limit+homing]
    tinyg [mm] err: Input value unsupported: $asn=2

    Is there some other setting I need to turn on? (My switches are all NO, $st=0)

    Cheers,
    Mike.

    #3823
    alden
    Member

    You may have discovered a bug in the validation code. Let me look at that.

    Alden

    #3824
    alden
    Member

    It was a bug. Try reflashing with build 370.04 from either master or edge

    Alden

    #3825
    alden
    Member

    I should add – be very very careful about noise if you are using limit switches. Noise creeping into the switch lines from a noisy spindle or a washing machine on the same circuit (for example) can cause spurious resets. This is something almost all projects wrestle with – tinyg or no.

    #3826
    JuKu
    Member

    > be very very careful about noise if you are using limit switches. 

    That problem is almost totally eliminated by normally closed switch configuration. In other words, the control line is short circuited to ground in normal situation; when the switch activates it opens and the line gets pulled up.

    #3827
    mkeeley
    Member

    Thanks Alden, that did the trick.

    One thing I noticed was that the verify fails after programming (using Studio6 + AVRISP mkII):

    10:53:37: [ERROR] Verifying Flash…Failed! address=0x17c00 expected=0x38 actual=0xff

    But the compile etc was all OK, and the tinyg seems to work! Maybe this is the bootloader address, and some bug in atmel studio?

    I usually use AStudi04 and avrdude, but I couldn’t seem to get avrdude working.

     

    And yes, I’m aware of the NO switch noise issue; I’ve built a micro-cnc out of old DVD and floppy drive innards http://tinypic.com/r/nofyw3/6 (insipration from hack-a-day: http://hackaday.com/2010/11/08/cnc-machine-from-pc-parts/) so I’m hoping it won’t be too much of an issue. Very low current.

    The limit/homing signal cable is shielded, the wires from the junction box to the switch was supposed to be shielded also (they are wires from an old headphone set), but it turns out they weren’t after I cut into them :-!

    I’ll make a full write up later.

    Mike.

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