Can't set switch to limit mode

From the original Synthetos forum (2011–2025)

Started by mkeeley on in TinyG Support. 5 replies, last activity Feb 28, 2013.

#

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.

Staff #

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

Alden

Staff #

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

Alden

Staff #

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.

#

> 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.

#

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.

This topic is from the original forum (February 2013). Your reply starts a new discussion linked to it.

Reply

Different problem? Ask a new question

Back to TinyG Support or latest activity.