Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Skynet/Anet A10 support #7016

Closed
wants to merge 2 commits into from
Closed

Merge Skynet/Anet A10 support #7016

wants to merge 2 commits into from

Conversation

Bob-the-Kuhn
Copy link
Contributor

@Bob-the-Kuhn Bob-the-Kuhn commented Jun 10, 2017

This came together a lot quicker than I expected so it's time for comments/corrections/improvements.


This merges the @oderwat branch SkyNet3D-Devel branch of Skynet/Anet into Marlin.

I don't know if this is the same as PR #6020 or not.

@Bob-the-Kuhn Bob-the-Kuhn changed the title test - want to use Travis - playing with merging Skynet/Anet Merge Skynet/Anet Jun 10, 2017
@Bob-the-Kuhn Bob-the-Kuhn changed the title Merge Skynet/Anet Merge Skynet/Anet A10 support Jun 10, 2017
@oderwat
Copy link
Contributor

oderwat commented Jun 10, 2017

Well I was going to clean up pins_ANET_10.h to no be based on the pins_SANGUINOLOLU_12.h anymore as all the define/undefine stuff is hard to follow and a bit pointless. Besides that I guess I am "OK" with somebody hijacking my work without asking. I the end it is free software.

@oderwat
Copy link
Contributor

oderwat commented Jun 10, 2017

OK.. I tried your branch (just changed the MOTHERBOARD to BOARD_ANET_10 and defined ANET_KEYPAD_LCD). It compiles, but flashing leaves me with a non working 5 button display. I am not willing to debug that though. I just have limited time and todays "work" was to make SkyNet3D working based on 1.1.3 Marlin. BTW. the branch is SkyNet3D-Devel. SkyNet3D-Oderwat is my printers configuration and based on the SkyNet3D-Devel branch.

@ZirakC
Copy link

ZirakC commented Jun 10, 2017

In my case (ticket # 6984) I changed the board to Melzi, and had to tweak the pins for the Melzi set up to match the one for Anet. A couple changes in the configuration.h and I got it working. @Bob-the-Kuhn my copy of this source is attached on the ticket.

@Bob-the-Kuhn
Copy link
Contributor Author

@oderwat - sorry about that. I guess I was a little too enthusiastic. We can kill this if you want.

@oderwat
Copy link
Contributor

oderwat commented Jun 12, 2017

I think the Anet community can wait some more weeks till I finish a PR for the Anet board.

@Bob-the-Kuhn
Copy link
Contributor Author

@oderwat - can I be of some assistance in this? I'm more than happy to help where ever I can.

Is there stuff in the development branch that needs to be brought over?

You'd mentioned that the current PR code compiles but doesn't work. What is it not doing?

Can you point me to where I can get familiar with the functioning of the ANET board and of the ADC_KEYBOARD?

@oderwat
Copy link
Contributor

oderwat commented Jun 13, 2017

@Bob-the-Kuhn you could create a PR for the fork in branch SkyNet3D-Devel which rewrites the "pins_ANET_10.h" in a way that it does not include "pins_SANGUINOLOLU_12.h" anymore (and does not have a bunch of #undef). But without having an original Anet board I don't think one can't really work on it as one has to test a lot of different combinations (at least the 3 possible displays + bltouch + z-endstop + sensors). I did a quick "technical" translation in the past but it somehow had errors.

@benlye
Copy link
Contributor

benlye commented Jun 13, 2017

@oderwat, @Bob-the-Kuhn, I'd be willing to give the pins file a go. I don't have Bob's knowledge on the pin definitions, but I do have the Anet board. I have both the A6 full graphics display and the A8 5-button ADC panel, so can test both of those without too much difficulty (I also have a non-Anet RepRapDiscount Full Graphic display, but haven't made the wiring harness up for it yet).

@Bob-the-Kuhn
Copy link
Contributor Author

I'll do the PR.

What are the three displays it should work with?

@Bob-the-Kuhn
Copy link
Contributor Author

Also, what Arduino IDE extension do you use to compile the board?

@oderwat
Copy link
Contributor

oderwat commented Jun 13, 2017

I don't know that you mean with the extension for compiling the board. I use the https://github.com/SkyNet3D/anet-board and https://github.com/olikraus/u8glib

Displays are the following:

#define ANET_KEYPAD_LCD
#define ANET_FULL_GRAPHICS_LCD
// RepRap Discount (with Anet Adapter wiring see: http://www.thingiverse.com/thing:2103748)
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER

Which come down to the original Anet A8 5 Button Charakter LCD, the original Anet A6 Full Graphics Display (Input elements on the right) and the RepRapDiscount Custom LCD (Full Graphics with input elements on the bottom). Last of those displays just work with a reworked wiring as I published here: https://www.thingiverse.com/thing:2103748

Besides that there is the BLTouch Servo Pin which should be checked: https://www.thingiverse.com/thing:2091529

@RalphSch
Copy link
Contributor

Hi guys, if there is something I can help with getting this merge done then let me know. I had nearly everything together for an own merge PR but @Bob-the-Kuhn was faster ;) I have experience in coding arduino/marlin and also in electronics. I own an Anet A6 (running Marlin/bugfix-1.1.x with bltouch) and have a spare reprap-discount-full-lcd laying around for testing.

