Quantcast
Channel: Reprap Forum
Viewing all articles
Browse latest Browse all 39321

Getting Marlin going on a Brainwave board (no replies)

$
0
0
As a follow-on to my previous long-winded post on a Marlin overview (particularly as it applies to a Brainwave board), I did manage to get everything going to the point where I can drive motors. Here's an overview (also long-winded) for those (like me) who have no experience with the ins-and-outs of Arduino (compatible) controller boards and Marlin firmware:

0. The first challenge is figuring out where information is located for the brainwave board. There is a brainwave board github page (https://github.com/unrepentantgeek/Brainwave) which has some code you'll need, another Marlin for Brainwave github page (https://github.com/unrepentantgeek/Marlin) with more code to download, a Thingiverse page (http://www.thingiverse.com/thing:25054) which has some useful photos (schematic, wiring diagram) not found on the other pages, and lastly a reference to a Fabbers@UW blog which has more useful information for getting things going under Windows.

1. You'll quickly discover that the Brainwave board is an Arduino compatible controller, and that you will also need to download the Arduino Development software (http://arduino.cc/en/Main/Software). Now you say: Why do I have to go through all this crap? Why doesn't the board just come pre-loaded with the firmware I need? From what I gather, most of the printer controller firmware versions have many (most?) of the setup parameters for each particular machine compiled directly into the code rather than using a separate initialization file or other mechanism. Therefore, you need to first download the Arduino development tools, download some hardware specific Arduino files for the Brainwave board, download the Marlin code, compile it all together and then load it onto the board yourself. (The Smoothie board I got was similar - had to download development tools, etc., but it could have been pre-loaded with the firmware because all of the configuration parameters are in a file you can just edit directly (no subsequent compiling, downloading, etc.).

2. Having acquired a Brainwave board, first you have to solder in connectors. This seems to be common practice with other boards as well. I can see that some people might want to use horizontal rather than vertical connectors, but in 99% of the photos of printers I've seen, it just doesn't matter. I think this'd be a nice step to eliminate for the less electronically inclined.

3. The Brainwave does not power-up directly when connected to a USB port - you need to apply 12v power to the screw terminals. This is not mentioned in the Hardware setup instructions, but it is mentioned a little later down in the Software setup section on the Brainwave github page.

4. The most confusing part for me was getting my PC to recognize the Brainwave board. I was expecting, as with most USB devices, that when plugged in and powered up, Windows would give me the little "boing" sound and then start whining about installing drivers. At first, I got nothing. It finally dawned on me that I actually had to press the Program button on the board, which then caused a "AVR CDC BOOTLOADER" device to appear. But this didn't look anything like the Serial Port connection Arduino was expecting. I tried updating the driver for this device using the BRAINWAVE.INF file, but Windows just complained that it was incompatible. After searching the web for "AVR CDC BOOTLOADER" I ran across a forum posting (http://forums.adafruit.com/viewtopic.php?f=19&t=19075) with a correction to another bootloader.inf file. I compared it to the BRAINWAVE.INF file and they looked essentially the same (except for the correction). It seems that this correction is only needed if you've never installed a "CDC driver". (I have no idea what that means.) Anyway, After updating the driver with the corrected version, the Bootloader device magically turns into a serial port.

5. At this point it should be mentioned that there are actually 2 separate USB devices associated with the Brainwave board - a serial port for loading the firmware onto the board, and after the firmware is loaded, up and running, a second serial port for sending commands to the Marlin firmware. (Both serial ports use the same physical USB connection.) More on the second serial port later.

6. Next was installing the Brainwave hardware files in the Arduino Hardware folder. When you download the ZIP file with the Brainwave hardware files, the file of interest are embedded in a folder in a folder in a folder... . It turns out that the items: [Brainwave (a folder), brainwave.inf, README.md and license.txt] need to be copied directly into the folder "Program Files/Arduino/Hardware". Once the Arduino IDE was restarted, I could then continue with the instructions to select "Brainwave" from the list of boards.

7. To open the Marlin code within the Arduino IDE, the instructions say to open the file Marlin.INO. But there is no Marlin.INO included with the Brainwave-Marlin files I downloaded. More searching and I discovered you instead open the file Marlin.PDE. I assume they are both some form of project definition file. In any event, after you first compile and download Marlin, you get a message about converting Marlin.PDE to Marlin.INO.

8. Now, when you reset the Brainwave board, you get another "boing" form Windows which has discovered another unknown USB device. This is the second serial port I mentioned in (5) above. It actually uses the same corrected brainwave.inf file that was used for the AVR CDC bootloader that appeared at the beginning. I guided Windows to use this same file for installing the driver, and lo and behold, a different serial port pops into existence.

9. Finally, I was able to connect Pronterface to the board. But I wasn't actually able to move any motors. Using the jog buttons produced the helpful error message that the printer was shut off due to a hardware error. (What kind of hardware error?) I took a pretty good guess that because I hadn't hooked up any limit switches yet, that might be the problem. Back to Arduino, modify Configuration.H to disable the end-stops, recompile, download and run. Finally - motors moving. Yeah!

Viewing all articles
Browse latest Browse all 39321

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>