Designing UniStep - an open source UNIPOLAR stepper motor driver!

Sdílet
Vložit
  • čas přidán 30. 01. 2024
  • Take your projects to the next level with PCBs from: www.pcbway.com/ ! After inventing a translating driver for unipolar stepper motors to make them compatible with the existing A4988 CNC/3D printing ecosystem eight months ago, I really wanted to iron out the flaws in my design and shrink it down into a pin-compatible form factor. Little did I know that the journey would involve me starting to learn AVR development, bricking microcontrollers on purpose, and redesigning the circuit board from scratch at least three times!
    Here's the UniStep repository on my Github:
    github.com/ChronicMechatronic...
    Resources I used:
    ww1.microchip.com/downloads/e...
    www.instructables.com/Updated...
    thewanderingengineer.com/2014...
    rayshobby.net/wordpress/multi...
    www.engbedded.com/fusecalc/
    blog.zakkemble.net/avrdudess-...
    www.hackster.io/sbinder/attin...
    Other useful resources:
    www.makerguides.com/a4988-ste...
    dntruong.wordpress.com/2015/0...
    www.instructables.com/Program...
    If you plan to place an order at PCBWay and aren't customer yet, use my referral link to let them know I sent you! pcbway.com/g/W9sRiS
    -------------------------------------------------------------------------------------------------------
    Support this channel on Patreon: www.patreon.com/user?u=81848920
    Follow me on T̷w̷i̷t̷t̷e̷r̷ - X 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.shutterstock.com/g/Floraf
    Or download free stock photos from my profiles on Unsplash:
    unsplash.com/@floraf
    unsplash.com/@clicabout
    -------------------------------------------------------------------------------------------------------
    Additional sound effects from www.zapsplat.com
    Some additional graphics from: www.cleanpng.com/
    Explosion VFX by: vfx.productioncrate.com/
  • Věda a technologie

