vespaman / Smoothieware-CHMT

Modular, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++
http://smoothieware.org/
GNU General Public License v3.0
0 stars 0 forks source link

Note; for proper speed enhancement, see serial-dma branch instead, which is where the fun stuff happens! This branch contains a major bugfix for the original serial communication on the smoothie chm-t code, that corrupts data if tx and rx are going on at the same time. This bug can be seen in all serial speeds, but I suspect it is (mostly?) hidden when enabling the serial confirmation fix in openPnP. Because of this, for now I'll leave this branch alone.

This fork is about RS232 hardware handshaking and increased + more relaible throughput.

In order to benefit from higher thoughput and hardware flow control, you will need to modify your control board. The changes needed can be defined in two; one for the actual hardware flow control, and one for increased bitrate. The latter needs the former to be useful.

This fork is meant to also work without the hardware board changes, but it has not been tested much by me.

Both 36 and 48 models share the same control board, with a little difference; the 48 has a native rs422 interface populated, whereas the 36 has rs232.

For the 48 models, the following needs to be done;

Since we are going to change the 48 into rs232, we need to add the missing components to do so;

With this change, you will no longer have the extra rs232 for debug available, if this is important for you. If if is, the debug could instead be moved to the rs422 interface.

Note that the only thing you need to do, if you want to revert back to rs422, is to move the resistor back to position R132.

For the 36 models, which already have the rs232 you need to;

How to configure the serial port

In config.default there are two relevant lines; one for specifying the baudrate you wish to run, and one setting for enabling RTS/CTS hardware flow control.

In OpenPnP you will need to select RTS/CTS flow control, and uncheck the "Confirmation Flow Control" since we will not need it any more.

A note of warning

Not all USB-RS232 adapters are good (and even the good ones can be configured differenctly) so it is strongly suggested to test everything once you are done, by connecting a serial comm's program and issue some tests. The author of this fork are using gtkcomm under linux, adding a 'macro' sending out a string "M115\nM114\nM115\nM114\nM115\nM114\n" (which will work on the orignial fw as well), or "M444\nM444\nM444\nM444\nM444\nM444\nM444\nM444\n" (not in other firmwares), which will result in a respons of 'U' and 'z' which are binary 0x55 and 0x5a. By putting the M-commands in a macro a good comms's program will send them rather rapidly, during also receiving the first results. Check the result carefully for missed out response, or wrong respons characters. Repeat a few times.

A picture of the patch rts_cts_patch

Currently the serial is interrupt driven, so the actual throughput will be less than the selected baud rate. e.d. for 576000 baud the actual throughput is around 500 kbps. The idea is to enable DMA on the rx, but probably not on tx, since the tx is pacing the main loop, which we need to keep in sync with anyways.

Old STM32/CHMT Notes from upstream

To build, follow normal smoothie build process to get setup. Then checkout chmt branch and rebuild.

Port Status:

CHMT Status:

TODO:

Notes/Caveats/Gotchas:

Next Steps/Priority

Smoothie

Overview

Smoothie is a free, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++ for the LPC17xx micro-controller ( ARM Cortex M3 architecture ). It will run on a mBed, a LPCXpresso, a SmoothieBoard, R2C2 or any other LPC17xx-based board. The motion control part is a port of the awesome grbl.

Documentation can be found here : [[http://smoothieware.org/]]

NOTE it is not necessary to build Smoothie yourself unless you want to. prebuilt binaries are available here: [[http://triffid-hunter.no-ip.info/Smoothie.html|Nightly builds]] and here: [[https://github.com/Smoothieware/Smoothieware/blob/edge/FirmwareBin/firmware.bin?raw=true|recent stable build]]

Quick Start

These are the quick steps to get Smoothie dependencies installed on your computer:

Building Smoothie

Follow this guide... [[http://smoothieware.org/compiling-smoothie]]

In short... From a shell, switch into the root Smoothie project directory and run: {{{ make clean make all }}}

To upload you can do

{{{ make upload }}}

if you have dfu-util installed.

Alternatively copy the file LPC1768/main.bin to the sdcard calling it firmware.bin and reset.

Filing issues (for bugs ONLY)

Please follow this guide [[https://github.com/Smoothieware/Smoothieware/blob/edge/ISSUE_TEMPLATE.md]]

Contributing

Please take a look at : 

Contributions very welcome !

Donate

The Smoothie firmware is free software developed by volunteers. If you find this software useful, want to say thanks and encourage development, please consider a [[https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=9QDYFXXBPM6Y6&lc=US&item_name=Smoothieware%20development&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted|Donation]]

License

Smoothieware is released under the GNU GPL v3, which you can find at http://www.gnu.org/licenses/gpl-3.0.en.html