You are right and Carl also. The reflow profile is very important and he should use the recomended one in the solder paste datasheet. The components poping can be eliminated by drying them. Recommended temperatures and times are 40-45°C/192 hours or 125°C/24 hours. Basicly enought is to store the components with some silicon moisture absorber.
Friends of mine use a modified pizza oven with a customized controller. Infrared might also work better than direct contact. But do whatever you need to get the job done. Apparently it worked for the most part :)
Might not even be moisture in the sense of water, it might just have been the flux in the paste that was instantly getting turned into vapor causing the popping. I guess putting the spatula with the PCB on top of the plate for a little bit, to preheat everything a bit slower would make it work with that hot plate. But for roughly 200$ you can get a pretty decent IR reflow oven from china that is okay for prototyping and small batch productions. (Just have to open some of them up before using them, and take out the cheap masking tape inside and replace it with kapton tape...)
Actually, that might be a really great way to debug this. I suspect that the irregularities with stepping may be due to the shape of the magnetic field-- a lot of commercially produced brushless motors and generators go great lengths to ensure good shaping of the magnetic field to ensure smooth rotation and to cancel harmonics.
Yeah, generally there are many more N/S "pairs" generated by the coils, and more permanent magnets. I would think that you can get a much better result with your current design, if you use more permanent magnets. Try using 8 of the small ones you have, in "series" in the same orientation as your last attempt.
@@PhdHung But there's room for more magnets. I initially suggested using 8 small magnets, but it might actually work better if you use a number that isn't divisible by the amount of coils you have, so e.g. 5, 6, or 7.
@Martin Vizar Actually no, because 6 coils can be, it is divisible by 3. The main purpose of us to make a loop out of poles for example: 4 coils N S N S - N S N S - N S N S and so on.
We use 7 pole (14 total lobes) steppers with 1/256 micro stepping as our tracking motor for one of our telescopes. Pole geometry is important as all poles need to be wired the same way, so as the have the same entry and exit point on all phases to have consistent magnetic fields.
Beginners will also see the horrendous price tag Altium has and that’s probably also the reason why a lot of hobby and later job people will not use it i guess.
Altium is a professional grade software. I use it for business and for the price I think it is very reasonable. It's not really meant for hobbyists but I gather they are trying a different business model to address that market too.
Very nice! I believe the big issue is the dead zone between the coils. You may be able to fix it by stacking two layes of (shifted by 45 degres) coils on top of each other - either by multi-layer pcbs or by putting two PCBs on top of each other. In such a way the magnet will always be under the influence of some coil - and you could have twice as many steps per rotation.
the answer to your problem is shown at :15 seconds. you need more "teeth", four poles, 2 phase is not enough. have you tried stepping a 3 phase brushless?
This. Stepper motors work off of having many different "channels" or field locations to move between. Narrowing yourself down to only 4 field coils makes controlling something very difficult. Unfortunately with only a single layer PCB, there's not really a whole lot of space to squeeze more coils in without sacrificing strength.
Yup I replied the same thing. you can also solve the problem by varying the strengths of your magnetic field. The field is stronger/weaker depending on how close to the center of the coil the magnet is so by ramping the power of the magnets depending on the position will help. He may still have a problem while the magnet is over those wide coils though because it will be hard to get an even step while the rotor is over the traces.
I would be interested in oscilloscope traces of the phase current. Due to the low phase inductance (air core...) I imagine the current ripple to be huge, making microstepping very hard to impossible
Maybe the driver is not designed for the low inductance this PCB has, not sure I have not checked datasheet, but I guess there is an spec for min inductance. Maybe the chopping frequency can be adjusted.
I am also not 100% familiar with steppers, but things I would look at first: *) Geometry of the magnetic fields is important, Normal steppers have shaped soft iron cores, the air gap between coil/core is very important due to magnetic reluctance. Making it more reliable was a good first step, but I can imagine that the fields you generate are a bit too "disjoint". Increasing the number of poles, like suggested in another comment, might make it a bit better. The strongest force are at the points with least gap. This also means that you don't get a lot of force between steps. Maybe disassemble a bipolar stepper motor to look how you could apply similar principles :) The shape of your magnets is very likely relevant too. *) I am pretty sure you did that, but the drivers you use have a lot of features, that improve current usage and noise. These are designed using real stepper motors in mind and the algorithms they use might get "confused". I think they might use back-emf to measure some parameters. So disable all those features during debugging and maybe use 1/4 and 1/8th microsteps. Edit: Thanks for these very cool projects and sharing them online! There's so much we can learn from it!
I think it because is a small amount of moisture and when you heat it slow it has time to evaporate but when you rapid heat it is like exploded also it happens to some chips if you don't put on an oven at 100degrees for at least 2 hrs, it is called popcorn effect
The reason you are getting the jumping effect is caused by a high transient response (overshoot) per step angle. The way modern stepper motors mitigate this is by increasing the number of phases and poles to decrease the step angle for more precise steps. That's why in the hybrid motors you were talking about in the beginning, by using teeth those types of stepper motors are able to decrease their step size to fractions of an angle compared to the permanent magnet one you built. Lowering the speed and adding a type of dampener will also help prevent the high overshoot! Using an H-bridge motor driver is also usually the best option for stepper motors.
You can just septate the flex PCB from the stepper board and use fingers to attach solder the coil flex PCB to main pcb (similar to LCD Cables). You can also try 1.6mm @2oz copper, and 0.4mm @ 1oz and play around with that. Your issue with components is you did not let the pcb soak and the flux in the paste popped your components. This is an awesome project non the less!! Super awesome work :)
Consider using a second-hand toaster oven to reflow. Slap a solid-state relay and a microcontroller on there and you'll be able to precisely follow reflow curves!
We use normal 30$ otg oven and control its temperature using provided knob. Also, while soldering we need to heat from both sides of the pcb, which is only possible in otg oven. It works great and we have probably soldered more than 100 pcbs within 1 year.
The components jumping has happened to me before! It's due to moisture in the solder paste... after it happened to me, I checked the expiration date on the paste, it expired three years ago, lol. The issue is not from the hot plate, I also use a hot plate and it works fine, mind you I use leaded solder and have the temperature set to 200 C. Use fresh solder paste! I highly recommend the thermally stable solder paste from Chipquik, it does not require refrigeration for storage (it can be stored at room temperature): TS391AX
_Hi Carl, the rotor is responding erratically because the magnetic flux distribution contains regions of varying density._ _To be more precise, the flux is strongest at the axis of each coil. And it is weakest where two adjacent coils abut together._ _Try laminating two flexible coil circuits with a 45° offset. Then write new code that energizes the coils in 45° increments, rather than 90°._
With lots and lots of experience with PCB making.. I can say that Stencils and Solder paste is sometimes worth more trouble than it is worth. I generally hand solder everything and use a hot air reflow for SM components with pins under the IC. I think the poping could have been caused due to moisture in your components as well as the ramp up in temp.
I was thinking of adding intentional magnetic "cogging". Basically it's a bunch of iron "spokes". The spokes concentrate the magnetic field in specific areas and "lock" the magnetic rotor.
Did you try inverting the UART output? Some datasheets have a habit of showing the data as active-high (logically), but the signal is really active-low. Worth a shot. Is it also possible that because of the design of the flex PCB, the Trinamic driver isn't seen the same amount of back-EMF from the rotor, so it can't get proper feedback from it? On normal steppers, the rotor is quite solidly "captured" in the magnetic field.
As it's a one-wire UART, I figured it might use an open-drain driver, at least on one side. And yep, the diagram on the Trinamic site seems to suggest that. Those drivers are probably on their eval board. i.imgur.com/ynofGK8.png ie. when the TX on the Bus Master (Arduino) is enabled, it uses a push-pull driver, but it's also an inverting type. And when the device (stepper driver) wants to transmit, it only has an open-drain driver, so can only pull the line down to Ground to transmit. That also has the effect of inverting the transmitted data, though. The datasheets might just be showing the logical-high UART data, but really that normally gets inverted on the eval board. (I haven't actually read the datasheet, btw, this is just a hunch, as it might be quick to try. lol)
I think because the coils have very wide wire bundle it makes the area between two adjacent coils have no magnetic field and so the rotor become "loose" in those areas and is not stepping anymore until it's caught above the next coil
The reason stepper motor stators and rotors have ' ribbing " is to force the magnetic force lines between them. If you have any magnetic/conductive fillaments, try making what would look like a 3mm set of line li,e a clock face for the stator side and similar for the rotor. You missed the why of the stepper motor manufacturing and an accident on a stepper had me tear it open several times to find the lack of fins on my rotor meant it skipped. Good work so far, keep going!
Great work. I think it was skipping because the magnetic flux wasnt strong enough to get into a steady motion. Higher coil winding or increased current could generate more flux. Try increasing current, it might work more smoothly.
The problem is the wide variation in magnetic field across the poles. Either make the poles smaller or the magnets larger so that the varying magnetic flux is evenly distributed when interacting with the permanent magnet. You can use the magnetic field simulator software to get the flux map of your design. Increasing number of poles will certainly improve things. Commercial stepper motors have much larger number of pole pairs and equally large number of alternating permanent magnets in the rotor.
Also neodymium magnets has metallic conductive coating. Alternating magnetic field is inducing eddy currents in this coating which reduces motor efficiency. Try using magnets without metallic coating. Coating can be acid etched from available magnets.
In commercial environments, solder paste is flowed using IR being directed towards the board as opposed to conducting the heat through the board. This method would reduce the amount of heat load you'd be introducing into the substrate. It seems like direct heat from a heat gun, IR panel, or an oven situation, might be a better solution. Just my 2 cents
Your videos are so interesting and when so ever I see them in my feed I can't stop myself to watch it again and again. Watching this video 6th or 7th time.🤩😍
someone else mentioned this already, but they jumped likely because of moisture and yes, the rapid temperature change. many parts mention in their datasheet that you need to bake them before soldering
moisture in the components is why they 'popcorned'. usually smd parts have a moisture ingress rating and if the parts are exposed to atmosphere beyond a set period of days (or hours even) they need to be tossed in an oven for a bit.
There needs to be more poles on both rotor and stator in such way that when coil is activated there is always rotor magnet "close" ... so basically there needs to be magnet between poles in every position. That way the motor steps forward all the time. Also suggestion is to add hall-sensor so you know what position the rotor is so you can control more accurately the motor.
Hey, looks great so far :D Have you thought about putting some iron core into your four pcb coils? Should be very beneficial for the inductance and fore of the coils :)
+1. Stepper drivers are designed with high inductance of motor windings in mind, here the inductance is probably 10 or 100 times lower. This means their current regulation circuitry is probably not functioning. Adding external inductors in series to the windings may another solution.
Microstepping drivers are known to not have even microsteps. The key is that they are repeatable and that they're usually happening on a very small scale where the unevenness isn't going to be noticed (e.g. 8x micro-stepping on a motor which has 200 steps naively, not 200x micro-stepping on a motor with 8 native steps!).
Carl, check the datasheet for the driver and you will probably see that the microstepping amperage change follows (mimics) a sinusoidal wave. This helps fast turning motors run smoothly. HOWEVER ... if you are doing single steps, you will get almost no step change near the peaks and valleys because the amperage isn't changing much, and then big changes in between when it is. So, it always looks like it is skipping, even when it is not. The only way I can get equal steps is by using a dual h-bridge and full or half stepping manually (with my own code). Hope this helps. It really frustrated me until I realized what was happening. Those drivers just aren't really designed for single steps. Or at least not equal single steps.
Thanks for the tip! I think driving it manually with a custom driver would be better.. And this is probably how I would start if I design a second version
The problem of popping the chips out of the PCB is because of the moisture forming in between the legs of the chips and the PCB. Some distributors that deliver this kind of integrated chips put the chips in antistatic bags and after that they put also bags with silica gel to prevent moisture to build up inside the package, my distributor put also a sensitive paper in the package in order to see if the chips are contaminated with moisture. The theory behind is very simple, because of the temperature that rises quickly the small particles of moisture expands very quick and pressure builds up resulting a small thermal explosion that pop’s your bits of solder away an the small components also. I hope I was useful enough.
your reason for using a flex pcb is to get the 2 layers of coils closer together, this would be more expensive, but maybe you could try using a multi layer pcb, if sticking with 2 layers of coils, get a 4 layer pcb and the coil is on layer 1 and 2 (or design it with 4 layers of coils) (idk if this would work, still very new to this stuff, never designed a multilayer pcb, so idk what other considerations you would need)
I've had issues trying to talk to TMC drivers too (TMC2209). I might be wrong, but I think you have to start with a disable pdn_uart command to shut down the other mode of the UART pins. You might also want to make sure that all your message bytes are individually reversed for the crc, so when adreasing register 1, you actually feed 0b10000000 into the CRC.
your guess about the reason of flying components is correct. only reason I can guess about why motor don't work good is you need more than 4 coil on your pcb or you can use a steper motor magnet with more than 2 pole ! keep inside of coils free and open , put magnet there
Moisture contamination in the paste, or old paste will pop when heated quickly. I usually keep my paste in a sealed container in a refrigerator when not in use to maximize their freshness.
your guess was correct, but on the wrong substance- it's the water in it flashing to steam that's kicking your components. Heat slowly and with convection if possible.
Not sure if this can help you solve the UART com issue but try to put a 10k resistor to pull low "MODE" pin 9 on the trinamic. Bootstraping should be done before power on and not after power on and set the bootstrap by the MCU. Also the add0 and add1, try to put bootstrap resistor as well in order to program the address. Put a mosfet(BSS138 is a cheap option) to pull low VCCIO (pin 11) on the trinamic chip, this will allow you to reset the trinamic chip in case of error. If you do so, please remember to NOT connect pin 11 to the VCC directly but via a pull up resistor.
Dealing with tiny tiny steppers now (20 step/rev 8mmx8mm) and trying to microstep. Scope your voltage lines to the motor. What you might see if it's the same problem is that the current saturates really easily and instead of a sinewave looking waveform you end up with a few steps and then saturation. I've been fighting to get this down, but most drivers have potentiometers to set current and setting to things like 0.03v is hard with these parts to set things like 70ma current which is also out of spec for the the drivers. I've confirmed this behaviour at microstepping on 8825, a4988, stspin220 and trinamic 2209. Doesn't matter which, if current setting is too high it'll saturate quickly, so you need it very very very low and then limiting microstepping.
While using bigger stepps, it looked like the problem comes from I think has the name Oversteering. that means when it starts moving it accelerates to a speed, where the magnetic field isnt strong enough to hold it in the next position and the inertia brings it to the position after his designation. to test if it is the problem increase the amps or make the spinner as light aus you can.
It's not "skipping steps", it's just highly nonlinear. These motor drivers use chopper stabilized current limits. But your motor windings don't have enough inductance to allow the current limit to work properly. Those stepper drivers need 5-20 millihenries per phase to work properly. You could try adding inductors in series with the windings. Or you could make your own PWM based driver.
if you need to micro step smaller steps you may need more coils because a microstep is the step between two coils,the less the coils the less the step resolution but alternatively you can use gears
That's propably because of moisture (tiny watter bubbles "exploding" because they turn into steam) in the parts. In the industry you have special storages for parts to avoid this
Try submerging the motor in oil to give it bit of a damping. I've noticed that sometimes rotor have too much inertia and moves beyond the next position and when next step happens it makes the rotor go backwards. Loading the rotor with something (e.g. water or oil or some permanent break solved the issue)
cool project! Try cooling it on a peltier plate so you can pump more current through the coils without overheating. also try visualizing the magnetic field with magnetic field paper while the motor is running. i bet that would look super cool to see the magnetic field.
At the top of the coils the H field lines will be going horizontal. Have you tried turning the magnets on the rotor to be horizontal vs the up/down ? Ie N/S in the fixed magnets will be coplanar to the PCB.
I’m worried the coils aren’t circular enough to get even stepping... The way I see it, there are two options: 1) Stack two boards with a 45° offset to add more poles. 2) Add more permanent magnets to the rotor at intermediate rotations (halbach array style).
I guess you want to store your solder paste in a box with some silica thingies to keep the moisture down, just like you would with filament Or ramp the temperature to release the moisture, but I think avoiding humidity in the first place sounds like a good idea too
Very cool! I think the other direction you could go with this is field oriented control, which may be more natural to implement with the pcbmotor designs
In 3D printing there have been problems with unofficial TMC driver modules not working with UART because some pins needed to be set to switch it from SPI to UART. I remember having to get my soldering iron to short some pins on my boards but I can't remember what they were. Maybe it's a similar problem?
If you can find a way to reduce the air gap with ferrous metal, you would get way better performance. A switched reluctance design is also worth trying.
I think skipping steps are caused by the inertia of the router. Maybe if you can make a lighter router together with minimizing the current as much as possible to apply smaller force it would work with your configuration.
I would guess that skipping steps can be at least partially attributed to the fact that with stator configuration like yours you need to imagine inverted magnetic flux inbetween the coils, so your 4 pole stator is actually 8 pole. If you designed stator with equal spacing between coils you could probably take advantage of this effect. I have designed similar motor to this and I couldn't make it autostart, and this was the reason. sometimes magnet got stuck "between" coils and because I used on/off hall sensors to read position, it did not switch. I would have to use 4 sensors for 4 poles or use only 2 poles at the same time (same as PC fans basically)
For TMC watch carefully for the connection of bi- an one-directional communication. Also they suggest to not use highest BAUD Rate, it seems the also have not very stable com-driver. The cheap designs on ebay also don't always work well. For the magnetic field of your trinangle based coils i suggest to measure or maybe just sketch the field. The problems at borders of different fields are manifold. Maybe one phase current isn't exactly the same as the others. Do you have measured/knowledge about difference in phase resistance? maybe pre resistors can equalize field inhomogeneuosity, between coils/phases.
You will have "popcorning" if the PCB and components have been exposed to moisture. Having the solder paste in the fridge can give same problem if that's the first portion that you squeezed out of the syringe.
Maybe it was suggested before but I think that the fix rotor shaking/vibrating when stepped is to add some DAMPING to it. That phenomenon is known with steppers.
I know this is 2 years later, but did you ever get the communcation with the single wire uart working? I ran into a very similar issue and after much headache, I discovered that trinamic used a different wiring convention for tx/rx then I was used to. Essentially, instead of commecting the uC rx to the trinamic tx, (and tx to rx), you have to connect the uC tx to the trinamic tx (and rx to rx).
I am wondering about the magnetic field shape : the coils are pretty wide and the magnetic flux may be high when close to the coil wires/ The flux is lower in the center of the coils. As suggested in other comments use more poles to have smaller coils
Put two discs with coils one under another with 45 degree shift, you will have 8 coils and you won't skipp steps. Or put one over another like sandwith with magnet between.
Very cool pcb design and idea! But I think what you made is closer to a regular brushless motor than a stepper motor. There isn’t a strict definition of what a stepper motor is. It’s all about how you drive it. So you have technically made a stepper motor. But it’s a 4 step motor. The main benefit of stepper motors is their high pole count. Usually those poles are created by steel teeth so you get a high pole count for low cost. I think the behavior you’re seeing of poor position control is not due to the driver. It’s just the magnetics. You could test that by sending a very slow sine wave through each coil (offset between the two coils). That’s essentially all that microstepping is doing. It’s open loop control.
I wonder if the reason for the jerky motion is because the field from the coils is not uniform? Perhaps the phase difference between the coils needs to vary over a full cycle?
This is a wonderful project, I suggest you another amendment to make the rotor steps more accurate, which is to design small copper coils on the perimeter of the circle so that each coil acts as a magnet that attracts the rotor I apologize for the linguistic mistakes.
I'm guessing the components were jumping because the the hot-plate was so hot that the flux in the solder paste started instantly to boil vigorously. I'm guessing the earlier boards worked without jumping because the hot-plate was hot enough to melt the solder, but so hot that the solder flux boiled vigorously.
Good Sir. You might have a look at some Vapor-Phase Solder devices. I know they are a bit more place and financially consuming but you basicly can not overheat the Flex-PCB's due the principle of how vapor-phase works. Good channel. Best of success.
The rings inside motor coils are looking like metallization. If it so, it can act as a short circuit turn in the coil and would strongly affect driver in micro stepping mode.
I think the problem is in non-linearity. When changing magnetic induction in motor with 200 poles the forces are high and the difference in reluktance is low, here it is massive, so for linear microstep non linear currents would be needed.
I think this would be a great opportunity to get some magnetic viewing film to try and observe the actual magnetic fields produced. Also about the flexible PCB dilemma. Would it be possible to have some standard ones made with one coil and the connectors and so on and then get one of the "coil pads" from one of these prototypes and glue it on top of the coil on the hard pcb? this way you could get the stability of a hard PCB but also the stronger magnetic field from the flexible ones? and use the one coil on the hard PCB to augment that further?
Amazing video as always!!! I feel that the skipping issue may have occured due to the number of coils on the PCB. This may change with the addition of coils. Great video as always!!
Microstepping (and even half stepping) isn't actually supposed to be used to reliably improve resolution of positioning but rather to create smoother movements - you should always stop rotor at full step position. Of course you can always try, but static friction and different inaccuracies will limit the performance.
popping is probably due to moisture, usually it is released in the pre-heat phase of the reflow
You are right and Carl also. The reflow profile is very important and he should use the recomended one in the solder paste datasheet. The components poping can be eliminated by drying them. Recommended temperatures and times are 40-45°C/192 hours or 125°C/24 hours. Basicly enought is to store the components with some silicon moisture absorber.
Friends of mine use a modified pizza oven with a customized controller. Infrared might also work better than direct contact. But do whatever you need to get the job done. Apparently it worked for the most part :)
Might not even be moisture in the sense of water, it might just have been the flux in the paste that was instantly getting turned into vapor causing the popping. I guess putting the spatula with the PCB on top of the plate for a little bit, to preheat everything a bit slower would make it work with that hot plate.
But for roughly 200$ you can get a pretty decent IR reflow oven from china that is okay for prototyping and small batch productions. (Just have to open some of them up before using them, and take out the cheap masking tape inside and replace it with kapton tape...)
Replying to boost this comment
In industry it is called popcorn effect. Moisture or contamination
I would love to see how that looks with magnetic film on top!
Actually, that might be a really great way to debug this. I suspect that the irregularities with stepping may be due to the shape of the magnetic field-- a lot of commercially produced brushless motors and generators go great lengths to ensure good shaping of the magnetic field to ensure smooth rotation and to cancel harmonics.
İ think, you have to increase the count of coils if you want more precise steper motor. Not 4 coils but 8 or more)
Yeah, generally there are many more N/S "pairs" generated by the coils, and more permanent magnets.
I would think that you can get a much better result with your current design, if you use more permanent magnets.
Try using 8 of the small ones you have, in "series" in the same orientation as your last attempt.
The problem here is that there isn't a lot of space to squeeze more coils.
@@PhdHung But there's room for more magnets. I initially suggested using 8 small magnets, but it might actually work better if you use a number that isn't divisible by the amount of coils you have, so e.g. 5, 6, or 7.
Correct me if my claims are wrong..
..but shouldn't the number of Magnets be always divisible by 2 and the number of Poles always divisible by 3..?
@Martin Vizar Actually no, because 6 coils can be, it is divisible by 3. The main purpose of us to make a loop out of poles for example: 4 coils N S N S - N S N S - N S N S and so on.
We use 7 pole (14 total lobes) steppers with 1/256 micro stepping as our tracking motor for one of our telescopes. Pole geometry is important as all poles need to be wired the same way, so as the have the same entry and exit point on all phases to have consistent magnetic fields.
Beginners will also see the horrendous price tag Altium has and that’s probably also the reason why a lot of hobby and later job people will not use it i guess.
Its free for students tho^^
Yes, just use KiCad
I've personally tried Altium, Eagle, Solidworks PCB and easyEDA but KiCAD is still my favorite.
Lol you think altium is expensive! Look at mentor pads
Altium is a professional grade software. I use it for business and for the price I think it is very reasonable. It's not really meant for hobbyists but I gather they are trying a different business model to address that market too.
Very nice! I believe the big issue is the dead zone between the coils. You may be able to fix it by stacking two layes of (shifted by 45 degres) coils on top of each other - either by multi-layer pcbs or by putting two PCBs on top of each other. In such a way the magnet will always be under the influence of some coil - and you could have twice as many steps per rotation.
the answer to your problem is shown at :15 seconds. you need more "teeth", four poles, 2 phase is not enough. have you tried stepping a 3 phase brushless?
This. Stepper motors work off of having many different "channels" or field locations to move between. Narrowing yourself down to only 4 field coils makes controlling something very difficult. Unfortunately with only a single layer PCB, there's not really a whole lot of space to squeeze more coils in without sacrificing strength.
Could you phase shift the bottom layer coils by 45 degrees so there would be 2 phases on bottom, 2 phases on top?
I second this answer, that's what the teeth on a stepper are for :)
Yup I replied the same thing. you can also solve the problem by varying the strengths of your magnetic field. The field is stronger/weaker depending on how close to the center of the coil the magnet is so by ramping the power of the magnets depending on the position will help. He may still have a problem while the magnet is over those wide coils though because it will be hard to get an even step while the rotor is over the traces.
I would be interested in oscilloscope traces of the phase current. Due to the low phase inductance (air core...) I imagine the current ripple to be huge, making microstepping very hard to impossible
Maybe the driver is not designed for the low inductance this PCB has, not sure I have not checked datasheet, but I guess there is an spec for min inductance. Maybe the chopping frequency can be adjusted.
_Hi Carl! When spreading solder paste, instead of using flimsy business cards, pick up a few blank RFID cards from Ebay._ 👍
or old gift cards
@@excitedbox5705 Or new loyalty program cards lol
Or brand new non-activated credit cards that you did not order (banks send them to encourage you to open an account where I live).
The best choice is an old stencil mask(size must fit the respective PCB size) 🤗 This also allows to remove excess paste after printing.
Or 3d print one 😏
"In theory should work", I say this all the time when not is working properly haha
I am also not 100% familiar with steppers, but things I would look at first:
*) Geometry of the magnetic fields is important, Normal steppers have shaped soft iron cores, the air gap between coil/core is very important due to magnetic reluctance. Making it more reliable was a good first step, but I can imagine that the fields you generate are a bit too "disjoint". Increasing the number of poles, like suggested in another comment, might make it a bit better. The strongest force are at the points with least gap.
This also means that you don't get a lot of force between steps.
Maybe disassemble a bipolar stepper motor to look how you could apply similar principles :)
The shape of your magnets is very likely relevant too.
*) I am pretty sure you did that, but the drivers you use have a lot of features, that improve current usage and noise. These are designed using real stepper motors in mind and the algorithms they use might get "confused". I think they might use back-emf to measure some parameters. So disable all those features during debugging and maybe use 1/4 and 1/8th microsteps.
Edit: Thanks for these very cool projects and sharing them online! There's so much we can learn from it!
I think it because is a small amount of moisture and when you heat it slow it has time to evaporate but when you rapid heat it is like exploded also it happens to some chips if you don't put on an oven at 100degrees for at least 2 hrs, it is called popcorn effect
The reason you are getting the jumping effect is caused by a high transient response (overshoot) per step angle. The way modern stepper motors mitigate this is by increasing the number of phases and poles to decrease the step angle for more precise steps. That's why in the hybrid motors you were talking about in the beginning, by using teeth those types of stepper motors are able to decrease their step size to fractions of an angle compared to the permanent magnet one you built. Lowering the speed and adding a type of dampener will also help prevent the high overshoot! Using an H-bridge motor driver is also usually the best option for stepper motors.
Try using an iron core inside the coils, something like a steel washer.
I think the magnetic field is spreading to far.
Maybe it will stop it from skipping.
You can just septate the flex PCB from the stepper board and use fingers to attach solder the coil flex PCB to main pcb (similar to LCD Cables). You can also try 1.6mm @2oz copper, and 0.4mm @ 1oz and play around with that.
Your issue with components is you did not let the pcb soak and the flux in the paste popped your components.
This is an awesome project non the less!! Super awesome work :)
Consider using a second-hand toaster oven to reflow. Slap a solid-state relay and a microcontroller on there and you'll be able to precisely follow reflow curves!
We use normal 30$ otg oven and control its temperature using provided knob. Also, while soldering we need to heat from both sides of the pcb, which is only possible in otg oven. It works great and we have probably soldered more than 100 pcbs within 1 year.
The components jumping has happened to me before! It's due to moisture in the solder paste... after it happened to me, I checked the expiration date on the paste, it expired three years ago, lol. The issue is not from the hot plate, I also use a hot plate and it works fine, mind you I use leaded solder and have the temperature set to 200 C.
Use fresh solder paste! I highly recommend the thermally stable solder paste from Chipquik, it does not require refrigeration for storage (it can be stored at room temperature): TS391AX
can you "reflow" some butter and kernels to a Aluminuim sheet to see if the popping still occurs?
_Hi Carl, the rotor is responding erratically because the magnetic flux distribution contains regions of varying density._
_To be more precise, the flux is strongest at the axis of each coil. And it is weakest where two adjacent coils abut together._
_Try laminating two flexible coil circuits with a 45° offset. Then write new code that energizes the coils in 45° increments, rather than 90°._
Hey man, I like your videos. Love how you show your R&D steps and how you go about trying to solve issues you run in to. Keep it up!
@Carl Bugeja you have to add more coils to the flexible pcb if you want to have precise and more steps
With lots and lots of experience with PCB making.. I can say that Stencils and Solder paste is sometimes worth more trouble than it is worth. I generally hand solder everything and use a hot air reflow for SM components with pins under the IC. I think the poping could have been caused due to moisture in your components as well as the ramp up in temp.
If you look at the timing of the skipped steps it's consistently at the center of coils. You need an offset, either an extra magnet or extra coils.
I was thinking of adding intentional magnetic "cogging". Basically it's a bunch of iron "spokes". The spokes concentrate the magnetic field in specific areas and "lock" the magnetic rotor.
Did you try inverting the UART output?
Some datasheets have a habit of showing the data as active-high (logically), but the signal is really active-low. Worth a shot.
Is it also possible that because of the design of the flex PCB, the
Trinamic driver isn't seen the same amount of back-EMF from the rotor, so it can't get proper feedback from it?
On normal steppers, the rotor is quite solidly "captured" in the magnetic field.
As it's a one-wire UART, I figured it might use an open-drain driver, at least on one side.
And yep, the diagram on the Trinamic site seems to suggest that. Those drivers are probably on their eval board.
i.imgur.com/ynofGK8.png
ie. when the TX on the Bus Master (Arduino) is enabled, it uses a push-pull driver, but it's also an inverting type.
And when the device (stepper driver) wants to transmit, it only has an open-drain driver, so can only pull the line down to Ground to transmit. That also has the effect of inverting the transmitted data, though.
The datasheets might just be showing the logical-high UART data, but really that normally gets inverted on the eval board.
(I haven't actually read the datasheet, btw, this is just a hunch, as it might be quick to try. lol)
I think because the coils have very wide wire bundle it makes the area between two adjacent coils have no magnetic field and so the rotor become "loose" in those areas and is not stepping anymore until it's caught above the next coil
The reason stepper motor stators and rotors have ' ribbing " is to force the magnetic force lines between them. If you have any magnetic/conductive fillaments, try making what would look like a 3mm set of line li,e a clock face for the stator side and similar for the rotor. You missed the why of the stepper motor manufacturing and an accident on a stepper had me tear it open several times to find the lack of fins on my rotor meant it skipped.
Good work so far, keep going!
Great work. I think it was skipping because the magnetic flux wasnt strong enough to get into a steady motion. Higher coil winding or increased current could generate more flux. Try increasing current, it might work more smoothly.
The problem is the wide variation in magnetic field across the poles. Either make the poles smaller or the magnets larger so that the varying magnetic flux is evenly distributed when interacting with the permanent magnet. You can use the magnetic field simulator software to get the flux map of your design. Increasing number of poles will certainly improve things. Commercial stepper motors have much larger number of pole pairs and equally large number of alternating permanent magnets in the rotor.
Also neodymium magnets has metallic conductive coating. Alternating magnetic field is inducing eddy currents in this coating which reduces motor efficiency. Try using magnets without metallic coating. Coating can be acid etched from available magnets.
In commercial environments, solder paste is flowed using IR being directed towards the board as opposed to conducting the heat through the board. This method would reduce the amount of heat load you'd be introducing into the substrate. It seems like direct heat from a heat gun, IR panel, or an oven situation, might be a better solution. Just my 2 cents
Your videos are so interesting and when so ever I see them in my feed I can't stop myself to watch it again and again. Watching this video 6th or 7th time.🤩😍
someone else mentioned this already, but they jumped likely because of moisture and yes, the rapid temperature change. many parts mention in their datasheet that you need to bake them before soldering
moisture in the components is why they 'popcorned'. usually smd parts have a moisture ingress rating and if the parts are exposed to atmosphere beyond a set period of days (or hours even) they need to be tossed in an oven for a bit.
There needs to be more poles on both rotor and stator in such way that when coil is activated there is always rotor magnet "close" ... so basically there needs to be magnet between poles in every position. That way the motor steps forward all the time. Also suggestion is to add hall-sensor so you know what position the rotor is so you can control more accurately the motor.
Hey, looks great so far :D
Have you thought about putting some iron core into your four pcb coils?
Should be very beneficial for the inductance and fore of the coils :)
+1. Stepper drivers are designed with high inductance of motor windings in mind, here the inductance is probably 10 or 100 times lower. This means their current regulation circuitry is probably not functioning.
Adding external inductors in series to the windings may another solution.
Microstepping drivers are known to not have even microsteps. The key is that they are repeatable and that they're usually happening on a very small scale where the unevenness isn't going to be noticed (e.g. 8x micro-stepping on a motor which has 200 steps naively, not 200x micro-stepping on a motor with 8 native steps!).
Carl, check the datasheet for the driver and you will probably see that the microstepping amperage change follows (mimics) a sinusoidal wave. This helps fast turning motors run smoothly. HOWEVER ... if you are doing single steps, you will get almost no step change near the peaks and valleys because the amperage isn't changing much, and then big changes in between when it is. So, it always looks like it is skipping, even when it is not. The only way I can get equal steps is by using a dual h-bridge and full or half stepping manually (with my own code). Hope this helps. It really frustrated me until I realized what was happening. Those drivers just aren't really designed for single steps. Or at least not equal single steps.
Thanks for the tip! I think driving it manually with a custom driver would be better.. And this is probably how I would start if I design a second version
The problem of popping the chips out of the PCB is because of the moisture forming in between the legs of the chips and the PCB. Some distributors that deliver this kind of integrated chips put the chips in antistatic bags and after that they put also bags with silica gel to prevent moisture to build up inside the package, my distributor put also a sensitive paper in the package in order to see if the chips are contaminated with moisture. The theory behind is very simple, because of the temperature that rises quickly the small particles of moisture expands very quick and pressure builds up resulting a small thermal explosion that pop’s your bits of solder away an the small components also. I hope I was useful enough.
your reason for using a flex pcb is to get the 2 layers of coils closer together,
this would be more expensive, but maybe you could try using a multi layer pcb,
if sticking with 2 layers of coils, get a 4 layer pcb and the coil is on layer 1 and 2 (or design it with 4 layers of coils)
(idk if this would work, still very new to this stuff, never designed a multilayer pcb, so idk what other considerations you would need)
I've had issues trying to talk to TMC drivers too (TMC2209). I might be wrong, but I think you have to start with a disable pdn_uart command to shut down the other mode of the UART pins. You might also want to make sure that all your message bytes are individually reversed for the crc, so when adreasing register 1, you actually feed 0b10000000 into the CRC.
your guess about the reason of flying components is correct. only reason I can guess about why motor don't work good is you need more than 4 coil on your pcb or you can use a steper motor magnet with more than 2 pole !
keep inside of coils free and open , put magnet there
Moisture contamination in the paste, or old paste will pop when heated quickly. I usually keep my paste in a sealed container in a refrigerator when not in use to maximize their freshness.
your guess was correct, but on the wrong substance- it's the water in it flashing to steam that's kicking your components. Heat slowly and with convection if possible.
Not sure if this can help you solve the UART com issue but try to put a 10k resistor to pull low "MODE" pin 9 on the trinamic. Bootstraping should be done before power on and not after power on and set the bootstrap by the MCU. Also the add0 and add1, try to put bootstrap resistor as well in order to program the address. Put a mosfet(BSS138 is a cheap option) to pull low VCCIO (pin 11) on the trinamic chip, this will allow you to reset the trinamic chip in case of error. If you do so, please remember to NOT connect pin 11 to the VCC directly but via a pull up resistor.
Dealing with tiny tiny steppers now (20 step/rev 8mmx8mm) and trying to microstep. Scope your voltage lines to the motor. What you might see if it's the same problem is that the current saturates really easily and instead of a sinewave looking waveform you end up with a few steps and then saturation. I've been fighting to get this down, but most drivers have potentiometers to set current and setting to things like 0.03v is hard with these parts to set things like 70ma current which is also out of spec for the the drivers. I've confirmed this behaviour at microstepping on 8825, a4988, stspin220 and trinamic 2209. Doesn't matter which, if current setting is too high it'll saturate quickly, so you need it very very very low and then limiting microstepping.
Seems like you had a great learning experience. The work u did seemed quite challenging to me. Good luck with the next iteration!
This is definitively the best "sponsor integration" I ever saw o/
Not sure, when the sponsor makes him say something precise it's oftenly not good...
thought a bit more disclosure would be nice
Thanks. I hate it.
I wouldnt know, I use SponsorBlock
@@katjastrand3955 I watched the video before it was addedd to the sponsorblock database :P
brilliant work! You are such an inspiration. Thank you for making such videos.
That was incredible!! I would love to see more videos on this!!!
While using bigger stepps, it looked like the problem comes from I think has the name Oversteering. that means when it starts moving it accelerates to a speed, where the magnetic field isnt strong enough to hold it in the next position and the inertia brings it to the position after his designation. to test if it is the problem increase the amps or make the spinner as light aus you can.
It's not "skipping steps", it's just highly nonlinear. These motor drivers use chopper stabilized current limits. But your motor windings don't have enough inductance to allow the current limit to work properly. Those stepper drivers need 5-20 millihenries per phase to work properly. You could try adding inductors in series with the windings. Or you could make your own PWM based driver.
if you need to micro step smaller steps you may need more coils because a microstep is the step between two coils,the less the coils the less the step resolution but alternatively you can use gears
That's propably because of moisture (tiny watter bubbles "exploding" because they turn into steam) in the parts. In the industry you have special storages for parts to avoid this
Try submerging the motor in oil to give it bit of a damping. I've noticed that sometimes rotor have too much inertia and moves beyond the next position and when next step happens it makes the rotor go backwards. Loading the rotor with something (e.g. water or oil or some permanent break solved the issue)
cool project! Try cooling it on a peltier plate so you can pump more current through the coils without overheating. also try visualizing the magnetic field with magnetic field paper while the motor is running. i bet that would look super cool to see the magnetic field.
Maybe your PCB motors are more suited for low-load / high-speed applications like an ultra thin fan that cools down a PCB.
Keep it up!
At the top of the coils the H field lines will be going horizontal. Have you tried turning the magnets on the rotor to be horizontal vs the up/down ? Ie N/S in the fixed magnets will be coplanar to the PCB.
Congrats on moving to New lab.
It's refreshing to see one not cluttered with junk everywhere.
I’m worried the coils aren’t circular enough to get even stepping...
The way I see it, there are two options:
1) Stack two boards with a 45° offset to add more poles.
2) Add more permanent magnets to the rotor at intermediate rotations (halbach array style).
I guess you want to store your solder paste in a box with some silica thingies to keep the moisture down, just like you would with filament
Or ramp the temperature to release the moisture, but I think avoiding humidity in the first place sounds like a good idea too
3:30
*THAT WAS A SUPER EPIC FAIL!*
Have you (would you) consider using nitinol memory wire in a small robot project?
Very cool! I think the other direction you could go with this is field oriented control, which may be more natural to implement with the pcbmotor designs
Have you tried pulling the mode pin (pin 9) of the TMC chip to ground? That should change it to UART mode
In 3D printing there have been problems with unofficial TMC driver modules not working with UART because some pins needed to be set to switch it from SPI to UART. I remember having to get my soldering iron to short some pins on my boards but I can't remember what they were. Maybe it's a similar problem?
If you can find a way to reduce the air gap with ferrous metal, you would get way better performance. A switched reluctance design is also worth trying.
Please check if phase coils should overlap for proper operation of motor (say one phase coils meet at the middle of second phase coil). Best Regards
I think skipping steps are caused by the inertia of the router. Maybe if you can make a lighter router together with minimizing the current as much as possible to apply smaller force it would work with your configuration.
I would love to if you could get a cheap absolute encoder onboard and try closed loop control.
I would guess that skipping steps can be at least partially attributed to the fact that with stator configuration like yours you need to imagine inverted magnetic flux inbetween the coils, so your 4 pole stator is actually 8 pole. If you designed stator with equal spacing between coils you could probably take advantage of this effect.
I have designed similar motor to this and I couldn't make it autostart, and this was the reason. sometimes magnet got stuck "between" coils and because I used on/off hall sensors to read position, it did not switch. I would have to use 4 sensors for 4 poles or use only 2 poles at the same time (same as PC fans basically)
For TMC watch carefully for the connection of bi- an one-directional communication. Also they suggest to not use highest BAUD Rate, it seems the also have not very stable com-driver. The cheap designs on ebay also don't always work well.
For the magnetic field of your trinangle based coils i suggest to measure or maybe just sketch the field. The problems at borders of different fields are manifold. Maybe one phase current isn't exactly the same as the others. Do you have measured/knowledge about difference in phase resistance? maybe pre resistors can equalize field inhomogeneuosity, between coils/phases.
Air was between plate and paste there for your pcb
You will have "popcorning" if the PCB and components have been exposed to moisture. Having the solder paste in the fridge can give same problem if that's the first portion that you squeezed out of the syringe.
Maybe it was suggested before but I think that the fix rotor shaking/vibrating when stepped is to add some DAMPING to it.
That phenomenon is known with steppers.
I know this is 2 years later, but did you ever get the communcation with the single wire uart working? I ran into a very similar issue and after much headache, I discovered that trinamic used a different wiring convention for tx/rx then I was used to. Essentially, instead of commecting the uC rx to the trinamic tx, (and tx to rx), you have to connect the uC tx to the trinamic tx (and rx to rx).
You could make this 4 phase by adding more layers and rotating the coil 45 degrees on the deeper layers.
I am wondering about the magnetic field shape : the coils are pretty wide and the magnetic flux may be high when close to the coil wires/ The flux is lower in the center of the coils.
As suggested in other comments use more poles to have smaller coils
First video of yours I've watched, and I really enjoyed it!
+ Subscribed!
Make a PID board to program temperature gradients into your hot plate!
Put two discs with coils one under another with 45 degree shift, you will have 8 coils and you won't skipp steps. Or put one over another like sandwith with magnet between.
How about stacking two flex PCB's but 45° apart so their coil overlap?
moisture in the solderpaste, keep solder paste in the fridge.
Very cool pcb design and idea! But I think what you made is closer to a regular brushless motor than a stepper motor. There isn’t a strict definition of what a stepper motor is. It’s all about how you drive it. So you have technically made a stepper motor. But it’s a 4 step motor. The main benefit of stepper motors is their high pole count. Usually those poles are created by steel teeth so you get a high pole count for low cost.
I think the behavior you’re seeing of poor position control is not due to the driver. It’s just the magnetics. You could test that by sending a very slow sine wave through each coil (offset between the two coils). That’s essentially all that microstepping is doing. It’s open loop control.
I wonder if the reason for the jerky motion is because the field from the coils is not uniform? Perhaps the phase difference between the coils needs to vary over a full cycle?
This is a wonderful project, I suggest you another amendment to make the rotor steps more accurate, which is to design small copper coils on the perimeter of the circle so that each coil acts as a magnet that attracts the rotor I apologize for the linguistic mistakes.
I'm guessing the components were jumping because the the hot-plate was so hot that the flux in the solder paste started instantly to boil vigorously. I'm guessing the earlier boards worked without jumping because the hot-plate was hot enough to melt the solder, but so hot that the solder flux boiled vigorously.
I love this application
Good Sir. You might have a look at some Vapor-Phase Solder devices. I know they are a bit more place and financially consuming but you basicly can not overheat the Flex-PCB's due the principle of how vapor-phase works. Good channel. Best of success.
The rings inside motor coils are looking like metallization. If it so, it can act as a short circuit turn in the coil and would strongly affect driver in micro stepping mode.
Very interesting project! I hope to see more of it. Maybe more phases would help with your skipping problem? Either that or more turns per phase.
those components jumped due to either moisture or flux in the solder paste rapidly heating and popping bubbles. like you said, they need slow heating.
I think the problem is in non-linearity. When changing magnetic induction in motor with 200 poles the forces are high and the difference in reluktance is low, here it is massive, so for linear microstep non linear currents would be needed.
I think this would be a great opportunity to get some magnetic viewing film to try and observe the actual magnetic fields produced.
Also about the flexible PCB dilemma. Would it be possible to have some standard ones made with one coil and the connectors and so on and then get one of the "coil pads" from one of these prototypes and glue it on top of the coil on the hard pcb? this way you could get the stability of a hard PCB but also the stronger magnetic field from the flexible ones? and use the one coil on the hard PCB to augment that further?
Awesome work man
Amazing video as always!!!
I feel that the skipping issue may have occured due to the number of coils on the PCB. This may change with the addition of coils.
Great video as always!!
Thanks! I agree having 8poles or more will be much better
Microstepping (and even half stepping) isn't actually supposed to be used to reliably improve resolution of positioning but rather to create smoother movements - you should always stop rotor at full step position. Of course you can always try, but static friction and different inaccuracies will limit the performance.
You could try using rigid flex PCBs.
I think if add more coils, you can manage better the magnetic fields. I love your projects btw