Stepper motors genralised idea

872444976716343705687244497671507189768724449768077795328

Stepper motors were one of those components I kept hearing about, especially in things like 3D printers and CNC machines—but I didn’t really understand why they were used everywhere until I actually started working with them.

The main reason is precision. Unlike regular DC motors that just keep spinning, stepper motors move in fixed steps. Most commonly, that’s 1.8° per step, which gives 200 steps for one full rotation. This makes them really useful when you need controlled movement without adding sensors.

Internally, a stepper motor has a rotor (the shaft) and a stator with coils arranged in phases (usually A and B). By energizing these coils in a specific sequence, a rotating magnetic field is created, and the rotor keeps aligning with it. Instead of continuous rotation, it moves step by step.

One thing I initially misunderstood was microstepping. I thought it just increases the number of steps and gives more accuracy—but it’s a bit more nuanced than that.

With microstepping, instead of fully energizing one coil at a time, the driver controls current in both coils in ratios (like 50/50 or 75/25). This lets the rotor settle between full steps, making motion smoother and reducing vibrations. But it doesn’t necessarily mean you’re getting perfectly accurate “extra steps”—torque per microstep is lower, and there are nonlinearities.

Another thing that confused me early on was NEMA ratings. NEMA 17, NEMA 23, etc., don’t define performance—they only specify the physical size of the motor faceplate. Torque and current ratings can vary a lot even within the same NEMA size.

Drivers are also a big part of the system. Stepper motors aren’t just voltage-driven—you need drivers that regulate current properly. That’s where modules like A4988, DRV8825, and TMC2209 come in. Choosing the right one depends mainly on the current your motor needs and how smooth you want the motion.

Here are some common driver options and where they fit:

Driver Name Max Current Voltage Range Max Microstepping Best For
A4988 2.0A 8V – 35V 1/16 Budget NEMA 17
DRV8825 2.5A 8.2V – 45V 1/32 Higher voltage setups
TMC2209 2.8A (peak) 4.75V – 28V 1/256 Silent, smooth motion
TB6600 4.0A 9V – 42V 1/32 NEMA 23 / CNC
DM542 4.2A 20V – 50V 1/128 Industrial setups
DM860H 7.2A 18V – 80V 1/256 Large NEMA 34

stepper gif from https://www.wikipedia.org/

#electronics# #robotics# #steppermotor# #embedded# #engineering#

StepperMotors
Make your own Easy Buck converter: project for beginners

Hey there! if you’ve ever wanted to dive into the world of power electronics but felt intimidated by all the math and tiny components, this post is for you. In this post you will see how to build a high-efficiency buck converter, the magic device that takes a higher voltage (like from a battery) and steps it down to a lower voltage (like for your microcontrollers) without wasting a ton of energy as heat.

let’s break down how to design and build one of these as a beginner.

Why a buck converter? Well, linear regulators are easy, but they’re basically just fancy resistors that get hot. a buck converter uses an inductor and high-speed switching to be way more efficient. think of it like a dimmer switch for your power.

What you'll need (the bill of materials):

  • the controller: mc1068c buck regulator ic.
  • the inductor: 0.47μh (i used the mpl-al4020-r47 for its solid 12.5a saturation current).
  • resistors:
    • r1: 100kOhm
    • r2: 49.9kOhm (these set your output voltage via the feedback pin).
  • capacitors:
    • input: c1a, c2 (ceramic, 10μf to 22μf range).
    • output: c21, c22, c23 (we use multiple in parallel to keep the voltage smooth).
    • feed-forward: cff (a tiny 10pf cap to help with stability).
  • connectors: standard screw terminals or headers for vin and vout.

Layout tips

when you look at my PCB layout, you'll notice a few things:

  • keep it tight: the input capacitors (decoupling) and the inductor need to be as close to the ic as possible. this minimizes ringing and noise.

  • big copper: notice the thick traces? high current needs space to move, or your board will act like a heater.

  • ground plane: use a solid ground pour on the bottom layer. it acts as a shield and a heat sink.

    The layout is a begginer one! it has a lot of room for improving, what would you change?

Final thoughts

building your own power supply is a rite of passage. it feels pretty great when you plug in 5v, and a rock-solid 1.2v comes out the other side without a puff of smoke. Obviously the PCB layout is just a beginner project to get started with PCB design!

8724443605563088896

8724443605609226240

#POWERELECTRONICS# #PCB# #PCB# #JLCPCB#