@Bob-the-Kuhn
Copy link
Contributor Author

Here's the rev B pins_ANET_10.h file. The Sanguino dependencies have been removed.
pins_ANET_10.zip

I've compiled all four options for both Rev A and Rev B. The names and logical pin numbers match 100%.

I have not been able to fork the SkyNet3D/Marlin repository nor create a PR against the SkyNet3D-Devel branch. I'll try again tomorrow.

@benlye
Copy link
Contributor

benlye commented Jun 15, 2017

The rev B pins file works for me - compiled and tested with the SkyNet3D-Devel branch and the Anet ADC and full graphics LCD controllers.

@Bob-the-Kuhn
Copy link
Contributor Author

Here's attempt 2 to merge the two.

I definitely didn't copy over some code in pass one.

@benlye and @RalphSch - please test this latest code. The branch is at https://github.com/Bob-the-Kuhn/RCBugfix-M43-and-spindle/tree/Skynet

Once the two of you are happy then I'll ask for a review.

Open items:

  • ADC_KEYPAD - should that even show up in the configuration.h file? I don't know if it is a separate product or if it's just a part of the ANET_KEYPAD_LCD.
  • ANET_KEYPAD_LCD & ANET_FULL_GRAPHICS_LCD - should they be added to all the configuration.h files or maybe we should put them just in a new example config. I'm leaning toward a new example config.

@benlye
Copy link
Contributor

benlye commented Jun 16, 2017

This build works for me with ANET_KEYPAD_LCD & ANET_FULL_GRAPHICS_LCD. I dropped my configuration files in and compiled for both then tested basic keypad functionality - navigating the menus, homing, changing values - all looks good.

Not too sure how to address your open items, I guess it depends on how this is 'normally' done in Marlin.

@Bob-the-Kuhn
Copy link
Contributor Author

@benlye - thanks for testing it.

@benlye
Copy link
Contributor

benlye commented Jun 16, 2017

You're welcome. I've completed four prints today running this branch, with no issues at all (using the Anet full graphics display). I'm really happy to see this coming along :-)

@RalphSch
Copy link
Contributor

@Bob-the-Kuhn Your RevB file works with my A6 and BLTouch but I'm not able to upload the firmware if I choose the Sanguino hardware extension. The extension from @oderwat 's https://github.com/SkyNet3D/anet-board works. There are some differences in the board definitions related to the 1284p bootloader fuses and upload speeds .... or maybe I just have the wrong bootloader installed on my anet board (some skynet version killed it because the firmware got a little bit too big and damaged the bootloader which I had to reflash using an spare arduino board ... maybe there is also a little bug in the anet board extension for the maximum size of the firmware upload?).

@benlye
Copy link
Contributor

benlye commented Jun 16, 2017

@RalphSch, until recently there was a bug in the maximum upload size allowed in the Anet board definition distributed in the SkyNet3D bundle, but it's fixed now, and the option for Optiboot has also been added. If you don't have the latest version, you should definitely grab it from the Github repo.

(I should add that my tests were using the Anet board config, not the Sanguino IDE extension.)

@Bob-the-Kuhn
Copy link
Contributor Author

I've uploaded modified configuration files.

  • The configuration in the top level stays the same as in bugfix-1.1.x
  • Made a directory in the examples for this board. Should the directory be called Anet, Skynet3D, ???
  • Added the Anet (Skynet3D?) LCDs to all configurations

Looks like I need re-write the header on the pins_ANET_10.h file. As a minimum it needs to point to the Skynet system. I'll go over there and see if I can educate myself.

@RalphSch - did the Sanguino extension compile? Was the failure only at the download step?

@RalphSch
Copy link
Contributor

RalphSch commented Jun 16, 2017

@Bob-the-Kuhn I think we should keep using the manufacturer name of the hardware for naming like @oderwat does it in his skynet3d marlin fork. I'm in several facebook groups for the Anet printers and it confuses the Anet users when writing that Skynet3D is just a fork of Marlin. So they keep on asking the simplest things which are already very well documented because they just do searching for Skynet instead of Marlin.

