New shield/generic daughter card project

Hello!

I’ve been using GRBL and following the HAL/ARM ports and also testing g2core in the meantime. That means that I am constantly changing the MCU that I want to use. So I had this idea to make a generic shield that includes all the goodies that we need for a CNC machine. I finished what I think is a first version of the PCB, but would love suggestions and some fresh eyes on the circuits/values :slight_smile:

You can see the project here: Cadlab and check the code on Github

It’s under Creative Commons, too.

2 Likes

Hi Jose,
I dont think a passive level shifter could drive a relay.
You shoud better use N MOS transistor.
Regards,
Fbd38

Looking at the README and the schematic, it looks to me like they are n-MOSFET switched:

All calculations were made considering a 3.3V output from the driving MCU pins, while keeping the output currents under 10 mA, what should be safe for most of the MCUs around.

The 3904s driving the relays have a base current (Ib) of ~ 7.8 mA, that should be enough to saturate the transistor and provide the 78 mA needed by the relay coil.

I see that all the relays I find are n-MOSFET switched with dual-n-MOSFET NTJD5121N packages, and are properly protected with diodes.

@Fbd38 did I miss a passive level shifter somewhere? If so, which sheet?

You are right, they are N MOS. forget about my previous post. It should work fine. Apologies.

1 Like

@Fbd38 I changed the relay controls to use mosfets a couple of versions ago.

@mcdanlj I forgot to update the README, I am not using the 3904 anymore, everything is just using N-Mosfets (as you saw/mentioned). I was before, but decided to just use the same N-Mosfets everywhere for simplicity.

I am considering removing all the 5V dependencies. The only things that are specifically 5V only are the relay. I think with the 12V external power I can use it on the opto-isolators for switches (I have to check the datasheet but should be fine) and for the external drivers I can use a 1K current limiter and a 12V control signal (at least the DM542 and the TB6600 allow that).

12V on the limit switches would help with EMF ‘hardiness’ too, as I read somewhere.

I’m not at my computer at the moment to check, but did you de-bounce the limit switch inputs?

Thought about using schmitts on the inputs, but GRBL and g2core include debouncing code on the firmware, so it wasn’t in high priority in my list. Should I?

I noticed that the boards that Bart Dring created for Grbl_Esp32 have all switches (limit switches and otherwise) debounced with small 100Ω 100nF RC filters. That’s with Grbl (ported to ESP32) so it mattered for someone. (I don’t think you need a schmitt trigger.)

I’d suggest considering footprints at least for the resistor and capacitor; a user could use a 0Ω resistor or jumper and omit the capacitor if they don’t want debouncing, but could add them where they do.

Definitely worth reading his schematic for what has worked for him with a 3.3V controller. He is using a logic level shifter for PWM spindle control. I know you are breaking out a voltage level driven by an amp; if you also want a PWM option you could consider a level shifter for it. Or just footprints so someone could drop a common level shifter onto it if they want. A bunch of controllers have their own PWM→V converter built in anyway…

I’ve done several board designs I’ve never actually brought to life, and I don’t know any particular reason I’ll make this one, so I’m just throwing ideas around. No obligation implied. :slight_smile:

1 Like