Open Source Project
How to start with PCB Design if you only know basic electronics

Hi everyone! So I would like to share my personal experience designing PCBs as a beginner. So I have been designing PCBs for 3 years already and the most important thing I have learned in this period is that to start designing PCBs and actually get into that, you just have to choose a project and get hands-on.

  • First of all, look at some videos on-line, there are plenty, one example could be the following one: How To Start Video. Then, choose an easy project: it could be a simple LDO circuit, a buck converter, or a simple microcontroller activating some LEDs, and then start designing. For the software I would suggest EasyEDA just because for beginners it's the easiest one. Then just start designing the schematic! For the schematic I would say that the most important thing to keep in mind is: keep it organised and clean! For example, all the input pins on the left, outputs on the right, name the connections etc.. In this way it will be way easier to understand the schematic not only for you, but for whoever looks at it. I think that, by beginning to draw schematics with the good-practice guidelines in mind, you already have done a huge step ahead.
  • RUN THE DCR! (design rules checker) This is one of the most significant stept in my opinion, it allows you to not make huge mistakes!
  • After you have finished the schematic just go into the layout and routing! Just try and connect all the components as the software tells you by keeping in mind some easy rules: no 90 degrees angles, always keep it clean, don't be scared to use vias, use the right width for the traces, don't be scared to do something wrong it's perfectly normal. Personally, I think that designing PCBs just requires a lot of practice and attempts. Also EasyEDA has a lot of tutorials so if you need something just look there.
  • Once you have done some little projects, you can also try to do something more elaborate such a basic audio amplifier, or something that actually interests you. I think one of the best way to learn is do something useful for you and that you find exciting!
  • Finally, I would suggest you to print the PCB and actually test it. Even if you don't get to actually use it, having the product and actually testing it helps you understand what could you have done better. Also with JLCPCB printing the pcb is actually very cheap and the delivery is quite fast, so you don't need to have big capital to invest or something like that.

I will attach a little project (an LDO) I did as a beginner that might help you to get started. Since it was a PCB design I made as a beginner, it has some mistakes! What do you think they are? #PCBDesign#

8724422987732238336

8724422987727503360

PCB
Common Footprint Mistakes That Can Ruin Your SMT Order

The significance of a perfect schematic diminishes if your footprint is not accurate. In SMT assembly, even minor errors in the footprint can lead to costly production failures very rapidly.

image.png

SMT Assembly line/Pick and place

First of all, pad sizing errors are very common. Making solder joints can be weak when using pads that are smaller than what is needed. In contrast, when using larger pads you may experience loss of solder from tombstoning (when part of the electronics component lifts off of the printed circuit board). Make sure your land pattern matches the one recommended by the manufacture. This is the best method to achieve accurate solder joints.

image.png

Close-up of soldered SMD components

Secondly, make sure that there are no errors in pin pitch or spacing. Even a slight difference between pin pitches can cause the component not to fit. This is especially critical with fine pitch ICs such as QFN or BGA packages; tolerances for these components are very tight.

Another major issue is incorrect orientation of the footprint. If the pin 1 indicator is not aligned properly, an entire reel of components may be incorrectly installed, which may not be immediately obvious until the assembly is completed and tested.

Missing or unclear silkscreen markings are another piece of the puzzle that could cause assembly issues. You have a much lower probability of making a successful assembly if you can't find any obvious polarity markings (e.g. diodes, capacitors or chips).

Another reason for comparing parts in your design with their datasheet is that you can't assume that all parts that have a common part number will be compatible with each other with regards to the footprint. However, you should verify the footprint matching part number in the datasheet for all connectors and power parts.

image.png

PCB design software layout screenshot (conceptual)

Courtyard and clearance violations are two areas that are critical to any assembly process. If courtyards overlap one another, it may cause confusion with pick and place machines, or worse, actual assembly collisions.

The thermal design of a product is important; missing thermal pads on power ICs will cause them to overheat or have poor soldering, especially on packages designed to dissipate heat.

Also make sure to do a 3D assembly check before ordering the products, as doing so is beneficial to identify placement issues not found in the schematic or 2D layout.

PCB Design
How to Design a PCB for 20A Current Without Melting Traces

Designing a PCB for 20 A shouldn't be left to chance; it’s the result of sound engineering regarding heat, resistance, and copper management.

