2021-05-11

I got the Mellow Fly 407 board in today, and it now works awesome!

I hooked the Mellow dedicated wifi unit to EXP 1 and EXP2 and to the serial TFT connection, programmed the microSDcard offline on the PC with the files from the proposed Github site and it all went great!  (The little added user manual is very good, just follow the directions and it can’t go wrong!)

Burnt the board’s firmware first, then the firmware of the wifi esp module and after setting up the wifi with YAT via USB, I programmed the wifi settings.  Then, with the Duet’s WDC PC-remote console via wifi, I uploaded the FLY 407 motherboard with all the latest available firmware: RRF3.4 beta and the latest wifi- and DWC versions.

Then, I removed the serial connection between the TFT connection on the motherboard and the wifi module and plugged in the BTT 2.4 inch TFT at the same serial port.  Since there is only 1 tft port available, I use the same serial port as I used for programming the esp wifi module.  I already put the RRF3 firmware on the TFT unit.

Well, the results are awesome! On the TFT after connecting you see the extruder step from 0 to 1-2-3-4 and back to 0 so this all works very nice!

I must be honest here: I also tried the Mellow 7 inch screen but this is not yet really working as well as the little BTT screen.  The Fly screen is a lot bigger, though, and the Fly 7 inch TFT has great potential.  I hope that we will get a new firmware release soon, with access to the macro directory.  Just one page with this macro dir acces would make it all a lot more interesting for me.  BTW, the BTT TFT does not have the macro access page as well, only the PanelDue has this feature standard available…

Geetech A30M first use

In mid-June 2020, I started using the Geeetech A30M desktop 3d printer.
The printer can print 2 colors mixed with 2 filament geared drive units on top of the frame and a fan for each feed to the combined hotend.

A few adjustments are needed on this printer if you really want to work well with it.
First of all, I had a lot of trouble with the standard noise from the 24 Volts fan under the bottom plate, which is supposed to provide cooling for the motherboard. This fan is always running at full power.
I put a controller in between with controls on the left side, through a drilled hole. I secured the controller with 2 tie-wraps through the cooling slots on the left side. The dial just comes through the case and you can hardly see it. Most motherboards I use don’t need a fan for cooling because they are placed freely in the open frame but the A30M has a closed case so a little air circulation is necessary. Plan is to add a thermostat control so the knob is no longer needed. Later. The controller is set to the position that there is a lot of air movement but without the whirring of the fan.

Second modification is the addition of a Geeetech 3d touch on the hotend. The bracket was included with the printer, suitable for both a thick inductive sensor and the 3d touch sensor. What’s nice is that the software (or firmware, if you will) as suitable from the factory for autoleveling. Do pay attention to the correct placement of the connectors, from the front view the brown and black wires should be mounted to the right.

The disadvantage is that the firmware from factory does not really work well with auto leveling. In the middle of the hotbed everything goes fine but with larger prints I noticed that the first layer was printed very differently, so everything kept coming loose. So now I work with manual leveling while automatic leveling is possible.

The hotbed is nice and big with a workable size of 320x320mm. The print height is 420mm.

The price was over 400 Euro, and the delivery was from Germany.

I recommend everyone to secure ALL and especially to include the block hook. My one was really not assembled properly. All threads were OK but all bolts were either too tight or not tight at all. I only found this out during the first test print. I stopped and checked everything. Pay special attention to the rollers of the hotbed. It is difficult to reach them but in my case the adjustment wheels were not set at all and did not rotate. The disadvantage of such a desktop printer is that you hardly have any space under the hotbed.
The vertical V-profiles were not mounted perpendicular to the upper profile. That is difficult to repair because everything is drilled through and bolted. I recommend installing corner stiffeners at the back in the top 2 corners. I have them on order and then they can go right on.

And… what some large printers have and the A30M does not: Additional stabilization rods to the front (or to the back, that is also possible) so that the vertical profiles cannot move. Now when you apply a little force there is about 2mm of play on it, despite the solid mounting to the desktop housing.

Voron 2.4 Core XY build

My experiences with CoreXY printers are excellent, so I chose a VORON for my home-built COREXY printer with a print size of 300x300x300 mm.

Sample PLA print with a Citroen DS at 175 mm/s print speed

Developed from a large community, the VORON is one of the best and most reliable 3D printers.  And this printer just looks really good!

Via AliExpress, Banggood, Reichelt, aluminiumopmaat.nl and plexiglas.nl I ordered all the stuff, according to the bill of materials I could download from the VORON site.

I printed the PETG parts on the Prusa mini at 0.15 fine.

The ABS parts (red and black) were printed on the Twotrees Sapphire plus.  It took a lot of ‘tweeking’ before the ABS came out well but in the end I got a nice result!

Printed parts for the Voron 2.4 300In the end, rebuilding is not really self-building and it is more based on ordering and assembling than getting to work with the saw and drill yourself.  Also the necessary 8(!) linear rails of 350mm, bearings, gears, belts, motors, electronics and so on have been ordered and the rest of the necessary stuff has been printed (25-8-2020).

For the control part I have chosen one PI Raspberry PI 4B 4GB and two pieces of SKR 1.4 turbo motherboards, according to the VORON recommendation.

Building the Voron 2.4 with the afterburner Beta1 hotend combination is illustrated by the following pictures.

Gantry ready:

Gantry of my Voron 2.4 300Housing and skirts underside with Z-motors yet without the gantry mounted:

Frame of my Voron 2.4 300
Electronics positioning underneath my Voron 2.4 300

Below: The 9 mm drive belts of the 4 Z-axes placed:

Halfway the building phase of my Voron 2.4 300

And the assembled base plate with the rails and controls, power supplies and so on (printer turned over):

Cabling and electronics of my Voron 2.4 3000: 2xSKR1.4 turbo with Klipper, Raspberry PI and Octoprint with Klipper

We are still waiting for the bearings for the Alpha and Beta drives in the gantry.  These bearings are used to make a tension roller per 2 pieces.  I had originally bought idler bearings for this purpose, but the diameter of the collar of these bearings is just too large.

Too bad but then I have to work on the Raspberry PI4B in combination with 2 times SKR V1.4 turbo motherboards.  The PI will make a new config.bin via Klipper for the SKR V1.4 motherboards so the PI can drive both SKR boards at the same time.  On the main board will be Alpha and Beta and the extruder plus the extruder heater, on the other (Z) board the 4 Z-motors and bed heater.  By itself a Duet with expansion board could have been an option too, but the Voron designers made it with the PI, Klipper and 2 SKR boards.  And I try to stay as close to the design as possible . -)

Below: Threading the straps, no picture used.  Just start somewhere and you’ll end up right.  Oh yes, also changed the sensor in the config from NC to NO..

Below: In addition to the 24Volt 200 Watt hotbed nevertheless also added the 500 Watt 230V.  With only the 24V version it took more than 20 minutes to get to 110 degrees Celsius…

Old:

And new— no PID run done yet..)

Below: The steel plate is placed on the sticky magnet sheet.