The code compiles fine using the sanguino extensions but the Anet uses an different bootloader configuration (speeds/fuses) and that's why uploading fails. Just compare both of the boards.txt and you will see the differences in the 1284p (16Mhz) sections.

@Bob-the-Kuhn
Copy link
Contributor Author

I've just re-written the header portion of the pins_ANET_10.h file. Please review & tell me what I need to change/correct/add.

Anet makes the hardware. Is Skynet3D a user group that provides useable firmware?

@RalphSch
Copy link
Contributor

RalphSch commented Jun 16, 2017

Yes, it's 'just' (I really honor the work behind it and @oderwat please correct me if I'm wrong) one facebook group (https://www.facebook.com/skynet3ddevelopment , moderated by one person), the Skynet3D fork (developed and maintained by oderwat) with all the needed patches for the controller board, lcd and the anet hardware extension .... and an ebay shop (http://www.ebay.co.uk/usr/skynet3dmods) which sells parts and uprades for the Anet printer.

Where can I find the new version of pins_ANET10.h? I'm 'reworking' my printer right at the moment and got a little bit confused with all the different branches :-D

@benlye
Copy link
Contributor

benlye commented Jun 16, 2017

Anet makes the hardware. Is Skynet3D a user group that provides useable firmware?

Yes.

I don't see any changes in pins_ANET_10.h - should we be looking in a different branch now?

One thing I would point out is that ANET_10 is really the Anet board v1.0, and it might be useful to call it that to avoid confusion with the printer model numbers (A8, A6, etc.). E.g. * ANET 10 board pin assignments should be * ANET v1.0 board pin assignments.

@G-Pereira
Copy link
Contributor

@oderwat @Bob-the-Kuhn Will this work also with the Anet A2? You've talked about A6 and A8, what about A2?

@benlye
Copy link
Contributor

benlye commented Jun 21, 2017

@G-Pereira
Looking at Gearbest, it seems the A2 has the same Anet controller and Anet LCDs as the A6 and A8, so yes, it will.

Also, if SkyNet3D works on your A2 this will definitely work.

@G-Pereira
Copy link
Contributor

I have not assembled mine yet, but it is nice to know 😄

@G-Pereira
Copy link
Contributor

@benlye But the hotend is not in the same place, do I need any extra configurations?

@benlye
Copy link
Contributor

benlye commented Jun 22, 2017

But the hotend is not in the same place, do I need any extra configurations?

Yes, you will need to configure the settings in configuration.h and configuration_adv.h I would start with the example files in example_configurations/Anet and proceed with caution.

Once you have something which works you can contribute it back and share it in the Anet Facebook group(s) as an example.

@benlye
Copy link
Contributor

benlye commented Jun 22, 2017

I've made a few changes to the Anet example configuration in my branch (the board was wrong!):
benlye@68bec10

I can't seem to do a PR against @Bob-the-Kuhn's Skynet branch just for this change and I'm not sure how else to submit it. Can (should) I create try to create a commit against this PR?

@RalphSch
Copy link
Contributor

@Bob-the-Kuhn I can do tests today in the evening or later. It's still the repo Bob-the-Kuhn/RCBugfix-M43-and-spindle branch Skynet or an other one?

add ANET LCDs & keypad, fix pinsdebug.h

=============================

second try to merge

=============================

disable LCD option

=============================

config files

=============================

rewrite header of pins_ANET_10.h file

=============================

more header changes & deleted variant statement

The variant statement is not needed because the boards.txt file in the
Adruino IDE extension doesn't allow selecting a variant.

=============================

fix pinsDebug so it prints out all pins on a 1284

=============================

cleanup & implement reviews

all changes in ultralcd.cpp are indentation changes except for the
elimination of unnecessary parens starting at line 4737

merge "suggestions 3" branch back into this one

update configuration.h per review

=============================

revert REPRAPWORLD_KEYPAD and add ULTIPANEL

=============================

Removing ANET_FULL_GRAPHICS conditionals, adding ADC_KEY_NUM, and fixing pins

=============================

Fix ADC_KEYPAD conditional check

Switching !ENABLED to DISABLED.

=============================

bring configuration.h files up to date

=============================

correct Anet example configuration
@Bob-the-Kuhn
Copy link
Contributor Author

@benlye - I've moved the corrections into this PR.

@RalphSch - that is the correct branch.

@benlye
Copy link
Contributor

benlye commented Jun 22, 2017

Looks good to me.

@RalphSch
Copy link
Contributor

Board: BOARD_RAMPS_14_EFB Display: ANET_FULL_GRAPHICS_LCD
Ramps => new adapter => A6 LCD ... LCD, encoder, rotation reversed, buzzer, reset ... ok

Board: BOARD_RAMPS_14_EFB Display: REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
Ramps => ReprapDiscountFullLCD ... LCD, encoder, rotation reversed, buzzer, reset .... ok

Board: BOARD_ANET_10 Display: ANET_FULL_GRAPHICS_LCD
Anet10 => A6 LCD .... LCD, encoder, rotation, buzzer, reset ... ok

Board: BOARD_ANET_10 Display: REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
Anet10 => new adapter => ReprapDiscountFullLCD ... LCD, encoder, rotation, buzzer, reset .... all ok

Looks good :)