The first guiding principle is the importance of trace sizes. For example, according to IPC guidelines, a 20A trace on an external conductor (2 oz of copper per square foot) experiencing a temperature rise of 10 °C will require approximately 2.6-3 mm in width. Anything narrower than 2.6 mm will eventually heat the trace enough to melt, rendering it a fuse.

image.png

PCB copper traces close-up

The second principle is that you should always use the largest-gauge copper conductor you can. For example, if you are switching from 1oz copper conductors at 20A to 2 oz or larger-gauge copper conductors, you will substantially reduce the resistance and heat generated by the conductor. Think of this as increasing the water pipe's diameter and reinforcing the walls.

The third principle is to avoid the use of thin trace conductors completely; instead use copper pours or planes. Distributing the current over a larger surface area improves thermal performance by reducing hot spots and increasing the area available to dissipate excess heat, thereby also reducing voltage drop.

The fourth guideline is to use the shortest and most direct trace routing possible. Any time you lengthen a trace, you will substantially increase the resistance (R= ρL/A), which in turn will increase the heating and the voltage drop. Therefore, try to keep your high current paths as short as possible.

The fifth suggestion is to consider the use of multiple vias when routing power as a single via can cause a current bottleneck; Thus, to properly share the load and dissipate heat create multiple vias in parallel when the current load permits.

image.png

High-current PCB / power electronics

Finally, be aware of your thermal strategy. External traces will have better cooling characteristics than internal traces, and also the use of airflow and copper planes can greatly enhance the amount of current a trace can carry.

What’s the takeaway? When designing for 20A isn’t making sure there is a single “perfect trace width”; it’s increasing cross-sectional copper and minimizing resistance throughout the entire length of the trace. By doing this, your board should stay cool, perform well, and not melt.

image.png

Trace width comparison

PCB Design
Star Grounding: The Ultimate Way to Reduce Analog Noise.

If you’re experiencing noise, unpredictability, or overall annoyance when working with an analog circuit, it’s probably due to the method used to ground the circuit; not because of any components. Enter star grounding, which is a rather straightforward way of helping to significantly improve your signal by reducing interference.

Star grounding connects all ground returns from the circuit(s) to a single central connection point instead of allowing current to flow through shared paths. The primary benefit of this method is that, because multiple circuits share ground paths (resulting in mixed return circuit currents), the mixing of return circuit currents generates voltage drops – or noise – when there is a shared circuit of low-level analog and/or high-level digital signal.

image.png

Canonocal Star grounding Schematic

Think of the shared path as a street that is shared by all return currents (mixed) at which to get to their destination (central star point). A street that has only one lane will be very congested; whereas, multiple streets with only one lane each will not be congested.

image.png

Star Grounding Reference Bus

In mixed-signal designs (digital switching noise and fragile analog signal), this becomes critical, as analog and digital signals can and will interfere with one another.

In practice, star grounding separates high-current (power stage, motor) and low-level analog (sensor, amplifier) returns by creating pathways from each section back to the central star point; thereby reducing the amount of interference. This becomes especially crucial with systems that use precision components, such as an operational amplifier circuit; as even a small voltage change (due to movement of the common ground point) will create distortion in the measurement.

But star grounding will not solve all problems. On newer multilayer printed circuit boards (PCBs), such as those designed with easyEDA Pro, using a solid ground plane typically has better electrical performance than a star ground layout due to having lower impedance return paths. Understanding which approach to use in what situation and when they can be combined is critical.

So if you’re dealing with analog noise, don’t first blame the components of your design. Instead, reevaluate how you have established ground on your PCB. A star ground properly implemented can sometimes mean the difference between a clean signal and hours of aggravating debugging!

image.png

General star grounding

PCB Design
Mastering EasyEDA Pro: Top 10 Features You Aren't Using

You can’t master EasyEDA Pro by simply putting down some components, clicking on generate gerbers and moving on to the next project. This is the basic level of mastery. You will experience your biggest gains at the next level due to the features within this program that are potentially “hidden”, but can add so much value to your designs, and sanity!

First, start with Custom Design Rule Checks (1). Default design rule checks are just considered to be “cross your fingers and hope for the best”. If you set these up correctly, you will create an environment for yourself where you can catch mistakes before making an expensive coaster out of your PCB. Next, use the built-in real-time 3D visualization (2) tool to answer the age-old question of “does this fit?” before your enclosure gives you an answer of “no”.

image.png

3D visualization Tools(conceptual)

Next, utilize the built-in signal integrity tools (3). While these tools may not provide precision laboratory results, they will provide you with enough information to notice when your high-speed traces look like chaos noodles. Pair these two features with differential pair routing (4) and length tuning (5), and all of a sudden your USB and high-speed traces no longer have a mind of their own.

image.png

PCB Design close-up

Last, the Footprint Manager (6) is also a hidden gem, because there isn't a better way to humble yourself than from a mismatched footprint. Meanwhile, using the version history (7) feature will also save you from your own “just one little change” disasters.

Don’t forget to include LCSC integration (8) as part of your processes; this is another chance to validate whether your design is manufacturable from a parts perspective. You should also use** panelization tooling (9)to reduce production costs, plus you should also use the Gerber viewer (10) as your final check for assuring you are going to send the right files to manufacturing.

By using these items together, EasyEDA Pro will transition from being just a tool, and become a design partner that will occasionally help you avoid heartache.

image.png

Printed Circuit Board close-up

PCB Design
Student resources for getting into CAD

I personally started out with Fusion 360 by Autodesk. Back then, I had joined an edtech course where they were teaching SolidWorks—but they asked us to download a cracked version, which didn’t sit right with me.

So I did a bit of research and found out about Autodesk’s official student license. That turned out to be a much better option since it gives free access to tools like Fusion 360 and Inventor for students.

To apply, you just need to be an active student (school, college, or university). You can register using your college ID or student email. Once your account is verified, you can directly download and start using the software.

Fusion 360 is widely designed to be beginner-friendly compared to tools like SolidWorks and NX, especially for people from non-mechanical backgrounds and hobbyists. At the same time, it still has all the capabilities needed for serious work and is currently being adopted by many industries—especially for its CAM features.

I mostly learned the basics on my own since the interface is quite intuitive, but there are also some great resources online. One series I’d highly recommend is “Fusion 360 in 30 Days” by Product Design Online.

If all this feels a bit overwhelming, I’d suggest starting by designing some basic parts. The series I mentioned really helps with that. You can also check out Tinkercad if you want something even simpler to get started.

Fusion 360 in 30 Days:
https://www.youtube.com/watch?v=d3qGQ2utl2A&list=PL2fGAHZdlxHOZfYOupIXibtlFG1WCl-ta

Autodesk student license:
https://www.autodesk.com/in/education/edu-software/overview

8723041083170902016

#CAD# #Fusion360# #Student Resources#

Mechatronic Components
Evaluating JLC’s Lead-Free SMT Process for Medical Prototypes.

For medical electronic prototypes, the stakes are significantly higher than for consumer gadgets. Reliability, biocompatibility, and regulatory compliance (like RoHS) are non-negotiable.When you evaluate JLCPCB’s Lead-Free SMT process for a medical application, you are looking at a system designed to meet RoHS (Restriction of Hazardous Substances) standards while maintaining high precision.


1. The Chemistry: Lead-Free (RoHS) Solder

Medical devices must be Lead-Free to prevent toxic heavy metals from entering clinical environments.

  • The Alloy: JLCPCB typically uses SAC305 (96.5% Tin, 3.0% Silver, 0.5% Copper) for their lead-free process.
  • The Challenge: Lead-free solder has a higher melting point and lower "wettability," meaning the solder doesn't flow as easily.
  • Medical Impact: SAC305 joints are generally stronger and more resistant to "creep" (deformation under stress), which is vital for devices that might undergo vibration or thermal cycling in a hospital setting.

[!IMPORTANT]

Because lead-free solder is less shiny than leaded solder, a "dull" joint in a medical prototype isn't necessarily a "cold" joint—it’s just the nature of the alloy.


2. Precise Component Placement (Pick and Place)

For medical prototypes involving tiny sensors or BGA/QFN packages, manual placement is too risky.

  • Automation: JLC uses high-speed Yamaha and Panasonic Pick-and-Place machines. These machines use high-resolution cameras (Vision Systems) to align components with micrometer precision.
  • Medical Accuracy: This ensures that parasitic capacitance and inductance, which can ruin the readings of a sensitive medical analog front-end (AFE), are minimized by perfectly centering components on their pads.
    For medical electronic prototypes, the evaluation of an SMT process centers on three pillars: Compliance (RoHS), Reliability (Solder Integrity), and Traceability.

When using JLCPCB for medical prototypes, you are essentially leveraging an industrial-scale automated line for small-batch runs. Here is how their lead-free process stands up to medical-grade requirements.