Below: First print….  I had to search for the Z offset adjustment and the extruder turned the wrong way around.  Also the gantry leveling took some thought, you actually have to make the basic setting with a ruler, otherwise the leveling takes a long time.  Nice is that a bed mesh leveling is not necessary anymore, but of course it can be done.  You turn a home and because the nozzle always calibrates the Z on the mechanical Z endstop, and the gantry does all the leveling, you always have a good first layer.  Unless the bed warps but with such a thick plate that seems almost impossible. Just to be sure, I did include a bed_mesh profile in the config.g.  By the way I just used a 24 V aluminum hotbed as a base because my 8 mm 310×310 plate turned out to be a cut plate instead of sawn.   And a cut sheet turns out to be non-flat on the cut sides by default, unfortunately.  Flattening costs more than a new plate, maybe that will come sometime….

And with enclosure, camera and the TOP LED’s:

Afterword:

In practice, I fixed a few more minor flaws, including:

Extruder tuning.  The donor extruder turned out not to pick up the filament properly.
First I tried to put a ring in between the left side of the shaft, but then the nylon gear on the right side of the shaft gets tight and the housing can’t be closed completely anymore….
I ended up using a spare set of dual drive extruder gears and swapping the set of gears.  With that, the filament was properly aligned with the running path of the gears.  See the picture how it was at first:

Misaligned filament path in Afterburner extruder

Hotend tuning
After the PID runs of hotend and heated bed, my chosen assembly of the custom ED6 heater block, the heatbreak pipe and the cooling element turned out not to fit together properly.  The result was that when the filament was extracted, a thick piece was always stuck at the end.  This was caused by the heatbreak pipe not fitting tightly on the nozzle.  There should be no play between them.  I completely demounted the filament and screwed the heatbreak pipe 2 turns less into the cooling element with red threadlocker.  Let it harden for a day and then I assembled the rest.  By the way, I also mounted the teflon version of the heatbreak pipe in stead of the titanium version.  The tintanium version was to my experience a bit too stiff.  Or my filament was too old or inferior.  In any case, after the modification, everything works without problems.

Hotbed, TPU and ABS
To print TPU and ABS without brim or skirt without warping I bought a magnetic PEI steel plate with coarse profile.  It really works perfectly. Both ABS at 110 degrees sticks nicely and TPU at room temperature sticks nicely too.  And the removal is also without problems.  Occasionally I spray a little hairspray on the plate but I don’t think that lacquer is really necessary at all.  It is meant to make the removal easier.

Tension of the belts
I tried getting the belts at the same tension, this was not that easy.  Finally I ended up with a mechanical way of measuring tension after putting 1 at my desired tension and comparing this as reference with the other to be compared belts.  So, for the Alpha and Beta belts I first did a ‘good feeling’ setting and then I used my old trunk scale weight device to measure the tension when pulling the belt A. Then, I used the device to measure at the same place for B. And I repeated this for the 4 vertical belts.

Alignment
Aligning the machine is also a bit of a challenge…
You must assume that your frame is square and straight.  You have to check this thoroughly.  Both vertically, horizontally and diagonally.  Then you can adjust the gantry. Loosen and remove the A and B belts.  Or do the alignment BEFORE placing the belts.
Fix the horizontal position of the Gantry otherwise you can’t align at all. Place 4 equal distance blocks of about 10-15 cm under the sliders of the vertical linear rails on the lower 2020 profiles, in the 4 corners through which the gantry rests stably. I have placed position holders under all MGN9 vertical linear rails afterwards so that the rails cannot slide in the 20×20 V profile.  If you use ‘regular’ 20×20 extrusion profile you don’t have a problem because there is enough ‘meat’ left for attaching your rail to the profile.  With V-profile, the groove is a bit wider and it is very difficult to mount the rails neatly without tools in the groove.  My frame is of V-rail profile and the gantry of plain 2020 profile.
The alignment of the gantry I started at the back.  Loosening all screws a bit, including the screws of the convex connectors that hold the gantry to the linear rails.  By the way, I see some builders placing these screws with multiple spring washers.  I’m going to do that too…
At the rear of the gantry, push the gantry completely against the rear.  There should be no gap between the XY joints and the frame.  PS: Leave the endstops off for a while at this action!
While the gantry is sitting against the back, tighten the XY joints and the sliders of the X-axle as well. (the side of the endstops holder is temporarily secured with 2 screws)
Tighten the rear 2 gantry joints (with the convex surfaces) as well.  This fixes the rear position at right angles.
Carefully slide the gantry forward. This should be possible without any effort.  If not, check whether there is enough play (and if necessary loosen the screws) on the gantry joints at the front (with the convex surfaces).  If you still don’t have a free run to the front, your frame is not good or your vertical rails are not seated properly.  First check the correct positioning of your rails with your position tool (from the printed stock) and to be sure also unscrew the 4 screws on both front vertical rails.  Try again if the sliding of the gantry goes smoothly.  Still no good?  Then reverse the procedure and start at the front.  Try to set the gantry exactly level with the frame.
After adjusting: Test the alignment also halfway (vertically) and at the top!

Wobbling in cheap linear bearing screws

As I experienced, from my 10+ 3d printers only the Prusa mini and the I3 Bear deliver adequate print quality.  Even the Voron 2.4 CoreXY has problems if you look carefully at the printed results.  Though all prerequisites were made to build a good printer, it was never really matching real good quality.  So- in my search for the root cause of this somewhat disappointing discovery, I stumbled on some interesting stuff: The HevORT Advanced DIY 3D Printer project.

I found this website as a link from one of my fact finding searches for the cause of wobble in my linear rails that I am using for my Indymill CNC.

Obviously, the cheaper rolled linear screws with ball bearing nuts are not as good as the ones that are first cut on a lathe and are then grinded on a special machine.  The better linear screws with ball bearings are specified into 10 categories from 1 to 10 where no.1 is most expensive and no.10 the least expensive. Quality is better with higher price.  Prices are over 500 Dollars US for the better ones, but can mount up even higher.

If you look at the category of the rolled ball bearing screws, these take a lot of strain in the material due to the manufacturing process. The strain causes an unequal surface and therefore this can cause lateral wobble.  When using these cheap linear ball bearing screws for 3d printers as Z-drives, the lateral problem can be solved by adding shifting plates as horizontal shift compensator.

On the net, a solution is given by using a couple of bearing balls (3) between magnets that are used as rolling plates on top and bottom.  The shifting plate holders on top and bottom stay aligned with each other by mounting 2 magnets that attract each other on 2 sides of these plates.  Please see the cutouts I took from the movie that is provided in the above mentioned link:

This can be implemented in the HevOrt BUT I feel that my Voron2.4 could really benefit also from this solution. Although the Voron is depending on the vertical linear rails for sliding up and down and a belt mechanism is making the motion happen, the mechanism that compensates for any wobble or different sizing of the frame is only a friction plate of (in my case) 2 PETG surfaces that slides on each other, 1 per vertical axle.

So, I will see what I can find or make to get the above anti-lateral wobble solution built and implemented in the Voron 2.4 asap and see what the result will be!

 

MMU2S on Ender3pro with TT SKR E3 mini motherboard

In 2020 I upgraded my Ender 3 with synchronised Z-axes and a new motherboard, the SKR Mini E3 V2.1.

