Working on upgrading my X-Carve to a TinyG G2 setup.

Working on upgrading my X-Carve to a TinyG G2 setup. Created a board to go between the Due and the grblshield to make wiring all the switches much easier.

If you want one, you can order one from the link below, however, I just ordered mine and have not tested it yet! I will be documenting the complete build and upgrade soon, and will post it again here.


@Alden_Hart @Riley_Porter_ril3y this is hot!

ArduinoDue input pins can accept 3.3V only, 5V will fry the board. I think this is better not to keep 5V pins on the Breakout Board.

You should include debounce circuits into the switch inputs!

The motivation behind the 5V was not specifically for inputs, but more for general use for any external need. But adding 3.3v for NC circuits could be useful.

As for debounce circuits, none of the docs reference this nor does the original x-carve grbl wiring. I don’t see why having a circuit board vs manual wiring would create the need to add debounce circuitry?

This is awesome!!

Check out the G2 docs here:

For Due G2 you will want a debounce circuit on each of your switch inputs to avoid any issues with stability on probing etc. Doing it on this little adapter PCBs will make wiring up the switches far far easier for everyone.

Why not do debounce in the firmware? Rather than hardware?

Its a lot less reliable, and at the moment there’s an open bug in the G2 code for this.

I think they’re working on it, but it could be some time, and its a pretty simple circuit to add, check out the comments on that thread by ewidance for a simple implementation.

I like the breakout board idea a lot, but I would highly recommend not to place 5V here. This is simply to avoid a mistake of accidental use of the ‘onboard’ available voltage. On the other hand first fried board and lesson learned :wink:

Debouncing circuitry is a great idea.

Ok, I read over the switch inputs page @Ben_Delarre mentioned and I think its a great idea. I also will remove 5V as I see how this could be mistaken for NC switches.

Speaking of NC switches, I have never implemented them on my machines. Does the same circuit apply that is hand drawn at but just connecting IN to +3.3v instead of gnd? Or does the resistor/cap go in different places in that case?

I think I posted NC wiring together with the TinyG2 issue #126, mentioned above by @Ben_Delarre ​. Basically the NC switch goes between input and GND, once closed input is connected to GND (which is normal operation). When the switch gets hit it goes open and input goes HIGH (VCC=3.3V on ArduinoDue). A resistor is needed between input and VCC, I think I use something between 0.5 - 1kOhm.

In TinyG2 naming nomenclature the input where NC switch is connected has to be configured as ACTIVE_HIGH.

Love the idea.

We threw around a similar one a while back for a shield that would support 2 grbl shields. The threads have gone dead since but maybe you could collaborate with Anthony Webb and Jimmy Hardman, I would love to help but I an not a hardware guy.

The though was to try to get it around the 50$ price point, that way when you add the 2 gShields you would have 6 axis for just over the price of the TinyG. Only want 3 axis just don’t add the second gShield.

The board had denounced inputs and some higher current outputs. Anthony was waiting for the G2 general purpose I/O software support to finalize the design.

I threw out adding an EEProm so we do not need the ChiliPeppr initialization script and/or the need to recompile firmware for your machine settings.

The threads are here!topic/openpnp/a-JxAW-xbwM!topic/chilipeppr/A702WpQ2yR0

Very cool. There is software debouncing in g2 but you want HW as well. The circuit we use on the v9 is an RC pair. 2.7K to the 3.3v rail and .47uF to the ground rail. The switch comes in to that junction. We also use a surge protector (ESD) part, such as the PESD3V3L2BT,215 to protect against static discharge. Nice work.

I really like the 74HC14 for the denouncing circuit as I believe using that chip let’s you debounce easily for either NC or NO switches which I’m guessing for a breakout board like this would be really desirable since users might wire either way.

The inputs to the SAM3 processor are basically the equivalent of the 72HC14, although the 74’ part does provide some additional buffering. But that’s why I use the ESD protection.

The debounce circuit on the v9 works for both NO and NC switches.

Ah cool I did not know that. Alden I might have to hit you up about the debounce sometime, I’m still having issues probing on my v9.

We have a fix in for the bounce issue. We are waiting to do a major edge push that fixes that and has a lot of other things as well. Probably over this weekend. We just need final review.