1. RoHS Compliance & Material Safety

Medical devices must be Lead-Free to ensure they are non-toxic in clinical environments.

  • The Alloy: JLCPCB uses SAC305 (96.5% Tin, 3.0% Silver, 0.5% Copper). This is the gold standard for lead-free soldering.
  • The Finish: For medical boards, you should pair lead-free SMT with an ENIG (Electroless Nickel Immersion Gold) surface finish. This provides a perfectly flat surface for tiny medical sensors and prevents oxidation over long-term use.
  • image.png

2. High-Density SMT: The "Medical-Grade" Machine

Medical prototypes often use tiny components (like 0201 or 0402 resistors) to save space.

  • Pick-and-Place (P&P): JLC uses advanced Yamaha and Panasonic machines with Vision Alignment. Before placing a component, a high-resolution camera checks the pads and the component's center.
  • Precision: This is critical for medical ICs like 24-bit ADCs or tiny BLE (Bluetooth Low Energy) modules, where a misaligned pad could introduce parasitic noise or a bridge.

3. Verification: AOI and X-Ray

For medical prototypes, "it looks okay" is not enough. You need Automated Inspection.

  • AOI (Automated Optical Inspection): A series of cameras and lights sweep the finished board. In the lead-free process, AOI is tuned to recognize the dull, grainy appearance of SAC305 as a "good" joint, rather than a "cold" joint.
  • X-Ray: For QFN and BGA packages (common in high-end medical microcontrollers), JLC uses X-Ray Inspection. This is the only way to catch hidden shorts or "voids" under the chip.
  • Medical Impact: In a diagnostic device, a single void in a thermal pad can cause the processor to overheat and fail during a surgery or test.
  • image.png
Build with JLCPCB
Ordering Stencils: Why You Should Never Hand-Solder QFNs Again

QFN (Quad Flat No-leads) packages are standard for modern microcontrollers and RF ICs because they are small and have excellent thermal properties. However, their design makes them a nightmare for a traditional soldering iron.

When you order a Frameless Stencil from JLCPCB (usually for just $7), you move from "hacking it together" to professional-grade assembly. Here is why stencils are mandatory for QFNs.

1. The "Invisible" Thermal Pad

The biggest reason to avoid hand-soldering QFNs is the large center pad (Exposed Pad or E-Pad). This pad is not just for ground; it is the primary heat sink for the chip.

  • The Hand-Solder Struggle: You cannot reach this pad with a soldering iron because it’s directly under the chip. Some designers try to drill a large "thermal via" and solder it from the bottom, but this often results in a weak connection or localized overheating of the substrate.
  • The Stencil Solution: The stencil applies a perfect square (or window-pane pattern) of solder paste on that center pad. When it hits the reflow oven or hot plate, the heat is distributed evenly, ensuring the chip stays cool during operation.
  • 8722942633988587520

2. Precise Solder Volume (Avoiding Shorts)

QFNs have tiny "pads" with no leads sticking out, often at a 0.4mm or 0.5mm pitch.

  • The Hand-Solder Struggle: If you apply solder wire by hand, even the smallest amount is often too much for a QFN. This leads to Solder Bridging (shorts between pins) under the chip, where you can't see them. You would need an X-ray to confirm if your board is dead.

  • The Stencil Solution: A laser-cut stencil from JLCPCB ensures exactly the right volume of solder paste is deposited. This is measured in microliters. This precision is what makes high-density boards possible.

    8722942710350086144

3. Surface Tension and Self-Alignment

This is a "magic" moment in PCB assembly.

  • The Hand-Solder Struggle: Trying to hold a 5mm x 5mm QFN in place while soldering one corner will almost certainly tilt it. This leads to tombstoning or pads not making contact.
  • The Stencil Solution: When the solder paste on all pads melts at once (in a reflow oven or on a hot plate), the surface tension of the liquid metal pulls the chip into its perfect center. If the chip was slightly misaligned, it "clicks" into place automatically. This only works with a stencil-applied layer of paste.

4. Professional Reliability

For high-speed or RF designs, hand-soldering QFNs can introduce parasitic inductance and capacitance.

  • The Hand-Solder Struggle: Blobs of solder on RF pins can act as antennas or change the impedance of the signal path.
  • The Stencil Solution: Uniform, thin solder joints provide the cleanest signal path for high-frequency microcontrollers and sensors.
  • 8722942851736555520
Build with JLCPCB