The Ender 3 is very reliable and has been equipped with a direct drive bondtech extruder but still has the original hotend.

I chose the Ender3 to be the 3d printer on which I will attach the MMU2S.  This also means that I will have to exchange the hotend/extruder combination with a Prusa Mk3S version.

Started this on May 4th, 2021.  Only the printed parts were needed, all other parts were already available through sourcing form a.o. Ali.  I printed everything in ABS, mostly red.  For this I used 2 machines: The Twotrees Sapphire pro with enclosure for black ABS and the Voron 2.3 (300) for red ABS.

The motherboard that is also in the Ender3, SKR mini E3 V2.1.  I used this setup to test the MMU hard- and software together with the SKR mini E3 motherboard
The MMU2S on top of the Ender3, just next to the 6mm belt that connects both Z-leadscrews
The bondtech Prusa MK3S hotend/extruder combination, mounted on a 2020 mounting plate for the Ender3

There is a firmware version for the SKR mini E3 V2.1 on Github that makes use of the MMU2S.  I downloaded this version and uploaded it to the board via visual studio code maker, all works well in the test setup. Some tweaking was needed in configuration.h and in the advance config, since I am using the S-version of the MMU2 and the filament sensor was not standard ON. And- it appears that the communication port needs to change to the 2nd port. You can see it all at the Reddit page, the additional changes to the published config files are these (thnx to fixel112):

Excerpt from Configuration.h:

#define SERIAL_PORT -1

#define SERIAL_PORT_2 2 <————— This has been the issue. Uncomment that line.

#define BAUDRATE 250000

Excerpt: Configuration_adv.h

#if ENABLED(PRUSA_MMU2)

// Serial port used for communication with MMU2.

// For AVR enable the UART port used for the MMU. (e.g., mmuSerial)

// For 32-bit boards check your HAL for available serial ports. (e.g., Serial2)

//#define MMU2_SERIAL_PORT 2

#define MMU2_SERIAL MSerial2

//#define MMU2_RST_PIN 23

// Enable if the MMU2 has 12V stepper motors (MMU2 Firmware 1.0.2 and up)

//#define MMU2_MODE_12V

// G-code to execute when MMU2 F.I.N.D.A. probe detects filament runout

#define MMU2_FILAMENT_RUNOUT_SCRIPT “M600”

#define MMU2_DEBUG // Write debug info to serial output

#endif // PRUSA_MMU2

Next is to put everything physically on the Ender, and exchange the hotend/extruder.  Then, the settings for the extrusion lengths will have to be determined.  And- the buffer for the filament between the MMU2S and the filament spools has to be installed. As soon as I have it all properly installed, more pictures will follow!

I discovered that the dual display I now use for the Ender3 will only work for Marlin LCD and no longer for TFT, since the serial TFT pins will be used to drive the MMU2S unit.  I exchanged the TFT/LCD unit with the original Ender3 LCD, I kept this in storage and tested it today with the Ender mini E3 V2.1 , it works very well!

The twotrees SKR Mini E3 V2.1 motherboard is really perfect for the combination with the MMU2S and the new  filament sensor in the new hotend/extruder. The firmware has been updated to include the MMU2S and the AUX’s serial that was previously used for the TFT screen is now in use by the MMU!  It all works!!!

Now the next thing was to get the new extruder, F.I.N.D.A. and the filament sensr to work properly.

That took some time and next on the agenda is the filament management.

I already decided to go with the original Prusa filament box with plates to hold the retracted filament for all 5 spools. The spools themselves will hang at the wall, behind the printer.  I don’t have space for standing spoolholders.  Underneath the spools the filament box with plates gets its place on the wall and from there the 5 PTFE tubes will run to the MMU!

Penta extruder on A30M

Today I received my 5-in, 1-out hotend, non-mixing  air cooled with 1 nozzle and 1 heater//temp sensor.

I will install it on my A30M with the Duet2wifi board+extension board (5-fold with plug-in drivers). The A30M already has independant Z-stepper motors.

The Duet2wifi has 5 stepper ports, and the expansion board also has 5 stepper ports.  X,Y,2xZ, 5 Extruders is a total of 9 so this will indeed fit!

I will make new wiring for the 5 extruder steppers on top of the A30M frame with 5 bowden tubes to the hotend.  Since the hotend is non-mixing, this will be a  simple task to get into config.g.  For the slicer- it will also be easy. Just add the extruders to a total of 5 pieces. Add the correct filaments/temps/ no offset so set offset X and Y to 0..  The work will primarily be in  the tool changing files for T0-T5 where retraction- and extruding  settings will be needed.

Are professional 3d printers overpriced?

For what it’s worth, the articles I write are not only based on my opinion and experience,  common sense is also part of my written content.

In the first place you should ask ourself what you would define to be a professional 3d printer. Is it about price, durability, quality, size, usability, repeatability, speed, portability, cloud-based usage, shared usage, or possibly some other requirement that you find inportant? If you read the world’s professional literature about 3d-printing, it is always about either making one-off products or prototypes for complex (machine, dental, medical) purposes, or it has to do with printing parts in series for a specific branch of industry.  In both cases, the to be printed material is mostly nothing like the hobbyist uses. Professional printing goes from carbon/fiber to stainless steel, ceramics, titanium and so on.  Most professional production printers are in the price range above 30 k Euro.

3d printers from 500 Euro up until 15 k Euro are usually very good and precise at printing with common materials like ABS/PLA/Nylon/PetG, Carbon/wood et cetera and have a higher price tag than standard consumer models due to specific added value like the ability to print really big models, heated chamber, multicolor et cetera.

The X1 160Pro™ is the world’s largest metal binder jetting system and is now shipping to customers. A controlled-atmosphere model of the system, capable of high-volume aluminum and titanium production, will be available in late 2022. (Photo: Business Wire)And- after printing, most of these printed parts need post-processing like sintering for aluminium.

BigRep Pro 3D Printer | KeeraTech
BigRep PRO™

The price for professional 3d printers is a summation of a number of  drivers, like:

  1. Developing / staffing
  2. Developing / materials, software and so on
  3. Tools, offices, warehouse and so on
  4. Patents costs
  5. Price and quality of materials
  6. Production costs
  7. Marketing costs
  8. Post-delivery costs (Service/maintenance)

With the hobbyist’s 3d printers, there is really only one driver for the costs, which is materials and production.  Of course the quality is an issue here because cheap parts of lesser quality will make products of lesser quality. All other drivers from the above list are not required and/or have already been put in the public domain and are therefore not put in the final selling price. With professional 3d printers, the production numbers are usually low, quality high and developing processes are usually lengthy and expensive.  Thus, the price per sold 3d printer will be uplifted a lot from the development related costs. On top of this, the real development of 3d printing is not even starting.  The pioneers that develop printers will have to keep developing over and over again.  Only when professional 3d printers will be in a stable production phase and development is more like tweaking than making large steps, it is possible to see prices drop.

So- to answer the question: No, professional 3d printers are not overpriced. But- they are expensive and are only interesting if you already need products that can be made today with such a specific printer. Think of car parts development, Formula 1- engine developments and so on.  In these industries, it is very expensive to get a mold and rework a rough newly developed product in the conventional way so a 3d metalprinter will fulfill an already existing need.  And the investment will pay back very quick due to the fast production times. And- the engineers that design a part can just use their existing tooling to make designs  for 3d printing.

independant Z-axis with FLY-CDY-V2

I replaced my Duet2wifi with the Mellow’s FLY-CDY-V2 motherboard

My cloned Duet2wifi MB that was running in my I3 bear suddenly refused to start up any longer, so I decided to put my recently purchased Mello FLY-CDY-V2 motherboard in the I3 bear printer.  Up to now, the makerbase Duet2wifi clones keep working properly and all other clones die on me…

During the replacement process I encountered the following issues:

  1. The microSD card sleeve on the board was loose on 1 side. I noticed that the board just got in a frozen status now and then.  The solution I finally discovered was that the microSD card holder had to be soldered back to the board, so the SD card made better contact with the little metal parts inside the holder.  Since the repair, no problems anymore!
  2. The connectors of the Fly vboard are standard X254 connectors, which I prefer.  But, the Duet uses propriatary ones so I had to replace all connectors.  But, I shortened all cables in doing this so I now have a very neat looking etup.
  3.  I had to print a new case for this board. I found only 1 available version that also had a fan in the cover.  Slick and well ventilated.  Available on Thingiverse!
  4. The available help on internet like Github pages are all well documented but you must be certain to choose the V2 version of the board for firmware and so on since the FLY-CDY (without V2) is a completely different board with another processor (LPC).  be aware that things are not comparable between the two boards.  The V2 is not just an upgrade!
  5. The rest on the board is quite clear with regards to usage and placement. All self-explainatory.
  6. The only way to connect your paneldue is via the serial 4-pin connector.  The block cables don’t work ‘as-is’.  The paneldue works flawless.
  7. The firmware and DWC software works very well on this STM32-based board. Also updating works flawlesssly.
  8. The difference that matters most to me is some little issues like different naming conventions, pin naming differences between the 2 boards and so on.  Nothing very difficult but is makes it impossible to swap your configs between the boards without some editing.  I would thing=k that cloning should be done more reliable, that would make the board sell better imho.
  9. There is no breakout/expansion port.  Due to the chosen processor, the potential of the Due2wifi with the many expansion possibilities is niot available on the CDY-FLY-V2.
  10. What you do get on the FLY-CDY-V2:
    1. Neopixel port up to 60 WS2812 LEDS (10 max or more with seperate 5V PSU)
    2. max 4 heaters ( 1 bed, 3 other) 
    3. max 4 temp sensors (1 bed, 3 others)
    4. max  3 controllable (PWM) fan outputs
    5. max 6 steppers with any sort of (pluggable) drivers (UART only, no SPI)
    6. max 6 end- (or other) switch inputs
    7. 12-36 Volt power input
    8. BLtouch port fully functional
    9. wifi unit
    10. DWC webbased DUET2wifi controllable
    11. Laser port
    12. A limited number of controllable GPIO pins are available on the EXP2 and EXP 1 port, this could be used for driving accessories like magnets, valves, extra LED’s and so on (via uplifters/Mosfet boards)
    13. Jumper for setting the power to the min/max switches at VCC or 5V (choose 5V!!)
    14. If you want, the option to have PT100 chip installed gives you 1 input for PT100
    15. The Duet2wifi firmware suite is available for this board through a specific development Github page, and as long as this is maintained updates for the board’s reprap firmware and DWC are available.

Dual carriage I3 Duet2wifi build and Config files

My dual carriage I3-bear based 3d printer is working very well. On this page I will share my latest configuration files, my build experiences like the used STL’s , schematics and so on.  Hope you enjoy!

The config.g for this build and the Duet2wifi is HERE

The Sys directory for the dual carriage build and Duet2wifi is HERE

The Macros directory for the dual carriage build and Duet2wifi is HERE

The build plan for the 2040 extrusion frame is HERE

2.1 version Prusa i3 MK3/MK3S Bear Z Extended 459mm Black kit 2040  Extrusion Anodized After Cut Prusa i3 MK3 Bear Profile Frame|3D Printer  Parts & Accessories| - AliExpress

The STL files for the X-axis carriages and carriages are HERE

All other needed STL files for the printer are HERE

The Duet’s case and 4.3 inch Paneldue’s case are HERE

The page of the working printer is HERE

The build plans for the electronics and Duet2wifi wiring schemes are HERE

Please donate $1 to my paypal account if you use (parts of) my developed materials so I can continue to share nice stuff for you to download

 

FLY CDY V2 SDcard content download

Since the FLY_CDY_V2 STM32 board comes without any firmware installed, I made a simple link for you to download and extract everything you need to a 2-16GB microSDcard. 

Just download, extract, burn as-is to SD and plug it in the board, fire the board up and all works!

Make sure you follow the guideline HERE for getting attached to the board via wifi by using a USB cable and YAT terminal on your PC to get the home wifi SSID and Password programmed to ROM into the board, AFTER you installed firmware by putting in the SDcard and firing it up.

The settings in config.g at the SDcard are made for a Cartesian XYZ machine with triple extruder.  This can all be changed to fit your build in config.g. 

For a delta, use THIS DUET2wifi DELTA config.g and change the pin_name of bed heater  according to the FLY_CDY_V2 name convention (thus: use bed instead of bed_heater).  

For more info about the board and connecting to the electronics, steppers, endstops, filament sensors, BLTouch, Neopixels etcetera go HERE

Please donate $1 to my paypal account if you use (parts of) my developed materials so I can continue to share nice stuff for you to download

 

Cheers,

 

Jan Griffioen

Mellow FLY-CDY-V2 motherboard

recently (3-2021) I have been setting up my new 3d printerboard from Mellow, an STM32 board that is named FLY CDY V2. It is fully compatible with Duet2Wifi and also uses its wifi-based 3d printer management system.

The config file I made for this setup is HERE

The FLY_CDY_V2 board comes completely empty so I added the firmware.bin in the /sys directory, after I had an empty SD card filled with the clean reprap directories and -files.

Next to the firmware.bin. also a board.txt is required to be available in /sys with some settings, with the following content:

//Config for fly-CDY
board = fly_cdyv2
led.neopixelPin = D.15;
//wifi pins
8266wifi.espDataReadyPin = E.10;
8266wifi.TfrReadyPin = E.12;
8266wifi.espResetPin = E.11;
8266wifi.serialRxTxPins = { D.9, D.8 };
heat.tempSensePins = { B.1 , A.3 , C.4 , D.14}; be aware that D.14 is not a temp pin but a heat pin, is this wrong??
stepper.numSmartDrivers = 6;
serial.aux.rxTxPins = {A.10, A.9};

This board.txt is already OK for 2209 drivers and for the use of the neopixels output.

In the pdf that is provided by Mellow on the Github page for the reprap STM32 boards, section FLY-CDYV2, everything is explained as to get wifi up and running,  configure config.g et cetera.  

In my config.g everything needed to work properly is already done, as is with my board.txt.

I made the config for a Cartesian printer with single X,Y,Z steppers and a triple hotend with 3 extruders, 1 heater and 3 nozzles.
Included is: Neopixels, BLTouch, 3 filament sensors on the X,Y- and Zmax inputs, active fans for hotend tool on fan1 and object on fan0
If so desired, sensorless homing is possible with the correct driver boards. In this version, 3 optical endstops have been used on inputs xmin, ymin and zmin.
Retraction is set OFF in this firmware by default, but may be swiched ON to make the triple hotend drip less (2 mm retract and -0.5 extrude without Z-hop), do experiment with these settings!
Please be aware that some pin names for the FLYCDYV2 board differ form the Duet’s naming convention like “bed” versus “bed-heater” et cetera.
Plus, some typical Duet2wifi extensions are NOT available like the GPIO bus.
The FLYCDYV2 has some interesting standard extra’s like the BLTouch connector with power, driver pins and Z probe pins, the Neopixel connector AND the 6 driver slots and 3 extruder heaters/sensors/fans!
It is quite simple to change this setup to a dual Z axis with independant Z-motors and either single extruder or a dual setup, single or dual nozzle, mixing or non-mixing.
Please see my complete ready-to-go config directory setups for this board HERE to get you  started! 

Please donate $1 to my paypal account if you use (parts of) my developed materials so I can continue to share nice stuff for you to download

 

Dual carriage I3 with Duet2wifi

My last build from scratch is the dual carriage I3-based printer as shown in the below picture, in the building phase.  This printer can be used either for 2 colors or for printing with soluble support PVA filament.

Get my build plans and Configuration files for Duet2wifi HERE

The box at the left rear is for the Duet2wifi board.  The 24V fan-regulated power supply is already positioned at the rear,  right side.

The greatest challenge with this build was the settings for the dual tools.

It took 2 months before I got it correct working with both PLA and/or Petg.

As with my previous dual color dual nozzle builds, the basics is very simple. Just define 2 tools with 2 heaters, 2 temp sensors, 2 fans et cetera.

I already envisioned the approch with the slicer(s): All offsets are done ONLY in firmware, NOT in the slicer! As far as the slicer(s) is/are concerned, the nozzles of Tool0 and 1 are at the same (X0/Y0) offset.

For the Duet, the only addition in the slicer is an M0 command as stop command for the printer.  Define 2 nozzles of 1.75mm without any offset and you’re done in the slicer.

Then agin, you will need to set everything in your config.g at the tool section like XYZ offset and so on.

I decided to get T0 as reference, and set everything to 0 there. X=0, Y=0 and Z=0.  Then, measure the differences at T1 versus T0 with calipers to start with and inport these values in the T1 toolsection in config.g.

Start a testprint and measure what to amend, take little steps and the metrics are done!

But- the hard part is- as I experienced- to get good prints without blobs and unexpected stringing, both incoming as outgoing (into and out of the printed object(s).

In the end, I just took the same approach as with the tool settings: As little as possible retraction settings in the slicer and all except the basic print retractions are now in the configuration files that are called upon Tool changes tpre.g,  tfree.g and tpost.g (for T0 and T1).

This means that you can play with retracting and extruding of filament length and speed directly at, during and after Tool changes.  And- in my experience it is all affected by the type of filament you use and the temperature you are at with the hotend. Also, the fact whether you use a lower temperature during waiting has great impact.

In my experience, you should finetune the config settings for the mentioned settings per object and per type of filament.

Therefore, I decided to used this printer for only 1 goal and make the settings perfect to accomplish this goal.  Right now, I have optimized this printer to print 1) PLA from 123print in the Netherlands, of a specific type and 2) PVA from the same supplier.  This gives me the possibility to print complex objects with soluble supports and it works extremely well at doing this!

PM: I also added LED lights on top of the printer as an integrated feature.  This makes use of a heater pin as GPIO (with a M42  P [pin] S[value intensity]) command), like the solenoids that I use to catch the carriages T0 and T1. To come from the 3.3V and max 1mA from the GPIO pin to the required 24Volts, I used small mosfet boards.  All programming is done in the Duet’s config and macro files, view the below example of my stop.g file which is called from the slicer’s stop setting: M0.

; stop.g
; called when M0 (Stop) is run (e.g. when a print from SD card is cancelled)
; Also called by slicer end gcode by M0
;
M400 ; Finish move queue
M117 Cool down ; Update the LCD screen with “Cool down”
M83 ; Extruder relative mode
G1 E-2 ; Retract filament 2mm for both extruders !!
M106 S255 ; Fan at 100 to cool nozzle and bed
M104 S0 T0 ; Extruder T0 heater off
M104 S0 T1 ; Extruder T1 heater off
M140 S0 ; Bed heater off
G28 X ; Home X
M220 S100 ; Set speed factor back to 100% in case it was changed
M221 S100 ; Set extrusion factor back to 100% in case it was changed
M42 P4 S0 ; Magnet T0 off
M42 P5 S0 ; Magnet T1 off
M104 S41 T0 ; set extruder T0 to cool down
M104 S41 T1 ; set extruder T1 to cool down
;M568 R41:41 S41:41 ; set standby and active temperatures for tools 0 and 1 (or single M568 T0 R41 S41)
M116 ; wait for Tools actions as specified in above M568 instructions
G90 ; Absolute positioning
G1 Y200 ; to get objects removed easier, move bed forward
M106 P0 S0 ; Fan L object T0 off
M106 P2 S0 ; Fan R object T1 off
G28 X ; Home X
M84 ; Steppers off
M98 P/sys/ledflash.g; Perform execution of ledflash.g in specified directory
M42 P6 S0.008 ; Led light setting almost OFF
M117 Jantec=done! ; Update the LCD screen with “Jantec=done!”

G1 X5 Y5 ; Move to corner
M140 S{print_bed_temperature} ; Set bed temp
T1 ; Select extruder 1 (or 0 depending on how your printer is set up)
M104 S{print_temperature} ; Set extruder temp
M116; Wait for temperatures

 

Please donate $1 to my paypal account if you use (parts of) my developed materials so I can continue to share nice stuff for you to download

 

Geeetech A30M rebuilt with Duet2wifi

 

The motherboard of my Geeetech A30M was broken, due to a defective Y-axis motor as I experienced later.  I ordered a new Smartto motherboard from Geeetech, installed it and it broke down again, due to the shortcut in the Y motor. Very strange defect since the smartto board uses plug-in drivers.  However, unrepairable and a real pity to now be stuck with 2 smartto boards without any use for them with both having a defect on the Y output.   Exchanging drivers did not help, cables exchange did not help either…

the original smartto motherboard

After replacing the Y-motor,I decided to go for a complete rebuild of the A30M.  In the old files you can still see the original smartto experiences on the A30M HERE.

Above, the movie of the first Duet2wifi experiences and the Chimera hotend.  Later, I decided to make the extruders direct-driven.

Get my  A30M config.g for reprap 3 Duet2wifi  for the original mixing hotend (1 nozzle, 2 extruders).

Get my hotend to motherboard cable and pin assignment  via the following link: 2020 12 09 improved A30M Extruder toolhead cable to board after adding dual hotend dual nozzle dual heater and dual temp sensors

The chimera hotend, combined with dual direct drive bondtech extruders

The inside of the box of the A30M Geeetech 330x330x350mm 3d printer with the PanelDue, Duet2wifi and the 5 ports extension board attached to the Duet

This is the Paneldue 4.3 inch touch panel as mounted in the A30M case, with a very slim bezel since the Paneldue is mounted flush with the front of the A30M case.

2GSpro Delta rebuilt with Duet2wifi reprap 3.2.2 auto config G32

Delta 2GS Duet2wifi

April 2021: My first 3d printer I bought back in 2014 finally got the Duet2wifi motherboard installed with 2 new extruders, piëzo Z-probe, new hotend, cabling, power supply, 24 Volt hotbed and 24 Volt fans.

The original motherboard is based on an Arduino Mega and had trouble keeping up with the latest firmware versions.

Besides that, I really want all my printers to have a sturdy wifi accessibility to manage them remotely.

The Duet has proved to be both reliable as easily configurable.

Paneldue 4.3 inch for Delta 2GSpro

The electronics has been rebuilt to 24 Volt and two Bondtech extruders have been installed, 1 left- and 1 right handed version. But- for the time being only 1 hotend got installed. I will install a properly working mixing hotend later. Or maybe a dual switching hotend, just to try it out.

Underneath the G2S pro delta with Duet2wifi board

One of the advantages of the Duet is the reprap firmware.  With a delta, reprap 3.2.2 has a G32 command which automatically configures all the difficult settings for the Delta printer like rod lenghts, endstop settings et cetera.  Provided that you have a bed.g file with enough 6 or 7-factor probe points.

I used the heater pins of the 2nd extruder as PWM power supply for my LED toplights.  If I ever install a dual hotend with 2 nozzles, I will add a Mosfet board  that converts 3.3 Volt to 24 Volt and then I will use a spare bed heater pin (most likely GPIO heater pin 4 or five) for the LED top light.  This works very well on all my other Duet boards where I connected LED lights to the printer . The LED’s are controlled via the PanelDue touchscreen (macros) and via the start/stop files.

All you need to measure yourself to  get the Delta configured is the Z-probe offset versus the nozzle position and the rest will be done through the G32 command.  The sequence is:  Perform G28, G32, M500, G29 and you’re done.  You will have to get the bed.g file for the G32 command to work as such from the escher3d website.  I used the 7-factor version.

PS: You don’t need to calibrate G29 at every print.  Please look at my homing file for the delta where-, after homing X-Y-X=Z to the top I only have a Z-probe G30 at the bed’s surface.  I will attach my final config.g code and all needed additional code for the delta with reprap 3.2.2 so you can benefit from my config.g for the Duet2wifi learnings HERE.  Cheers, Jan

Delta 2GS Duet2wifi
The full Delta2GSpro printer with topLED’s

PM: Things that are really needed: The Z-probe MUST be as close to the nozzle as  possible.  I had a BL Touch earlier which was positioned to the side of the center carriage and this never worked as supposed to.  It was positioned at 45 mm to the right and 25 mm to the front of the nozzle and this was clearly too far away to get a decent probing for G32.  With the BL Touch I never got good Delta basic settings.  The Piezo nozzle is a slim 6mm diameter version and has been strapped to the cold end of the E6D with a set of 1mm wires  and works perfect.

VORON 2.4 20″x20″x20″ and DUET2WIFI

Get the documentation, specs, config.g, macros and build docs

LEES IN HET NEDERLANDS

After my succesfull buildproject of a Voron 2.4 3d printer in the fall of 2020, I still wanted a really big 3d printer with a print surface of over 20x20x20 inch.

Imagine to have a print of more than double the size compared to the below picture!

During the build and at using the Voron 2.4 printer, I found the documentation on the hardware build really excellent.  But, the electronics part was scattered around several places, and although the Klipper implementation is very good I have experienced that the combination of 2 SKR 1.4 turbo motherboards with an Octopi controller does not provide enough operational stability to me. And- I feel the need to control more settings than I can do with the Klipper solution.  I think I probably am just more into the Duet and the reprap solution than the Klipper one, due to previous positive Duet – and MKS reprap experiences.

In a couple of previous builds I used a Duet2wifi, and I also experienced the add-ons for Duet2 like driver boards, PT100 boards and more hardware that is also very well implemented in the new RRF3+ firmware.

Reasons enough for me to choose the Duet2 and the 5-ports expansion board , or possibly an additional Duex board for my new to build Voron 2.4 ‘big 3d printer’.

At this page, I will share my progess on this build.

I have all required hardware laying around and since I already built a Voron 2.4, I will first focus on the electronics.  For the hardware, I still need the plexiglass sides, top and front doors.  I  do have all extrusion, bed, bed heater 230V, linear rails, all printed parts and so on, neatly stored at home.

So, I am setting up the electronics to know beforehand that everything works well.  I don’t want to start building the hardware and find out afterwards that my Duet2wifi will not do the job I want it to do.

Yesterday (October 4th,2020) I put the electronics and config.g together. I used:

  • Duet2wifi board with 24V PSU and 4.3 inch TFT/LCD
  • 5-port expansion board with 4 plug-in 2209 drivers V3.0
  • Z-switch mechanical
  • X-and Y end switches (hall-effect)
  • Hotend 24V with NTC connected including tool’s fan (I am missing the PT100’s interface board, have ordered one but I did this before so should be no problemo)
  • Hotbed simulated with another hotend including NTC
  • Stepper motors connected to X(0),Y(1) and 1 x  stepper on the expansion board Z(5) (Driver5)

The Duet2wifi board is a Chinese MKS clone with electronics version 1.02 which works fine.  The expansion board is also a Chinese one, but this is a bare-bone  implementation of the 5-ports driver add-on board that comes without drivers.  the nice thing about this add-on board is that drivers can be plugged in directly.

The Duet2 came with firmware 2.1 installed.  To get to FFR3.1, you must first install 3.0 and after this, you can move to 3.1…  be aware!

After updating the paneldue and the Duet2wifi board, I activated the wifi and put the ssid and PW in. (This procedure goes via USB between PC and Duet, using a terminal emulator like YAT)  This is a bit tiresome but given the security you get from it, I feel it is OK.

The settings that are needed to get the Chinese expension board to work are not too difficult.  Add the Z-drives, and change some other settings. On top of this page, you can download the latest doc with all info I have, and a direct download to the adapted config and macros is available in the documentation.

The rest of the build including photos will be here later!

Update 3-2021: I recently built 2 other 3d printers using Duet2wifi boards: a cartesian I3 with independent extruders and a Delta 2GS.  Not much time to work on the big Voron.  I also just rebuilt my Geetech A30M  (330x330x400mm build size) from the smartto board to Duet2wifi, Check ik out on this site!

I will probably not build the big Voron 3d printer after all,  and if I don’t, I will rebuild my existing Voron 2.4 300×300 from Klipper, octopi and 2x SKR1.4 to Duet2wifi+Duex.  That will be interesting and achievable.

Since I am currently running 10 different 3d printers, my space is getting cramped in the house. I don’t want to expand into another room.  One should be enough. Having more printers gives me the best possible fit of a specific  filament type per printer.

The Voron is due to its perfect prints with ABS really only used for/with ABS or nylon.

The I3Bear dual carriage works best with dual PLA or PLA&PVA.

The Prusa mini works perfect with PETG

The I3Bear solo goes perfect with PETG or PLA.

The A30M & its mixing extruder goes perfect with PLA and/or PETG

And so on….

Circular clock WS2812 & Arduino nano

LEES DIT ARTIKEL IN HET NEDERLANDS

In the above video you see all required parts for the elctronics.  An arduino Nano, a time module LS3231 with battery back-up and a 4-parts ring each with 15 WS2812 LED’s that provide a 160mm 60 LED units clock.  You can build it as an open built unit as shown above with wire strings or in a 3d printable slim case that I developed.  See the pictures below.

For building this nice precise clock, you can use my design files for the housing on any 3d printer that has a horizontal bed size of at least 165x165mm.

Grab both the print STL’s . HERE. from the Prusa shared site where I uploaded these designs. (If the link breaks, search on the prusa site for ws2812 circular arduino clock).

OR get the STL file for the clock’s FRONT from my website HERE

AND get the STL file for the clock’s REAR from my website HERE

One STL is for the rear and includes the Nano box, the other is for the front face of the clock.  Position the rear STL 180 degrees (so up goes down) in your slicer, so both the box and the LED housing are at Z-0 level, i.e. facing down at the same horizontal level.   The front can best be printed with the flat side down.  ABS is not recommended since it has less stiffness, but will probably also work.  For me PETG or PLA works best.

Use white filament for the front part, the rear can be any color you like.

In the circle the 4 WS2812 LED segments are positioned in 1 full circle of about 160mm.

Once you have the rear electronics connected, the front will slide snug over it. No glue required.  But the LED ring can best be glued in 4 places with a drop of hotglue to the base of the rear housing.  Best to do this after you are sure everything works OK.

The LED parts are available on a.o. banggood , aliexpress and so on, search for 60LED circle WS2812 that has the 160 mm outer diameter.

Each LED represents a dot either for seconds, minutes or as hour indicator.

The colors detemine the function.  Blue is also used as Quarter indicator with less intensity, to have a feeling of positioning for the other LEDS when it is dark.

Please look at the video above of the ‘open’ demo model to understand how it works.

Below you can find the Arduino code for the used Nano3, as-is.  it works for me, and in the code you will also find all required electrical connections and the used Time module’s spec.

When connected to your PC, you can program the Arduino and via the serial interface you can afterwards change special settings of the clock like brightness, special quarter dimlit indicators, et cetera.  it’s all in the code below.

The controls can be sent via a serial interface with the usb input of the Arduino, via a terminalprogram like YAT or with the Arduino IDE program’s interface.

The commands are:

  • f; fader OFF
  • F; fader ON
  • m (number); dim the 4 blue marker LED’s with value (number)
  • S; sync to RTC time
  • s; sync to System time (computer)
  • t (time); change system time to:
  • b; brightness of all non-marker LEDs

Please donate $1 to my paypal account if you use (parts of) my developed materials so I can continue to share nice stuff for you to download

Hope you will have a good build!

Cheers,

jan

The Arduino code, to be used for programming the Arduino Nano3 is available at the bottom of this post as plain text to be imported in an empty arduino file (with copy and paste).

Take care to use only the libraries and time module that are specified in the code!  The used time module is of the better generation that holds the time very well, also on standby.

When connecting the wires between the neopixel segments, the arduino and the time module, use a temperature-regulated soldering tool.  Use a fan when you are soldering and don’t inhale the toxic gases while soldering.

The Arduino code is shown below, to be imported in Arduino in an .ino file.  With Arduino, you must compile the code to get the Arduino flashed with the program.  If you want to do this easier, you can make use of the binary file I already compiled for both Arduino nano versions (with full memory and with half memory). Both Arduino nano types will be OK to use for this build, but they each require specific firmware.

The last part of this post is the Arduino program for the clock:

 


/**
* NeoClock
*
* Clock using 60 WS2812B/Neopixel LEDs and DS3231 RTC
* Small changes and updates made by jan Griffioen, Amsterdam Europe 2018-2021
* Libraries needed:
* * Adafruit NeoPixel (Library Manager) – Phil Burgess / Paint Your Dragon for Adafruit Industries – LGPL3
* *
* * Arduino Timezone Library (https://github.com/JChristensen/Timezone) – Jack Christensen – CC-BY-SA
* * Time Library (https://github.com/PaulStoffregen/Time) – Paul Stoffregen, Michael Margolis – LGPL2.1
*/

#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif

#if defined(ESP8266)
#include <pgmspace.h>
#else
#include <avr/pgmspace.h>
#endif

/* for software wire use below
#include <SoftwareWire.h> // must be included here so that Arduino library object file references work
#include <RtcDS3231.h>

SoftwareWire myWire(SDA, SCL);
RtcDS3231<SoftwareWire> Rtc(myWire);
for software wire use above */

/* for normal hardware wire use below */
#include <Wire.h> // must be included here so that Arduino library object file references work
#include <RtcDS3231.h>
RtcDS3231<TwoWire> Rtc(Wire);
/* for normal hardware wire use above */

#include <TimeLib.h> //http://www.arduino.cc/playground/Code/Time
#include <Timezone.h> //https://github.com/JChristensen/Timezone

#include <EEPROM.h>

//Central European Time (Frankfurt, Paris)
TimeChangeRule CEST = {“CEST”, Last, Sun, Mar, 2, 120}; //Central European Summer Time
TimeChangeRule CET = {“CET “, Last, Sun, Oct, 3, 60}; //Central European Standard Time
Timezone CE(CEST, CET);

TimeChangeRule *tcr; //pointer to the time change rule, use to get the TZ abbrev
time_t utc;

#define PIN 5

unsigned long lastMillis = millis();
byte dimmer = 0x88;
byte hmark = 0;

byte ohour=0;
byte ominute=0;
byte osecond=0;

boolean fader=true;

Adafruit_NeoPixel strip = Adafruit_NeoPixel(60, PIN, NEO_GRB + NEO_KHZ800);

void setup() {

Serial.begin(57600);

strip.begin();
strip.setBrightness(50);

// Some example procedures showing how to display to the pixels:
// colorWipe(strip.Color(255, 0, 0), 50); // Red
//colorWipe(strip.Color(0, 255, 0), 50); // Green
//colorWipe(strip.Color(0, 0, 255), 50); // Blue
//colorWipe(strip.Color(0, 0, 0, 255), 50); // White RGBW
// Send a theater pixel chase in…
//theaterChase(strip.Color(127, 127, 127), 50); // White
theaterChase(strip.Color(127, 0, 0), 50); // Red
//theaterChase(strip.Color(0, 0, 127), 50); // Blue

//rainbow(20);
rainbowCycle(2);
//theaterChaseRainbow(50);

strip.clear();
strip.show(); // Initialize all pixels to ‘off’

Rtc.Begin();

Rtc.Enable32kHzPin(false);
Rtc.SetSquareWavePin(DS3231SquareWavePin_ModeNone);

if (!Rtc.GetIsRunning())
{
Serial.println(“Rtc was not actively running, starting now”);
Rtc.SetIsRunning(true);
}

if (!Rtc.IsDateTimeValid())
{
// Common Cuases:
// 1) the battery on the device is low or even missing and the power line was disconnected
Serial.println(“Rtc lost confidence in the DateTime!”);
}

byte eechk = EEPROM.read(0);
if(eechk == 0xAA) { //Assume this is our config and not a fresh chip
dimmer = EEPROM.read(1);
hmark = EEPROM.read(2);
fader = EEPROM.read(3);
}

timeSync();
}

