Saturday, November 30, 2019

DIY GRBL 0.9+ board for Arduino Nano

I made a small laser cutter recently. This should be driven with an arduino nano. There are on eBay and other shops a "CNC Shield Version 4.0 Board". Hopefully I ordered several of these boards right away. But then came the bad surprise. All of these boards had errors and wrong connections. Without major alterations they were not up and running. That's why I've developed my own board for the Arduino Nano.



The designation of the connectors is grbl 0.9+ compatible. My board contains some more features. It is a buck regulator (MP1589) included, which ensures the power supply up to 24V input voltage. Thus, the stepper drivers can also be operated with this higher voltage, which may be useful in some circumstances. The diameter of the conductor tracks for the stepper drivers is sufficiently large, so that even higher currents can be used. In addition, the strong buck regulator also enables the supply of additional 5V consumers, such as sensors. The buck regulator and therefore the 5V technology is protected against reverse polarity of the input voltage by a power MOSFET.


You can see my machine powered by this board in this video.

There is another function. The enable signal of the stepper driver is used to control a fan. A fan for cooling the stepper driver can be connected to a small pin header. This fan must be a 5V fan or a fan suitable for the input voltage. This only runs if the stepper driver is active.


This project also includes a driving circuit for a laser. Here, too, I made bad experiences with the original circuits supplied and therefore developed my own circuit. Because lasers are very expensive and dangerous and do not forgive mistakes, only the experienced electronics technician should make a replica!

The driver circuit is a constant current source that can operate in PWM mode thanks to the high-speed optocoupler with up to 10 kHz. This circuit is suitable for laser diodes with currents up to 4.5 amperes. This laser driver purposely contains a slow dual OPA (LM358) because it provides a relatively clean output signal and it is frequency compensated for common mode. In addition, a time-delayed shutdown for the fan of the laser is realized with the second internal OPA from the LM358. The cooling of the laser starts when an input signal occurs and runs for another 30 seconds after the laser is switched off. 

However, what is additionally required is a good buck regulator, which provides the voltage required by the laser with sufficient power.

 

The output voltage of the buck regulators must be set to the maximum permissible voltage of the laser diode. This protects the diode and prevents overheating of the power MOSFET.

My KiCAD project files can be downloaded from my Google Drive
Google Drive

GRBL_V5.1 Board.zip
Bytes: 325107
MD5: 91B9ADBFE746B63C90AB36BA9C61E63C
SHA256: 2EAED850FB707BC1446D05051EEA5079F24879DAF73AB74D940CEB199D16B06F

Laserdriver.zip
Bytes: 249616
MD5: 2D7AEB7AF62058AF386E62074C359C56
SHA256: B427C313B893E182B4026F11F3932480043F2D06B0BB0B0D029E95F10FC63AC4

There is another archive in the ZIP files. This can be uploaded directly to a board manufacturer (I use Seedstudio or JLCPCB) to order professional PCBs in your desired color.
My project is free for private use. It is aimed at experienced people. I take no guarantee! Duplication is at your own risk and responsibility!
You are welcome to customize or modify my project and publish it. However, you always have to refer to the origin!

MightyNanoS with base board - another arduino clone





It always happened that I found my limits with my Arduino Nano. As an alternative, an Arduino Mega would offer, but this is too oversized for my projects. For this reason, I have made my own development, which also accommodates my electronics hobby. I opted for the ATmega 644p. It offers significantly more resources than the ATmega 328, but is priced attractively and well handled by the case for the hobbyist.
The project was developed completely with KiCAD and consists of 2 components.

The first component is the "MightyNanoS", that is the MCU board. The name comes from the used boot loader (Optiboot / MightyCore). However, there is already a MightyNano on the market that is more sophisticated and has more features. But because I only use the absolute necessary components, the "S" was added to the name. This minimal configuration can be used as the heart of many PCBs. The power supply is always taken over by the corresponding project. A protection against reverse polarity of the operating voltage is present (
p-channel MOSFET). It might also make sense to use a pin-compatible LDO regulator (e.g. XC6206) in your own PCB project instead of this transistor in order to adapt the MCU to other voltages.
It was also important that the MightyNanoS can be used on breadboards. All signal pins are led out on two pin strips. Thus, simple test circuits can be built and functions tested.



The 2nd component is a base board. It is not always the intention to design a larger PCB. Many projects result from the fact that corresponding sensors or other finished modules are simply networked. For this purpose, the base board was designed. It picks up a MightyNanoS and provides the power supply. All connections are available via pin strips. And because there was still enough space available, I placed some important components for me on the base board. That's one very accurate real-time clock with battery backup (DS3231) included. There is also an EEPROM socket (I2C) and a buzzer. Instead of the DIP socket for the EEPROM, an SOP8 chip can also be soldered directly. 2 additional connections for the I2C bus are available.


Of course, I will not always populate the base board, but only place the really needed components.
 


The dip switch has 2 functions. You can turn the buzzer (connected to D1) on or off. It is also possible to switch the alarm connection of the DS3231 to the INT0 of the MightyNanoS. So you can use previously programmed interrupts triggered by the DS3231.


A USB function is not included. I only need them in the rarest cases. There are USB / TTL converters on the market that can be connected to the UART header of the MightyNanoS. An ICSP connection for programming is also included on the MightyNanoS.



The used SMD components are almost always in the 0805 housing. That's ideal for me. Small enough for compact projects and big enough to handle them properly. The other components are usually easy to get via eBay. A replica should therefore be no problem for the experienced hobbyist.

I recently revised the layout and added a status LED and an LDO regulator (XC6206). The base board now also provides 3.3V. This is useful in order to be able to use 3.3V components with low power requirements. Then a level conversion is also necessary. If, on the other hand, you only want to work with 3.3V, you can also adjust the buck regulator instead (see data sheet of the MP2359) and omit the LDO regulator. (But first you have to test whether the buzzer and its transistor driver work with this low voltage).


My KiCAD project files can be downloaded from my Google Drive
Google Drive
Nano644.zip
Bytes: 1742136
MD5: 97674D885B42AD2C2D6F42CB3085F6FB
SHA256: 4D6951608BD512000D66E411FFC64DB386A4622BC873A308463B6DC5AC04169E

Nano644_Base.zip
Bytes: 1850413
MD5: 47AB3E6345B38C3D6C6B5F60ECD30058
SHA256: 2F83CD8D21CAC8B22110966EB14ED08908D3DABD4B68A65473748CCD54303F65


This board requires the MightyCore bootloader:  
https://github.com/MCUdude/MightyCore

The PIN numbering corresponds to the "MightyCore Standard pinout".

There is another archive in the ZIP files. This can be uploaded directly to a board manufacturer (I use Seedstudio or JLCPCB) to order professional PCBs in your desired color.
My project is free for private use. It is aimed at experienced people. I take no guarantee! Duplication is at your own risk and responsibility!
You are welcome to customize or modify my project and publish it. However, you always have to refer to the origin!