@@ -1,4 +1,4 @@
/**
/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UTF-8 with BOM? Use UTF-8 no BOM.

@benlye
Copy link
Contributor

benlye commented Jun 24, 2017

UTF-8 with BOM? Use UTF-8 no BOM.

Thanks! I think that was my editor, and I couldn't work out why it was doing it. I'll update my preferences :-)

@Bob-the-Kuhn
Copy link
Contributor Author

These code changes have been merged under PR #7134.

@benlye
Copy link
Contributor

benlye commented Jun 28, 2017

@RalphSch I finally had a chance to play around with the Anet LCD adapter.

It turns out we can't have a 'universal' adapter for connecting both the Anet LCDs to a RAMPS kit because the RAMPS Smart Adapter doesn't expose the analog pin needed for the A8 ADC keypad.

That said, it's pretty trivial to wire the Anet A8 LCD into the AUX-2 header on a RAMPS board - if it weren't for 5V and GND needing to be reversed it could have been done with a straight-thru 10-pin cable!

So I enabled #define ADC_KEYPAD_LCD in configuration.h, dropped this into pins_RAMPS.h:

#if ENABLED(ADC_KEYPAD)
  #define BTN_EN1             -1
  #define BTN_EN2             -1
  #define BTN_ENC             -1
  #define BEEPER_PIN          -1
  
  #define LCD_PINS_RS         64
  #define LCD_PINS_ENABLE     44
  #define LCD_PINS_D4         63
  #define LCD_PINS_D5         40
  #define LCD_PINS_D6         42
  #define LCD_PINS_D7         65
  #define ADC_KEYPAD_PIN      12
#endif

and...

ramps_with_adc_keypad

All pins from LCD are mapped directly to AUX-2, except 1 and 2 (5V and GND) which are reversed.

So here's the same thing, but using a 10-pin cable with pins 1 and 2 swapped:

ramps_with_adc_keypad_2

@RalphSch
Copy link
Contributor

@benlye Sad for the universal adapter but a very simple and nicer solution I think. This leaves more free IO which otherwise would get blocked by the reprap-smart-adapter pcb. Assembling the flat cable connectors can be done by (mostly) everybody even with the two wires swapped. This would also mean a useless jumper on ..... your already updated pcb and description on aisler.net :D

@thinkyhead
Copy link
Member

I'm soon to figure out a good wiring from Cartesio UI to RAMPS. Will try to match some mapping already established as closely as possible.

@Bob-the-Kuhn Bob-the-Kuhn deleted the Skynet branch July 29, 2017 16:47
@luisluna2
Copy link

Hello @benlye Could share the Firmware? I have the same problem with the Screen.

@benlye
Copy link
Contributor

benlye commented Apr 30, 2018

@luisluna2 I'm not sure what you're asking for -the Anet board and LCD are fully supported by current Marlin.

@luisluna2
Copy link

luisluna2 commented Apr 30, 2018

@benlye Yes, but I don't know how configure hehe :C could send to me with the configuration that you have for make this great thing?, my screen turn on but not can see nothing.
27637622-4aaeb86a-5c08-11e7-800b-988afdd2f2f1

@benlye
Copy link
Contributor

benlye commented May 1, 2018

@luisluna2 So you have a RAMPS board and the Anet 5-button LCD screen? Have you enabled ZONESTAR_LCD as your display type in Configuration.h? That should be all you need to do.

Find this line in Configuration.h:

//#define ZONESTAR_LCD 

and remove the // from the beginning.

#define ZONESTAR_LCD 

@luisluna2
Copy link

@benlye I will try in this momet!!!

@luisluna2
Copy link

@benlye Thank you so much!, this really works 💯
whatsapp image 2018-05-01 at 7 05 53 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants