DIY 3D printer part 8 - making a UNIPOLAR stepper motor driver for my 28BYJ-48 based extruder!
Vložit
- čas přidán 7. 09. 2024
- Get 10 Arduino sized PCBs for $5 at www.pcbway.com/ ! In this episode of my DIY budget 3D printer we're building a custom, GRBL and Marlin compatible, UNIPOLAR stepper motor driver to control the 28BYJ-48 based extruder!!! Chronic UniStep as I've decided to call it is just as easy to use as the ubiquitous A4988 for bipolar steppers - except it's a better fit for high-impedance unipolar motors like the ones you can salvage from e-waste! If you guys want me to open-source this invention let me know! Also I might have to do a seperate video to explain why you would use a dedicated unipolar stepper motor driver instead of just converting unipolar motors to bipolar like I had planned to do with all of mine...
Here's the test code I used:
Bidirectional speed control potentiometer:
drive.google.c...
Affiliate links* to the ICs and some parts I got for this printer:
10pcs CD4017 decade counter IC (SMD version): s.click.aliexp...
10-20pcs ULN2003A SOP-16: s.click.aliexp...
5pcs A4988 stepper motor drivers: s.click.aliexp...
Cheapy hotend kit: s.click.aliexp...
Arduino mega 2560: s.click.aliexp...
4010 turbine fan: s.click.aliexp...
100k NTC temperature sensor for heated bed: s.click.aliexp...
10m nylon coated fishing line: s.click.aliexp...
Keep in mind I got a few of these items during sale, so the total might well be above $50 now (especially with inflation)
* if you decide to purchase something through an affiliate link I may receive a small commission
-------------------------------------------------------------------------------------------------------
Support this channel on Patreon: www.patreon.co...
Follow me on Twitter for random updates and personal opinions on different topics: @chronic_atronic
Join r/chronicmechatronic for occational peeks behind the scenes, or general project discussion!
Get my best photographic works on Shutterstock:
www.shuttersto...
Or download free stock photos from my profiles on Unsplash:
unsplash.com/@...
unsplash.com/@...
-------------------------------------------------------------------------------------------------------
Additional sound effects from www.zapsplat.com
Should I make Chronic UniStep open source?
Also apologies for the slightly sub-par audio, the cable on my DIY lavalier microphone broke and I didn't have time to fix it, so I had to use the modified $2 AliExpress mic I still had laying around...
Yes!! I would like to have the schematics if possible. I am always salvaging components from dead electronics. Also, Don't know if you know, (maybe for the purpose of the video) but kicad has an awesome BOM addon. I have been following you for only a year; but your channel has a lot of potential, keep up the good work.
Yes, because that could allow others to continue perfecting it.
@@PasquinelOrtiz Thanks, I'll look into how to open source and prepare it for when I get around to making the dedicated video about the driver...
Yes I know about the KiCad BOM but when I tried it it spat out an unwieldy excel spreadsheed that would have looked way too confusing and hard to read in the video, so I quickly put together something easier :)
@@ChronicMechatronic weird, the one in kicad 6 has a nice user interface.
Your videos are a pure joy to an engineer. The act of inventing everything in your designs really shows how many workhours it is needed to make A Thing, and how masterful are you at pulling those workhours
Thanks, I didn't actually use to do complex projects like this more or less until now, and I'm still surprised at what an insane amount of work engineering actually is, especially the CAD design step...
You need to dry your filament. Great video by the way. Thank you!
It's too late most likely. If it gets that brittle the water has normally bonded chemically to the filament. Still worth a try, but you'd likely just need a new spool. Just realized I was necroposting.
About the brittle PLA: Most of the time moisture is the main PLA filaments enemy. By experience I know that like foods, PLA filaments can't be stored a long time. I guess bad molecule chains are the culprit. I run across such annoying surprise with some 3yo (cheap Geeetech) PLA filaments. I've tried to "dry" them in my tiny oven but that didn't fix it. I had to dump a quarter of a thread to get its printable part. Don't buy bundles, some batches have the same issue.
Oh, thanks for mentioning that! The two rolls I bought like three months ago are actually Geeetech brand! Good to know I need to use those...
On the other hand that's insane, the world is drowning in plastic waste and yet we can't store filament lest it degrades? Like, WTF?
@@ChronicMechatronic try a food dehydrator or other filament "drying". Just having some desicant in the bag isn't good enough. And if the vacuum was lost, then moisture would be able to get into the plastic.
@@ChronicMechatronic PLA is a "bio" plastic and not a petroleum-based plastic. It is supposed to degrade over time.
I love custom motor controllers because they allow you to make it just right for you needs
Enthusiasm, humor and self deprecation PLUS skills, make your posts unique and irresistible Ben! One can feel the huge amount of work to get that perfect video editing (a great tempo) and of course to achieve unusual challenges we can't see elsewhere. Thank you Ben!
(FR) ça passe très vite 22 minutes avec toi. Tout y est: le rythme, l'humour caustique, le zoom sur les détails (presque une obsession nipponne) et l'explication de tes choix. à propos, monter les CMS comme tu le fais, défie les tremblements de mains de certains soudeurs.😄 En fait, ta pince est d'une indispensabilité bien pensée. Ton driver de même.
Thanks! Yes, I really struck home with the pacing on this one, when I rewatched before publishing I, too, was surprised at how quickly those 20 minutes passed...
Tweezers are vital when soldering SMD, back when I was 15 I fixed headphone speaker windings with my bare hands, now my hands are way too big and clumsy 😂. Nowadays I can't live without tweezers anyone, in fact, those anti-static ceramic tweezers are my new favorite!
3:06
Brilliant idea!!! I’ve always struggled to make acceptable round parts on the grinder but there you come to save me!!!
This really do deserve more attentions!
if you want your PLA not to be brittle, I would suggest putting it in an air-tight container along with some silica gel packets (the white bag that is inside your filament box. hope this helps!
As the next project i recommend you to make a heating plate for smd soldering, i've already made my own and i suggest you to make the same for save a lot of time.
Anyway nice video as always
Thanks!
Given the troubles I ran into with the heated bed for this printer I'm tempted to just buy one of those $5 PTC aluminium hotplates... How did you go about making yours?
@@ChronicMechatronic
yes, I bought one of those ptc plates from aliexpress, then I made a 3d plastic case (to attach the plate I used cork that does not transmit heat), a pcb for all the electronics (relay, transistors, 220V-5V converter, microcontroller...), added buttons and a display for the various modes (solder, unsolder,...) and showing temperatures.
To follow the temperature curves of the solder paste I used a pid controller libray with relay as the plate exceeds 250C if left connected
At the end the ptc hot plate is the easyest solution
Ps sorry for my english
Great, thanks, I might do something similar then. I definitely need to get into reflow...
BTW your English is great compared to what I sometimes get :)
Thanks for making this kind of video, it's really helpful
No PLA isn't usually that brittle. In fact, it usually has a high elastic limit. You could try drying it out, but I think it's just a crappy brand. I have $19 PLA rolls that I've stored for over a year in the open and they are still almost perfect.
Your PLA has absorbed a lot of moisture and has became old, if you can dry it try that, but I would get some new filament.
OK thanks I'll try, I read the exact same thing when I googled it after finishing the video - tho becoming brittle from too much moisture honestly seems kinda counterintuitive... Fortunately I bought two more spools rather recently, so I can use those to get the printer running till I know what I'm doing :)
This guy is a carpgineer😂 Subbed!
If you have a PIC programmer (PICKit), you could use the PIC12C508A for unipolar stepper driver logic. I'm a fan of using logic gates for simple things, but one of the advantages of using these microcontrollers is that they reduce the complexity of pins (reduce time to solder), in addition to being cheap. The PIC12C508A has 6 GPIO's, 2 can be used for dir and step and the rest for the coils.
Great idea, a microcontroller would also eliminate the lost step issue, the only problem is: I'm no good at programming ☹️
Years ago before I got my first pen plotter to work I tried something very similar with an Arduino pro mini, I wanted it to convert step and dir signals for all three motors, but I couldn't for the life of me figure out how to make it read the pulses reliably. The pulseIn function always ended up blocking the code from doing anything else.
In hindsight I guess I should have used interrupts - but yeah, you see what I mean...
Logic ICs didn't need programming even if it meant more soldering 😅
But since I'm going to make the project open source maybe someone else can contribute the code, then I can concentrate on other things like PCB layout which I'm much better at. Using a microcontroller should also allow to make it small enough to be compatible with standard ramps shields, which would be quite hard to achieve if I have to squeeze two counter ICs onto the board.
@@ChronicMechatronic Yes I know, embedded programming can be quite confusing. I come from a game programming background, and I struggle a lot when trying to program microcontrollers because of the intrinsic relationship with hardware.
You said that you tried to use 1 arduino to control 3 motor signals, in this case you need interrupts because of having multiple inputs/outputs at different timings (like 3 individual step pulses). Now if you control only one motor using one MCU (for that MCU has to be cheap to be worth it) you can use the traditional loop, you would only have to catch in the loop when the 'step' pin goes to rising or falling edge and do the logic for dir and step at this time.
The motor skipping steps when the direction changes might be a problem for the extruder too, not just the x and y axis. This is becuase you won't be able to do retractions.
With the 28BYJ-48 and it's 1:64 gear ratio I'm pretty sure it'll be fine, the driver only skips like 2 steps at most and to retract 1mm the stepper will have to do over a hundred steps easily. Backlash in the gearing will have much more of an impact...
@@ChronicMechatronic Yeah you're right, the retractions might not be perfectly consistent but it will probably be good enough all things considered.
Good enough is the best I can achieve with the current hardware anyway... As I've learned since starting this project there isn't exactly much point in trying to build a 3D printer for the cost of just 2 filament rolls anyway - but hey, sometimes we need to do things just for the sake of doing it, haha.
@@ChronicMechatronic Yeah, unlike X/Y motion the plastic will adapt to the lost steps so the error won't accumulate. It might show up as tiny over/under extrusions in the print, but probably undetectable compared to other sources of extrusion inconsistency.
@@dekutree64 that's what I figured 😅
try with different delays between those changes of direction.. Best regards
Awesome pinch roller!
Sir can you create String Art machine(also called thread art) using this setup...seems easy for you...
To reverse a stepper without losing steps, the step sequence must run in reverse (e.g. when reversing, next step is now previous step). I suspect that since you are using two 4017s, they are not perfectly synchronized in that way (in other words a discontinuity when reversing direction). If you want to do this precisely in hardware, then I think a more elaborate state machine design is needed or maybe you could use a binary up/down counter with the outputs decoded to the desired step sequence. Of course a microcontroller could manage this perfectly in software, but I understand you want it to emulate the interface to the bipolar driver.
Yes, that is exactly the problem, and I also came to the conclusion that a microcontroller would be the best bet at solving it. I looked into combined up/down counters too, but being a lot more expensive, just like an MCU, they kind of defeat the purpose of being able to use something as ubiquitous and dirt cheap as the 4017...
Of course the best possible solution would be to directly code the step sequence into the firmware, then we could do away with all stepper motor drivers and use a few ULN2003s instead, but that's way above my capabilities. So yeah, maybe an attiny13 could do the trick...
@@ChronicMechatronic I agree, an ATtiny + ULN would be a nice compact solution. After watching some of your videos, I'm not sure why you think coding a unipolar step sequence is beyond your capabilities. Still, you could use the "Stepper" library which supports unipolar motors and they can be commanded to run in either direction.
Oh, I meant modifying Marlin to include the step sequence is something I cannot do, coding the Attiny as a motor driver should be no problem
@@ChronicMechatronic Oh, I see what you mean, you were referring to coding the step sequence directly into the Marlin firmware. But I do think you need something with more I/O than the ATtiny since it only has 5 I/O pins and you need 4 outputs to the ULN and at least 2 more for the step & dir inputs.
Yeah, the combined I/O and reset pin had me quite puzzled when I was playing around with the Attiny85 some years ago... But for my next 3D printer in the semi-distant future I want to go with closed loop controlled DC motors anyway, I know there's a few projects like this out there and inkjet printers are way easier to get than anything with stepper motors inside these days.
Fun little project you have ;-)
Awesomse video :)
Thanks!
Hello, when I watched your video, I wondered if there was any chip that could accomplish this. So, I searched on the internet and discovered the DRV8805 chip, manufactured by TI. I thought that by using a chip like this, you wouldn't have to spend as much time resolving the problem. Nonetheless, your video is still excellent and it's a great attempt.
When I have an idea to create a circuit, I usually just search online, and I can easily find a chip with similar functionality.
Yes yes yes, I know the DRV8805, but it's for bipolar steppers and I specifically wanted one for unipolar motors, which, as far as I know doesn't exist. Also I need to make accommodations for sponsors, which in this case meant creating a (yes, slightly redundant) circuit.
I may have done too good of a job disguising that...
Aside from that, I WANTED to solve the problem - it's about the journey, not the destination, y'know ;)
you need to dry filament and it would stop being so fragile. specially one that was sitting and waiting ages to be printed :D
PLA becomes brittle when it have absorbed too much moisture from the air, when it becomes brittle like this, dry it in a food dehydrator at 50 degrees c for 24h
Nice video bro. Where can I get the templates of this wooden extruder? I really want to make it for my mini 3d printer. Could you share them?
I may at some point release the CAD, but engineering drawings and printable templates are exclusive to highest tier Patreon supporters :)
Don't forget to add this video to playlist
True, I forgot to do that straight away
I forgot to tell you that the continuous use of the 28BYJ-48 motors causes them to heat up and change the steps of the motor, you have to put a heatsink on them
I think I spotted an Arduino clone with CH340 USB controller. Be aware that tend to freeze the board during operation. More of the in the gnea/grbl wiki under known issues.
That was only for testing, in the end I'll use an Arduino Mega clone with mystery chip USB controller 😁
But thanks for the heads-up!
The PLA probably was wet at some point
Filament draws in moisture from the air a gets brittle and prints bad needs to be dried that's why vacuumed packed how did you get that motor to not have no play in the gearing I have a very simalur motor but so much slack in gears it not useable I was going to use a better motor but if you know of a fix would be great
I'm currently finishing up this project and about the 28BYJ-48: I recommend using something better. It does work, for an extruder backlash in the gearing theoretically doesn't matter, but what does matter is retraction speed. I don't think I ever got that 28BYJ to extrude filament at over 5mm/s which is awful slow for retractions and does result in somewhat poor deposition control even with a direct drive extruder config. I'm likely going to replace mine with something slightly less crappy as well.
Great
5:11 I have a problem when using the 28BYJ motor. Under load, the shaft slipped in a plastic gear inside the motor.
Are you sure it didn't just skip steps? Slipping shaft is a failure mode I haven't heard of for a 28BYJ-48 as they usually don't have enough torque to make that happen...
@@ChronicMechatronic , No no. It is the sliding shaft. I am using an a4988 driver with excessive current, as a result, the motor heats up a little. Maybe this is due to heating.
@@goiiia3774 oh yeah, in bipolar configuration with a higher drive voltage you need to set the current limit to whatever one winding of the motor would normally pull at 5V
This motor has an internal clutch because it was intended to be used for open loop homing in a damper application. See Big Clive's video on this motor.
How in the H E double hockey stix do you only have 11k subs?
At the time of this video I only had like 5k still :')
I think it's mostly that I don't post frequently enough - plus most videos don't really push all of the buttons the algorithm wants pushed, it's all about engagement bait these days, something that multi-part build series aren't very suitable for... But yeah, originally I would've expected to be at 11K after a year or so, not three, some other people get 50K from their first video. For me it's mostly been a slow and steady climb roughly doubling in subs every year :/
Nooo, not bowden! Anything but that! Reverse bowden is fine. What matters is the distance between the stepper and the melt zone. The added friction often causes missed steps even with NEMA17 motors, and the flexibility of the filament in the tube causes a time delay between stepper movement and pressure change in the melt zone that results in under-extruded starts and over-extruded stops. It's a nightmare for print quality. The moving mass of the extruder is a non-issue on bed slingers since the bed is heavier anyway.
No worries, when I do the lead screw upgrade I'll also make it a direct drive extruder :)
Seriously? Are you worried about the time delay of extruder in the operation of this printer? ))
Maybe You can do an Arduino shield for all the motors
Yeah, I was thinking if I could shrink the circuit down to an A4988 compatible size so they could be used interchangeably on a ramps board...
@@ChronicMechatronic that's a good idea, I've also seen that they use the Arduino uno cnc shield, to make the 3d printer with Arduino uno
I made a 3d printer with Arduino mega and ramps which is common, from the basics I made improvements to the printer with my own design and better structure. in your case that you do it alternatively you could use the Arduino uno
I've heard about something like that, but can't imagine how that would be implemented given GRBL only supports 3 axes... I guess it would require a different, lighter firmware?
@@ChronicMechatronic Yes, it requires another firmware, I checked it from another CZcams video, it's a bit complicated but for the experience, it's worth it. the first printer i made was with 28byj-48 motors
If u are making a driver why not convert those stepper motor to bipolar
There are a lot of material to do it.
Unipolar? HWY?
19:40 mb attiny13
Prfakt ❤