void calcTime(void) {
utc = now();
CE.toLocal(utc, &tcr);
ohour = hour(utc);
ominute = minute(utc);
if(osecond != second(utc)) {
osecond = second(utc);
lastMillis = millis();

if(ominute == 0 && osecond == 0) {
//Every hour
timeSync();
}
}
}

void addPixelColor(byte pixel, byte color, byte brightness) {
color *= 8;
uint32_t acolor = brightness;
acolor <<= color;
uint32_t ocolor = strip.getPixelColor(pixel);
ocolor |= acolor;
strip.setPixelColor(pixel, ocolor);
}

void drawClock(byte h, byte m, byte s) {
strip.clear();

addPixelColor(m, 1, dimmer);

if(hmark > 0) {
for(byte i = 0; i<12; i++) {
addPixelColor((5*i), 2, hmark);
}
}

h %= 12;
h *= 5;
h += (m/12);
addPixelColor(h, 2, dimmer);
// 0x RR GG BB

if(fader) {
byte dim_s1 = dimmer;
byte dim_s2 = 0;
byte px_s2 = s+1;
if(px_s2 >= 60) px_s2 = 0;
unsigned long curMillis = millis()-lastMillis;
if(curMillis < 250) {
dim_s2 = 0;
dim_s1 = dimmer;
}else{
dim_s2 = map(curMillis, 250, 1000, 0, dimmer);
dim_s1 = dimmer – map(curMillis, 250, 1000, 0, dimmer);
}

// Add blue low intensity dots for 12(0),3, 6 and 9 O’çlock to verify where the clock is positioned..
addPixelColor(15, 128, 10);
addPixelColor(30, 128, 10);
addPixelColor(45, 128, 10);
addPixelColor(0, 128, 40);

addPixelColor(s, 0, dim_s1);
addPixelColor(px_s2, 0, dim_s2);
}else{
addPixelColor(s, 0, dimmer);
}

// add a background color
// setBrightness(Serial.parseInt());
// uint16_t j;
// for(j=0; j<60; j++) { // 1 cycles of colors on wheel
// strip.setPixelColor(j, Wheel(((j * 256 / strip.numPixels()) + j) & 255));
// }

strip.show();
}

byte rounds = 0;

void loop() {
calcTime();

if(rounds++ > 100) {
Serial.print(ohour);
Serial.print(“:”);
Serial.print(ominute);
Serial.print(“:”);
Serial.print(osecond);
Serial.println(“(C)JG-2020”);
rounds = 0;

}
//rainbow(21);
if (osecond == 59){theaterChase(strip.Color(0, 0, 127), 40); }// Blue; }
//if (ominute == 59 AND osecond == 59){theaterChase(strip.Color(0, 127, 0), 50); }// Green}
//if (ohour == 11 AND ominute == 59 AND osecond == 59){theaterChase(strip.Color(127, 127, 0), 50); }// Green}
else {drawClock(ohour,ominute,osecond);}

delay(10);

chkSer();
}

void timeSync(void) {
RtcDateTime dt = Rtc.GetDateTime();
setTime(dt.Hour(),dt.Minute(),dt.Second(),dt.Day(),dt.Month(),dt.Year());

Serial.print(“Synced to: “);
Serial.print(dt.Year());
Serial.print(“-“);
Serial.print(dt.Month());
Serial.print(“-“);
Serial.print(dt.Day());
Serial.print(“-“);
Serial.print(dt.Hour());
Serial.print(“-“);
Serial.print(dt.Minute());
Serial.print(“-“);
Serial.println(dt.Second());
}

void timeSave(void) {
utc = now();

RtcDateTime store = RtcDateTime(year(utc), month(utc), day(utc), hour(utc), minute(utc), second(utc));
Rtc.SetDateTime(store);

Serial.print(“Synced to: “);
Serial.print(year(utc));
Serial.print(“-“);
Serial.print(month(utc));
Serial.print(“-“);
Serial.print(day(utc));
Serial.print(“-“);
Serial.print(hour(utc));
Serial.print(“-“);
Serial.print(minute(utc));
Serial.print(“-“);
Serial.println(second(utc));

}

void setBrightness(byte brightness) {
dimmer = brightness;
}

void chkSer(void) {
unsigned int iy;
byte im,id,iH,iM,iS;

if(!Serial.available()) return;

switch(Serial.read()) {
case ‘b’:
setBrightness(Serial.parseInt());
Serial.print(F(“Brightness changed to: “));
Serial.println(dimmer);
EEPROM.put(0, 0xAA);
EEPROM.put(1, dimmer);
break;
case ‘t’:
iy = Serial.parseInt();
im = Serial.parseInt();
id = Serial.parseInt();
iH = Serial.parseInt();
iM = Serial.parseInt();
iS = Serial.parseInt();
setTime(iH,iM,iS,id,im,iy);
Serial.println(F(“System time changed”));
break;
case ‘f’:
fader = false;
EEPROM.put(0, 0xAA);
EEPROM.put(3, 0);
Serial.println(F(“Fader off”));
break;
case ‘F’:
fader = true;
EEPROM.put(0, 0xAA);
EEPROM.put(3, 1);
Serial.println(F(“Fader on”));
break;
case ‘m’:
hmark = Serial.parseInt();
EEPROM.put(0, 0xAA);
EEPROM.put(2, hmark);
Serial.println(F(“HMark changed”));
break;
case ‘s’:
timeSync();
Serial.println(F(“Synced RTC to System”));
break;
case ‘S’:
timeSave();
Serial.println(F(“Synced System to RTC”));
break;
default:
Serial.println(‘?’);
}
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}

void rainbow(uint8_t wait) {
uint16_t i, j;

for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 25));//255
}
strip.show();
delay(wait);
}
}

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
uint16_t i, j;

for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
for(i=0; i< strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
}
strip.show();
delay(wait);
}
}

//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
for (int j=0; j<4; j++) { //do 4 cycles of chasing
for (int q=0; q < 3; q++) {
for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, c); //turn every third pixel on
}
strip.show();

delay(wait);

for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, 0); //turn every third pixel off
}
}
}
}

//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
for (int j=0; j < 256; j++) { // cycle all 256 colors in the wheel
for (int q=0; q < 3; q++) {
for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on
}
strip.show();

delay(wait);

for (uint16_t i=0; i < strip.numPixels(); i=i+3) {
strip.setPixelColor(i+q, 0); //turn every third pixel off
}
}
}
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r – g – b – back to r.
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 – WheelPos;
if(WheelPos < 85) {
return strip.Color(255 – WheelPos * 3, 0, WheelPos * 3);
}
if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 – WheelPos * 3);
}
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 – WheelPos * 3, 0);
}