Komentáře • 105

  • @ChronicMechatronic
    @ChronicMechatronic  Před 6 měsíci +13

    In hindsight this whole project seems so much easier than it did when I first started! Changing those fuses for the first time was especially nerve-wracking because I wasn't entirely sure I'd be able to undo it again 😆
    Big shoutout to Johboh for his generosity sending me all those 3D printer parts, the next projects are gonna be awesome!

    • @dieSpinnt
      @dieSpinnt Před 5 měsíci +2

      Nice project, great approach and thanks for sharing your ideas with us!:)
      Now to the reality of engineering and circuit design ( values and diagram from 10:46 ): I think we can clearly say that your input pins are somewhat important. In fact they are THE IMPORTANT THING ... of course, they are part of the design and provide access to the functions this device provides (driving a motor). By the way, the worst idea you can have is to reduce the signal-to-noise ratio in an application in this harsh environment (from an EMC perspective, in direct relation to the motor control). Your (smart idea, which is true!) analog ladder trick is nothing more than that: a self-induced degradation in reliability, functional and circuit stability. Let's call it signal worsening by a shot(over resistors) in the foot(GND) :) This thing may work in the lab. At your home. Today ... Hehehe. You know what I mean. Such neat "tricks" in circuit design just lead to errors, failures and frustration when strangers try to reproduce your idea ... and you maybe never know of them.
      As always: Use the right tool for the job! Insisting on the unsuitable microcontroller was the first mistake; pride (I am over-exaggerating here, sorry!:) ) in DEFINITELY wanting to solve the problem with this (wrong) component was the second! BTW no offense or accusations with my critique here. You can do whatever you want. And learning something is a good thing!
      Have fun making!
      P.S.: Motors .... hmmm ... wasn't there another "thing"? **me-whispers** induction, semiconductor ... protection ;)
      (To rely on the COM diode on this legacy device is, hmmm ... daring:) See the specs, like "Clamp diode reverse voltage" and "8.2 Functional Block Diagrams" )

  • @RoyvanLierop
    @RoyvanLierop Před 6 měsíci +14

    Buying a Pinecil soldering iron was one of the best choices of 2023. Replaceable tips and heating elements in the tip itself. Excellent video!

    • @rallekralle11
      @rallekralle11 Před 6 měsíci

      i love my pinecil v2

    • @dan3a
      @dan3a Před 6 měsíci +1

      Same, have had it for a year and with proper care and regular soldering, the tips still look great. Flux is your friend and always leave the tip tinned to protect it.

    • @cbs1710
      @cbs1710 Před 2 měsíci

      This, so much this. I hated and dreaded soldering anything, and then Pinecil (v1 in my case) opened my eyes (and capabilities).

  • @klausbrinck2137
    @klausbrinck2137 Před měsícem +1

    If the zombie-apocalypse arrives, this guy is on my team...!!! Not for the skills, and how he easily adapts, but for how lovely he is...!!!

  • @marcus_w0
    @marcus_w0 Před 5 měsíci +2

    As somebody who enjoys disassembling and harvest every little thing with any motor I appreciate the effort! I'd buy them as a module in bulk.

  • @ThermalWorld_
    @ThermalWorld_ Před 5 měsíci +2

    You are my hero 😄
    I always wanted a simple and small driver for unipolar motors..
    I have a lot of them but i never used them because I didn't have the driver, you saved my unipolar motors from going into the bin 😄

  • @roberttco1
    @roberttco1 Před 6 měsíci +9

    I noticed that the output still steps (at ~16:40) when enable is high. this means that as soon as the enable is pulled low, different coils will be energized. Just a change to your ISR - only increment counter if enabled. Looks like the conditional on line 98 (commit a6a9f60) could be changed to:
    if(!digitalRead(StepIn) || analogRead(DirEnableIn) > 600)
    This doesn't handle the race condition that _might_ exist if the step input comes in at the same time as an enable change but that is probably not likely to happen.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +2

      Yeah, I specifically checked for that and didn't figure it would be a problem - I think normally Marlin shouldn't send any step signals while enable is high. But thanks for the suggestion, I'll put it in!

  • @scottbaeder37
    @scottbaeder37 Před 6 měsíci +5

    Again, you amazed me, and made me laugh, and did a GREAT job explaining, and also solving a problem - yes, I agree, it's probably a problem that didn't need to be solved, but the JOURNEY is always more important than the destination. And I continue to love taking the journey with you!!!

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci

      I'm glad you all seem to like my explanations, it's the first time I tried coming up with an analogy to make it easier 🤗

  • @1kreature
    @1kreature Před 6 měsíci +8

    Imagine how much easier this would have been with the STM8S...
    You would have had full debugging available while developing, ability to trigger steps via interrupts on the pins to avoid random latency in timing and you could have supported I2C or SPI modes in addition to the normal step/dir interface as well as added microstepping selection.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +3

      If only I could program STM 😅
      I'll definitely have to get into it...

    • @1kreature
      @1kreature Před 6 měsíci +1

      @@ChronicMechatronic What you will find is peripherals in STM is smarter than in AVR. If you code at lower level (like usually not arduino api but their api's) you can do things like ask serial to send a block of x characters from a buffer, and it will be done with DMA meaning the cpu can do something else in the meantime etc.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +2

      @@1kreature ngl, that goes way above my head

    • @mikejones-vd3fg
      @mikejones-vd3fg Před 6 měsíci +1

      Basically stm32 has more features, things like DMA that let you access memory without using the CPU, helps with getting more advanced tasks accomplished. But it helps to have a reason first, AVR may suite all your needs, but when you need displays i find the arduino's quickly hit their limites, while stm32 just have more memory, but harder to use so... but and its not that hard as you think Mitch Davis has a good into series on bare metal programming, czcams.com/video/Hffw-m9fuxc/video.html
      Since you know a lot about electronics you should find this stuff easier( the low level) since at the lowest level its just electronic circuites. Ram is just capacitors filled up, constantly refreshed because they leak, its a very messy electronics thing you probably could make better. Anyway I think its pretty fascinating, but think i need a intro to basic computing to get a handle on it to be honest, and when youre programming with MCU's, youre so low level already its probaby good idea to know how the CPU youre programming actually works on a circuit level. EDIT the video isnt the bare metal programming one, he acutllay uses AVR to show that, its just a stm32 guide which is still pretty cool@@ChronicMechatronic

    • @domints
      @domints Před 6 měsíci

      @@ChronicMechatronicyou’re programming this driver in Arduino. It would be nearly exactly the same for any STM, just use board manager to get board definitions for STMs and maybe get yourself cheap as heck ST-Link clone :)

  • @Ed19601
    @Ed19601 Před 2 měsíci

    I used an attiny13 for exactly this purpose (driving this motor) years ago. It is a lovely chip

  • @mrcpu9999
    @mrcpu9999 Před 5 měsíci +1

    I just love the pics of the wooden 3d printer.

  • @potatomeatlabs
    @potatomeatlabs Před 5 měsíci +4

    It's worth noting that it's extremely trivial to convert a 28BYJ-48 to a bipolar motor. All it takes is pulling off the blue cover, and cutting the center PCB trace on the motor breakout PCB. It's then compatible with all other bipolar stepper drivers (including Trinamic), and this bipolar mode significantly increases the torque and speed possible by the 28BYJ-48. I measured double the torque in my own tests.
    Given it takes all of 5 minutes to do the conversion, I don't really see any reason to keep them in their stock unipolar mode. But cool project nonetheless!

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci +2

      Yes, there seem to be nothing but advantages to converting them into bipolar motors. I really just wanted finish what I had started, hence why I made sure to mention the unipolar to bipolar mod right upfront to hopefully not make it seem like my driver is the best and only way to drive these things :)

  • @ewasteredux
    @ewasteredux Před 6 měsíci +2

    That was a TON of information for one video. I tried to watch this first thing in the morning and I could not absorb it all in one go. Very detailed indeed. Congrats on your success. Great design! As I see those motors work, the first thing I can think to use your design and those specific motors for is to set up a pseudo-analog gauge cluster to show CPU/GPU speed, temperature. I bet it would look cool.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      Thanks! Yeah, some of my videos are a lot to take in - a digital "analog style" clock would be cool too!

    • @ewasteredux
      @ewasteredux Před 6 měsíci +1

      @@ChronicMechatronic , how many steps are there (including micro steps) for a full 360 degree rotation?

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      @@ewasteredux on most of them just 96, though I have one with 192. I assume it would need a little bit of gear reduction for smooth needle motion

    • @ewasteredux
      @ewasteredux Před 6 měsíci

      @@ChronicMechatronic , of course you are right. If you wanted to do some sort of clock, just making sure it was greater than or equal to 60. At that many steps it would make the second hand move buttery smooth.

  • @agusNievas
    @agusNievas Před 6 měsíci +2

    Hi, great project!
    We made something similar but for an industrial CNC, and i was in charge of the electronic drivers... Certainly we couldnt use the unipolar motors as bipolar; because we thought they would overheat or more problema would rise...
    So... I designed a unipolar motor driver based on 4 darlington transistor, and used the UCN5804 microchip (wich basicaly is a "Unipolar motor translator") in conjunction with some NOT gates
    I believe i still have the schematics, if you like them
    Also i think the UCN5804 is not being made anymore, we bought the las 3 that our suplier had, bad for repairs tho, but the machine still works until today😆😅

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      Thanks!
      Yeah I figured there must've been some obscure IC for that back in the day, but I didn't really look into it since those DIP packages would have been too large anyway. Unipolar steppers are kind of a thing of the past after all.
      But thanks for the hint, I read the datasheet and learned about the two-phase drive mode! You're right, basically I could've stuck one of those ICs on my board and called it a day 😂

  • @babbagebrassworks4278
    @babbagebrassworks4278 Před 6 měsíci +1

    You can make a hot plate by using a 3D printer heater, a small aluminum heatsink and small fan to cool down.

  • @michaeldiamond2269
    @michaeldiamond2269 Před 6 měsíci

    Great work. I loved your explanations and it's good to see how you worked your way through all the problems. I learned a lot.

  • @Tims_Projects
    @Tims_Projects Před 5 měsíci

    I love the re-setter.

  • @muschaw
    @muschaw Před 6 měsíci +4

    Great explanations!

  • @RacoonMedia
    @RacoonMedia Před 6 měsíci +1

    Awesome Project. I was just looking for a way to drive some unipolar stepper motors I bought some years ago but never came around to use in a Project.
    I'm currently learning how to create PCB's as well. So prefect Timing.
    I'll subscribe for sure :)

  • @roadshowautosports
    @roadshowautosports Před 3 měsíci

    14:57
    Good soldering skills!

  • @oliverr.8316
    @oliverr.8316 Před měsícem +1

    I use normal a4988 and separate the connection of the coils so that the motor also runs with 4 pin

  • @SianaGearz
    @SianaGearz Před 6 měsíci +2

    You know what, this seems like a perfect use case for the infamous Padouk 3-cent microcontroller. But i understand the reluctance :D
    I could have sworn i have seen a yellow tmc2208 before. Oh right it's the one made by Eryone Tech.
    Soldering paste has the problem that it expires, it can be refreshed in a planetary centrifugal paste mixer with maybe a drop of fresh isopropanol, as you might guess things just wander around, they don't actually decay chemically. Or just mix it with fresh flux best you can and hope it works. Also there are cooling/storage/transport requirements, so odds are, the paste was once probably OK (not the best), until it wasn't. Or maybe it was never OK, who knows.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci

      Padauk, I heard that just recently - oh right, it was in a blog post about a flickering LED with timer function in an LED tea light.
      Just googled it, HOW HAVE I NOT HEARD OF IT BEFORE 😂
      Thanks for the idea, I think I'll need to dive deeper into low level development :p But yeah, right now programming is the biggest barrier...
      Oh, that's a shame, I didn't know someone already made yellow drivers :((
      So far I'd only seen green, red, purple and white...
      I don't know what the problem with my solder paste is, it's just so runny it gets everywhere on the board and then I get tiny beads of solder all around and underneath components. Then again my hotplate's also unregulated and gets up to 350C 😬

    • @SianaGearz
      @SianaGearz Před 6 měsíci +2

      @@ChronicMechatronic Nobody made Sakura Pink drivers i don't think. Blue ones are common. There's any number of exotic mask colours the PCB manufacturer can make if they like you. Even if you aren't a big customer.
      But yellow is good too, it's a nostalgic colour.
      I think your paste separated, the solids are now at the bottom of the container (whatever they decided the "bottom" to be) and you're getting it from the middle or the top. 350°C doesn't sound inappropriate to me for a soldering plate.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      @@SianaGearz I got a pink sample board and NGL I hate the color :p
      Wait, the paste is not supposed to separate? I thought that was normal! 😂
      I guess that's that mystery solved...

  • @fouzaialaa7962
    @fouzaialaa7962 Před 6 měsíci +2

    brown out detection is a special case where the mcu detects that its supply voltage is dipping down and it trips the reset on the mcu
    you basically never need it , if you supply to the MCU is so bad as to trigger a brown out , you have way worse problems then the mcu resetting mid sketch

    • @Ether_Void
      @Ether_Void Před 5 měsíci

      I would recommend setting it since the transients from the motor can pull the supply down temporarily, simply due to parasitic inductance, as well as inductive and capacitive coupling.
      If the brown out detection is not set the issue is that the MCU won't reset mid sketch, however it's processing core will no longer work as expected which can leave the MCU in a state where it won't be able to recover unless you reset it manually. So a brown out trigger is still not ideal, but better than a unpredictable state.
      Sometimes this is done on purpose for a glitch attack to get the core into a state where it skips over certain code sections simply by briefly lowering the supply voltage.

    • @fouzaialaa7962
      @fouzaialaa7962 Před 5 měsíci

      @@Ether_Void yes its used to attack , it is also used to handle dips in the supply voltage ... But if your MCU gets into a state of brown out in the first place , you have bigger problems in your supply voltage .... I prefer to fix the supply voltage and prevent the brown out in the first place rather then handling brown out wacky behavior ....a reservoir capacitor usually solves the issue

    • @Ether_Void
      @Ether_Void Před 5 měsíci +1

      ​@@fouzaialaa7962 There are of course other better fixes. But brown out detection costs you nothing and at least gives some additional way of recovery from unpredictable behavior in case some rare one off issues come up.
      Additional decoupling would be the better solution and at least one decoupling capacitor should always be present, but adding additional capacitors to fix unexpected issues can only be done afterwards, unless you calculate the required amount before or have the luxury to just throw in as much as you have.

  • @abdontroche
    @abdontroche Před 5 měsíci

    Amazing project! I was thinking of changing the ULN with four MOSFETs, those would do the trick and would be cheaper.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci

      Thanks! I wanted to do that, but fitting those four SOT-23 footprints onto the tiny board turned out to be almost impossible without putting components on both sides, because every MOSFET then also needs a separate protection diode. Those are already included in the ULN2003, hence why I stuck with it.

  • @musictitles3235
    @musictitles3235 Před měsícem

    that is awesome

  • @osmanpasha_diy
    @osmanpasha_diy Před 5 měsíci

    3 things I'd like to note:
    * compared to bipolar drivers, this driver lacks current control, which is a crucial feature of motor control. This driver constantly pumps maximum current through motor coil, even when it's not moving. It also makes the setup sensitive to input voltage (while bipolar drivers will run on both 12V and 24V, without damaging the motor). All in all, converting this unipolar motor to bipolar offers a much better way to drive it.
    * analogRead is much slower than digitalRead, so your driver might have problems at higher step speeds (klipper?)
    * to program a SOIC attiny you can buy a "soic clip" (also called "IC test clip")

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci +1

      All very good points, you're totally right, but let me add two things of my own:
      The problem with driving "converted" unipolar motors with a bipolar driver is the high phase inductance due to being designed to have resistance organically regulate the current depending on input voltage. This makes the coils try to resist rapid changes in current flow interfering with the driver's attempt to control the current - in fact, there'll never be as much current flowing through the coils as intended. So the driver doesn't actually get full control of the current the way it does on bipolar motors (hence why bipolar ones have a very low winding resistance of under 10 ohms, to reduce inductance), which I think is part of the reason microstepping doesn't work beyond half-steps on these unipolar motors.
      So apart from the convenience of being able to use whatever supply voltage I like, there's ultimately nothing to be gained from current control on unipolar motors.
      Regarding "analogRead", multiple people here were worried that my step rates wouldn't be high enough - I'm pretty sure this won't be a problem because due to that high inductance unipolar steppers can't spin anywhere near as fast their bipolar counterpart, and given most of them only have 48 steps per revolution I won't ever reach critical speeds, even when driving them in half-steps.
      I guess the takeaway could be "just use bipolar motors then" but that totally misses the point of making something cool with whatever I have at hand...

    • @osmanpasha_diy
      @osmanpasha_diy Před 5 měsíci

      @@ChronicMechatronic very interesting insight, thank you!

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci

      @@osmanpasha_diy no problem! These were just things I didn't get around to covering here and in previous episodes of my unipolar 3D printer series, I might eventually do a "unipolar vs bipolar for CNC applications" video to cover that inductance thing.
      Also thanks for the tip with the test clip! I might have to get one of those at some point, should've gotten one instead of the adapter PCBs...

    • @osmanpasha_diy
      @osmanpasha_diy Před 5 měsíci

      @@ChronicMechatronic the clip is really useful, especially when the attiny is already soldered to pcb! And it costs around $1-$2. And there are also soic spring-loaded cradles for unsoldered ICs, but a bit more expensive, and doesn't do anything a clip does.

  • @PaulRichardson_Canada
    @PaulRichardson_Canada Před 5 měsíci

    wow i actually learn something and that is a hard thing for me haha. Thanks

  • @alejandrorivera478
    @alejandrorivera478 Před 6 měsíci +2

    Wonderful video, you could've used a multiplexor and easily use 2 pins in exchange for using maybe 8 more pins.

    • @SianaGearz
      @SianaGearz Před 6 měsíci +1

      Yeah but footprint...

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      Yeah, but there isn't exactly a lot of space on the board. Especially since I didn't want to put components on the underside so it can still easily be reflowed on a hot plate

  • @nithylabs
    @nithylabs Před 5 měsíci

    Press "shift" while pressing upload button. It will straightly put the mode of "upload using programmer"

  • @ThantiK
    @ThantiK Před 6 měsíci +7

    Just treat the unipolar motor as a bipolar motor and ignore the center-tap. Back when RepRap was first starting out and you couldn't get these drivers for less than $20/ea, it made sense to solve this problem the way you did.

    • @mvadu
      @mvadu Před 6 měsíci +2

      He talks about that easy way 2 minutes into the video even though he doesn't call out "forget the center tap"

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +2

      I mentioned exactly that in the video, but since I don't have unlimited time and this video was about my driver, I can't also explain how to do the unipolar/bipolar conversion

    • @KallePihlajasaari
      @KallePihlajasaari Před 5 měsíci +1

      Not all unipolar motors can be converted if the windings are connected inside the casing.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci +1

      @@KallePihlajasaari so far I haven't come across any that couldn't, on some it'd be a bit destructive, but opening the welded-shut housing shouldn't be necessary I think

  • @Lysou
    @Lysou Před 6 měsíci +1

    Looks really cool, just thought you could use PWM (if supported by the AT tiny) to access new range of microstepting and not only 1/2. Unfortunately you need to set it directly in the AT code

    • @Lysou
      @Lysou Před 6 měsíci +1

      Also if I remember well, you can read an I/O even if they are set on output, this way you can power the 4 I/O and set this special artificial input combination as a Reset pin

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +2

      Yes! I was briefly working on a more powerful version 1.1 that would've allowed adjusting phase current and, if implemented, microstepping, but my programming abilities just aren't there yet. Attiny does support PWM, but turning on pins individually via "analogWrite" is too slow, hence why I did direct port manipulation here. I couldn't figure out how to do PWM in direct port manipulation, and what really killed it of, was that the PWM pins on the Attiny44A (which I would've used in that case) are on different ports, Three on port A, one on port B, which made switching them on simultaneously impossible.

    • @Lysou
      @Lysou Před 6 měsíci

      @@ChronicMechatronic Maybe you can use hardware timers to recreate PWM ?
      Do you know the maximum pulse frequence the ramp can send to the driver? From there you should be able define a theorical maximum mircostep interval based on the number of clock cycles to toggle a port and the clock frequency

  • @BogdanTheGeek
    @BogdanTheGeek Před 6 měsíci +2

    Why not implement the enable pin in hardware? just connect it to a mosfet hooked up to the power/gnd rail of the darlington array.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      That IS a good question. It simply didn't cross my mind. 🤦 I thought about disconnecting the four outputs with separate transistors, but simply turning off power to the motor common using a single P-channel MOSFET is OBVIOUSLY the way to go if it fits onto the board 😂
      Thanks for the suggestion!

  • @nathanp3366
    @nathanp3366 Před 6 měsíci

    Nice work. Seems like quite a project but you really buttoned it up nicely. Where can these motors be found in ewaste? printers?

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      Thanks! Those 48step/rev unipolar motors are the most common type found in old printers, photocopiers and scanners and that kind of stuff. "old" as in 1980-2005-ish if my estimate is to be believed (I wasn't around yet most of that time, and haven't taken apart that many devices so far). But in some fancier equipment of the time you apparently could get real bipolar NEMA 17 steppers.
      I personally don't have access to that kind of ewaste, but I bought some for cheap from a guy who has...

    • @nathanp3366
      @nathanp3366 Před 6 měsíci

      @@ChronicMechatronic got it. We’ll I know my local university dumps stuff like that constantly so I’ll take a look next time

  • @leobiranykun7808
    @leobiranykun7808 Před 5 měsíci

    Can you make a CNC drawing machine using bipolar stepper motor please

  • @m_loewe
    @m_loewe Před 6 měsíci

    Just use a brass sponge to clean your solder tip 😎👍

  • @RoboArc
    @RoboArc Před 6 měsíci +1

    Whats the max write speed on that chip. I didnt look at the code that much, but you dont have to read the enable state ao much thats going to slow down youre step read.
    Put a clock on that enable pin.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      Max step rate is easily more than what any of those unipolar motors can handle. Remember, we're not talking about 3200 microsteps per revolution, most unipolar motors have only 48 fullsteps (and thus 96 halfsteps) per rev.
      Also, if I don't poll the direction pin after every step I might miss the controller changing direction, and since enable and direction are tied together I have to read both or none.

    • @RoboArc
      @RoboArc Před 5 měsíci +1

      @ChronicMechatronic not the direction pin, how often are you polling the enable pin ?

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci +2

      @@RoboArc I spent about 10 minutes of the video talking about how "enable" AND "direction" are managed by the same I/O pin, so how am I supposed poll enable separately?

  • @goiiia3774
    @goiiia3774 Před 6 měsíci +1

    Does the ADC input have enough speed?

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +3

      Easily, it just reads out once per step. I don't have the setup to test maximum step/second speed, but I think it's safe to say it'll be way more than what the motors can keep up with

  • @donamills
    @donamills Před 5 měsíci +1

    Does the stepper still run hot at idle?

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci +2

      You mean with the driver inserted into a controller? Well no, since enable works now Marlin will turn off power to the motor whenever the machine sits idle

  • @wizkid723
    @wizkid723 Před 6 měsíci

    Why not use a slightly larger ATTINY like the ATTINY814 which has 14 total pins, can have up to 12 GPIO pins, and if you skip the 4 clock and reset pins you still have 8 full GPIO pins available. If you base it on the internal clock you can get up to 16mhz and has more flash, etc. Basically it the same chip but with more and only taking a fraction of the space more.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci +1

      Yeah, but the goal was to make the whole thing as cheap as the A4988, which was really only possible by using the smaller ATtiny

    • @osmanpasha_diy
      @osmanpasha_diy Před 5 měsíci

      it also seems to be 3 times more expensive!

  • @marcus_w0
    @marcus_w0 Před 5 měsíci +1

    Why even fuse that pin?After the setup it's a standard IO.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci

      It only becomes a standard IO after I manually change the fuse. The setup in the IDE only does things like BOD and clock speed

    • @marcus_w0
      @marcus_w0 Před 5 měsíci

      If you don't set the fuse, you can use it as an IO as well. Just stick to plain C.@@ChronicMechatronic

  • @DiThi
    @DiThi Před 6 měsíci

    your solder paste may be expired, it has a shelf life

  • @conorstewart2214
    @conorstewart2214 Před 5 měsíci

    I get wanting to make everything yourself but as you are finding out if it isn’t done well it just won’t work as you need it to and will just cause more problems later on, like with your soldering iron and hot plate.
    Similarly forcing yourself to use sub optimal components for no real reason won’t help you either, like forcing the use of unipolar stepper motors when you can salvage or buy used bipolar stepper motors, which when combined with cheap stepper motor drivers will have much higher performance than your unipolar motors and drivers. Or using an MCU that doesn’t have enough pins. Using sub optimal components makes development take longer and the results will be worse.
    You also seem to build things without having any or much experience of how they should work with a “how hard can it be” attitude, which is fine but it means you don’t really know what you are trying to build and will overlook things that are more important than you think. It also isn’t a great way of learning how things work.
    It just doesn’t seem worth it, both in terms of cost and for learning. You spend all this time and money getting PCBs made and buying components and writing code and coming up with workarounds for problems rather than just getting on with the main goal of the project and you have probably ended up spending more than if you had just bought some used bipolar stepper motors. Sure you are learning but you could probably be learning more if you weren’t almost forcing things to work.
    If you are happy to keep doing it then that’s up to you but to me it just seems like wasted potential. You clearly have drive and motivation but what could you accomplish if you used that potential more effectively? For the most part you are just reinventing the wheel.

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci

      You're raising some very valid and interesting points here, I probably should've called the channel "OCD engineering" instead.
      I always tried to make things work that shouldn't - it's what I pull most of the enjoyment from, for some reason. I used to hate integrated circuits, because even though it's easier overall to build a circuit with them, I have to specifically procure a dedicated one for each damn functionality. So I used to be really into transistor circuits (like what I did for the soldering station) because I already had transistors and assembling pre-built components is boring (to me anyway).
      Then there's also the question: do I actually want to achieve anything? It's not like I'd end up fixing the room temperature superconductor or invent anything revolutionary anyway, so I might as well mess around reinventing the wheel if it's fun...
      But yeah about the efficiency, that's kinda the sort of thing I've been learning over the past year or so with the channel becoming more of a business, the insane development time my approach takes getting in the way of my attempts to increase video output - I think you'll like my laser cutter project a lot more as far as design designs go!

  • @MekazaBitrusty
    @MekazaBitrusty Před 6 měsíci

    Interesting video. I’m struggling to figure out your accent. I’m fairly sure you are not from an English speaking country. The way you pronounce the “o” has me stumped. 😊

  • @Buciasda33
    @Buciasda33 Před 6 měsíci +1

    You totally neglected the mocrostepping insputs (MS1, MS2 and MS3) and your little driver just does half steps.
    Get it up a notch, Quarter Steps...

    • @ChronicMechatronic
      @ChronicMechatronic  Před 6 měsíci

      Well, I can't explain everything in a single video, but cheaply manufactured unipolar motors physically can't microstep. It just doesn't work, halfsteps is the maximum possible. Hence why I didn't bother with it. Check out my unipolar 3D printer series for more info on that.
      Now there are some rectangular unipolar steppers that do 200 steps/rev, for those it would be interesting to work on microstepping but AFAIK they're rare.

  • @jtreg
    @jtreg Před 5 měsíci

    exhausting to watch your video. I will take a paracetamol. Friendly tip: calm the f down, man.🙄

  • @Fejszi
    @Fejszi Před 5 měsíci

    I have been toying with the idea of making something similar, but for DC motors with optical encoders. Commonly found in newer inkjet printers, I think they would be useful for making plotter building cheaper. Thanks for doing the right thing and opensourcing the project! Cheers!

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci

      DC motors with encoders is what I plan to do next! It would be so cool to be able to rip motor, pulleys, belt and encoder out of an inkjet printer and install them on a 3D printer! After all industrial type CNCs use servo motors instead of steppers all the time because this also fixes the open loop problem. I'm more surprised that it HASN'T been implemented on consumer grade 3D printers yet...

    • @Fejszi
      @Fejszi Před 5 měsíci

      ​@@ChronicMechatronic Well, if you are down for a collab; I have designed a PCB, I just haven't thought about the code that could power it.

    • @Fejszi
      @Fejszi Před 5 měsíci

      @@ChronicMechatronic my other comment doesn’t show up here, anyways, the project lives on, I’ll just have to cobble some software together for it

    • @Fejszi
      @Fejszi Před 5 měsíci

      @@ChronicMechatronic I don't know if you've seen my past comment, but I'd love to collab, I have a pcb alaready done in the formfactor of a normal stepstick, I'd just need the software that would power it. This has been in the back of my mind for quite some time, because I wanted to build a plotter from and inkjetprinter for soo long

    • @ChronicMechatronic
      @ChronicMechatronic  Před 5 měsíci

      @@Fejszi hey Mark, sorry for not responding, I did see your comment, but I've been stuck without internet for a week and a half now already.
      Problem with a collab would be that I'm more of a hardware guy myself and SUCK at coding. I just barely managed to get the simple code for this project to work.. Designing a PCB on the other hand, yeah, no problem there neither.
      Though another subscriber said he already did it and will make a video about it eventually. I'll have to rely on him to even get an idea of how this works. A channel called "@TheRainHarvester" also made a few videos about it, but I didn't understand half of what he explained about the code :/