Welcome! Log In Create A New Profile

Advanced

Unusual stepper ratings - vref settings for new Melzi

Posted by Mr Joshua 
Unusual stepper ratings - vref settings for new Melzi
February 18, 2014 10:50AM
Got my new Melzi board today.

I've hooked it up and very briefly tested it. Mostly appears to work except the LED on the board hasn't come on once for some reason. Bit odd but not the end of the world - not thoroughly tested it yet though.

Now I want to ensure everything is setup correctly before I try printing anything, but here's the thing. The steppers that came with this machine are rated at 0.4 amps even though I understand a typical Nema17 would be anything from 1-2 amps. So given they have a lower rating, I assume they're a bit weaker than normal ones, but also would need the Melzi's drivers setting to a lower output to avoid overheating them or damaging them?

Any idea what the vref should be set to then on account of the 0.4a rating that these steppers have?

Appreciate the help
Thanks smiling smiley
Jim

Edited 2 time(s). Last edit at 02/18/2014 05:41PM by Mr Joshua.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 18, 2014 03:51PM
A certain value for vref will give a certain current (amps) value for the motor output. The exact math relation for the drivers you have is something to research yourself, e.g. if you use pololu drivers try pololu site.

The 0.4A value points to a high resistance (/high impedance) motor type (12v?). Cant be sure because the other information on the motor label is missing. Also the actual vref setting is missing, so speculation is in order.

As everything appears to work, check if you dont have missing steps, e.g. move to a point and mark it down, move away and make 10+ other moves in both directions and at speeds, then return at the point and see if there is any difference, if it is then perhaps its missing steps. Hard to actually see, and its better done with a comparator tool, but probably can be done with other means. If it doesnt miss steps leave it like it is. If it does miss steps, assuming vref is set for 0.4a you can perhaps set it up to like ti give 0.57a current peak and try again (perhaps datasheet might mention that at ustep the current is 70% of the full step value). You could try pusing the current envelope a little further because the 0.4a is dc or average, and driver sets the peak and peak is not average, sort of at microstep many of the positions will have actual lower peaks. Also perhaps the lowest of those values will be too low. However is not much room to push current up. If resistance is lets say 30 ohms, then it doesnt matter if you set vref to give 1a, since with 12v/30ohms, it can not actually grow to 1a -ever. You would need 30v psu to have a 30ohms to reach 1a. Also if the resistance~impedance is too much then perhaps the current just wont have enough time to grow sort of speaking at high speeds (rpm) the motor may loose torque so might need to set the max speeds and acceleration values to lower than usual.
Re: Unusual stepper ratings - vref settings for new Melzi
February 18, 2014 04:51PM
It's not just the LED though it seems. Now I've actually tried all the functions it seems there are 3 issues with this new board:
1) No LED coming on at all. Not once.
2) The extruder stepper does not run when I tell it to feed/reverse the filament (is there anything in the repetier software that would prevent the extruder stepper from moving?)
3) The Z axis moves extremely slowly, and 'judders'. I've tried cautiously increasing the vref on the z axis a little at a time but it still behaves the same.

Edited 3 time(s). Last edit at 02/18/2014 05:39PM by Mr Joshua.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 18, 2014 05:30PM
Edit - I'm slightly confused about the steppers now I've been researching them more.

This is aside from the issue with the board, which I believe is faulty.

The ones I have are:
17HS3404N - which are shown as 12v 0.4a phase resistance 30 ohms

The ones my friends both have on their machines are:
YH42BYGH47-401A - which I've seen on some sites saying 2.8v and other sites saying 12v, but 1.68a and 1.65 ohms phase resistance.

So are the ones I've got unsuitable? They appear to be higher impedance than the steppers on both my friends' machines, but I'm unsure about the voltage since I've seen their models described as both 2.8v and 12v depending where I look.
I can order the right steppers if the ones I've got are no use, but I don't want to waste money doing that if the 12v ones I've got should be ok still with this controller board?

Many thanks!

Edited 2 time(s). Last edit at 02/18/2014 07:28PM by Mr Joshua.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 04:14AM
If steppers have no label, you can still make sure what are they if you measure their coil resistance with a digital multimeter. Between 30 ohms and 1.65ohms the difference will be hard to miss.
The values match each other so its either 12v/0.4a=30ohms or its the good type of 2.8v/1.68a=1.66ohms. The latter is much preferable to the first. If you have 12v ones and you can change them easily - then do so asap.
If you have 12v psu and 30ohms coil the current cant get past the point indicated by ohms law, even if you set driver to more. In that case makes sense for Z to not respond to increase in driver setting. To fix Z, lets hope the motors coils are currently in series, and then perhaps you could try putting them in parallel, hopefully that would fix Z.
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 03:14PM
Thanks - so yeah, these are a high load then and not ideal from what you've said. It's an unwelcome cost for sure but I'd rather have it correct and help ensure longevity of the board.

The ones my friends both have on their machines are 2.8v 1.68amps, and 1.65ohms.

The Zs are actually in parallel as I've found that to work well in the past. I have removed one as a test though and the remaining one behaves just the same.

I've ordered 5 new steppers anyway at an identical spec to the ones they have in their machines, so I'll report back once I have them.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 05:01PM
I think for what you have there its Ipk=Vref/(8*Rs) where Rs=0.11 (?) and therefore should try a setting of Vref=0.50v to start with. So try setting vref to half a volt and see if Z movement gets better. This value i think links to where the motors are peaked already and setting vref higher might is useless, and might freak the microsteps levels, probably where the "judders" comes from.
Also could try something like Vref=0.35volts but thats probably kind of low already. If things get better when vref is 0.5, then could also tweak the microsteps like 1/4 for Z and 1/8 for X and Y. It should be possible to get those motors working at least, but its probably better to change them if you can.
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 05:11PM
Thanks for the suggestion. Am inclined to leave it be now, since the new motors should be here on the weekend and I think it may be better not to risk upsetting the board potentially.

I had carefully tried slowly & gradually increasing from 0.3v and there was no difference in the Z stepper behaviour other than the noise seeming a little more "confident" for want of a better word. It didn't change the judder factor of it in the slightest though, and I was loath to keep increasing it in case it caused an issue so I resisted the urge to try higher than about 0.5 as per your suggestion. For some reason the Z stepper is turning effectively in slow motion compared with the old board where they turned at normal speeds. Maybe it's a firmware thing - not sure.

Dumb question but how to I change the microstepping? Is that directly in the firmware? That's not something I've meddled with previously I must admit.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:10PM
To change microstep mode, normally there is a jumper or solder bridge. I looked at melzi page and it appears to have solder bridges from MS1&MS2 to 5v. If you check datasheet for a4982 chip, it will say which combination of ms1&ms2 corresponds to each microstep mode. Yes the movement being slower could be related to other things than driver or motor indeed even a firmware setting or even z endstop issues.

You can try set the vref higher, its not that you have to specifically avoid that. What i was saying is only that it is probably pointless. The driver watches the natural current growth in the coil and interrupts it when it gets past the mark, but your supply is 12v and coil is 30ohms, so it can never go past 0.4a, even if the driver is waiting it to get to 0.8a for example, if you want to have a setting like that then it wont make a difference because it cant reach that mark.

Edited 1 time(s). Last edit at 02/19/2014 06:23PM by NoobMan.
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:14PM
Ahh ok, thanks. I'll add that to my list of stuff that I need to read up on about all of this.
I enjoy finding out about this stuff, and Gcode etc, but I'm barely scratching the surface yet, and have limited freetime to spend on it so have to pick stuff up relatively slowly unfortunately.

Is the a4982 a different chip to the drivers though? My board has 4988 driver chips.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:25PM
Dunno about the chip, i was reading this page [reprap.org] and the there it says a4982, this is why i supposed you have that.
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:28PM
Hmmm, surprised it says that for the V2 version as I thought it was just the older boards using that, or the 4983, and the v2 had 4988 like my one.

I think the main difference was the earlier driver chip allowed 1amp output but the 4988 can dish out 2amps.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:32PM
If you have different chip like a4988 then probably documentation is old or something, so you should also check what sense resistors you have, as these are in that relation between Ipk and Vref. The math above was with Rs=0.11 because thats what the same page mentioned. If you have different sense resistors (Rs) then you need to know because if changes the math between Ipk and Vref. Its for the best to know which vref gives what ipk in correct terms.
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:35PM
Sorry - I've cocked up here somewhere as I know I'd written already that the sense resistors on mine are 0.05 and I'd written out the calculation I was using but I can't see it, meaning I must have accidentally edited it out somewhere sorry!

That's what they are though - 0.05


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:55PM
Then you need to change the math for Ipk=Vref / (8*0.05). Then i think vref of 0.23v would be what sort of caps the motors current, but thats sort of crazy low, basically with these motors adjusting vref is mostly pointless. If you do change the motors with the other type then playing with vref should produce results much more noticeable. On the other hand, its good that you have correct Vref relation now so you can avoid setting Ipk higher than 1A and avoid the drivers getting too hot or burned out. With the 30 ohms motors, currently doesnt matter how high vref is because the motors just cant draw enough. But with the 1.65ohms motor you should really take care not to set the Vref too high.
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 06:59PM
Hadn't thought of it like that I must admit. I was thinking that these motors would be trying to pull more juice than the drivers would want to do, thereby asking for trouble on the drivers if I wasn't careful, but that's the wrong way of looking at it I guess.

But yeah, the new ones will be here soon, and I'll be able to tailor the settings to suit them. I've got heatsinks for the drivers too for what good it does.
I think what I'll do before running it with the new motors is to visit both my mates, and check what vref theirs are set to with the same board & same motors, then I should be able to pretty much copy that as the three of us will be running the same setups.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 19, 2014 07:14PM
The 30ohms coil motors cant pull more juice than ohms law, because supply is 12v then 12v/30ohms = 0.4a. And actually there is a frequency so the motor inductance L adds to the coil resistance so the total impedance will be even higher than 30 ohms, and that will make the current even lower than 0.4. So even 0.4A cap is under the most optimistic circumstance. What you could do with these motors is use a supply of 24v and then the "cap" will max out to 24v/30 = 0.8A instead, which is a bit more "workable". These have sort of intrinsic "feature" that they can not overpower the driver - but its not really a feature you want to have, this is why are not really suitable.

The 1.68ohms motors on the other hand, with 12v supply will "want" to draw 12v/1.68ohms = 7,17A, and that is a different story, as you said these do want to draw more than driver has to offer, and so you need to be careful about that. But thats how the driver is supposed to work like. Just to clarify, the current will never actually reach 7,17A, because the driver will intervene. The driver job is to watch the current level with Rsense, and when current reaches the set point then driver will interrupt it. This is the normal way of operation. Which is not happening (for the most part) with the 30ohms motors.

Edited 1 time(s). Last edit at 02/19/2014 07:19PM by NoobMan.
Re: Unusual stepper ratings - vref settings for new Melzi
February 21, 2014 08:15AM
Ok thanks - that's all makes sense and is useful, cheers.

Had an idea with the board behaviours actually. How easy is it for me to copy the firmware from the old board and put it on the new one to replace what's on it currently?

The old one had everything functioning nicely until the end stop problem appeared so I think that'd be worth doing (aside from the new motors going on there as well).


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 21, 2014 06:02PM
You just figure out what firmware it was or which one you want, download it and tweak config files and upload a new firmware with arduino ide. If controller already has bootloader on, then only need the arduino ide software to upload. If it does not have a bootloader you may also need a programmer to upload. This is another can of worms, and you will need to read a lot of documentation.
Re: Unusual stepper ratings - vref settings for new Melzi
February 21, 2014 06:09PM
Thanks - I have tried loading one version (marlin) that was suggested to work but it is worse with that.
The problem is that the firmware on the original one only displayed "RRP" on the printer information screen in repetier so I have no info at all about what specific firmware/version it was from that. It's a bit too vague!
The old board was made by RP3D.com, so I have emailed them to ask if they can clarify exactly what firmware was on it, and where I can download it. Then I can try that on the new one and hopefully get it all sorted out.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 21, 2014 06:24PM
It does not matter which firmware was originally on it, any firmware will do. As for a specific version, its better to use the newest version because its supposed to have bug fixes and improvements - thats why it is a newer version.

Each firmware has a configuration file(s), some comments in that file will be explanatory. But there is a some stuff to tweak and adjust, like thermistor tables and extruder steps/mm. These ideally have to be tweaked and adjusted individually on a particular machine itself. If you can ask the seller about these it would better to have these than just firmware version. But i dont think it would of worked with that, perhaps he/she just used some generic data instead of tweaking it, so perhaps you wont get anything useful. I dunno. There will be other info necessary like axes steps/mm and such, endstop configurations, uC pinouts, but these ones and rest of things like that dont need any adjustment/calibration, so these are fairly easily to figure out.
Re: Unusual stepper ratings - vref settings for new Melzi
February 21, 2014 06:34PM
I understand what you mean with all that re' bugfixes and newer versions etc, but what I mean is that this new melzi does not behave at all with the marlin firmware (with the device set as mendel legacy), whereas on the previous melzi (which was bought by itself and not as part of a complete printer) it used the mystery "RRP" firmware on it, and worked fine.
Thus my thinking that if I can get a copy of the same version that was on my old board hopefully it will work ok on the new one, without needing a lot of investigation on getting all the tweaks & settings perfect since I know it already worked fine without any tweaks. There may be slight hardware variations between the 2 melzi boards but for the most part I'd expect that RRP firmware to be very close if not fine from the start, as long as they can send me the same version that I was using.

I hope that makes sense - apologies if I'm not explaining very clearly!

I'm happy enough looking at the content of the firmware files to see what code is in there but I don't nearly know enough to be able to know what all the settings ought to be and so on. Obviously one expects some trial & error with stuff like this but I figure if I can get the RRP firmware clarified & obtained then I will make a huge reduction in the amount of tweaking required.

I did just find this thread actually:
[www.soliforum.com]

It's a review of the ready built printer from the place that made my old Melzi (RP3D.com). The article states that it uses an old version of sprinter, so I will see what I can find on github and try a sprinter firmware to see how it behaves.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 21, 2014 07:33PM
Dunno what to say in particular, because i have not used melzi and neither of the firmwares. But generally speaking, there are just a few files to look for. The normal config settings are usually in files like config.h and/or similar. The thermistor tables also have similar name. The uC pinout for the hardware chosen can be found in a file usually like pins.h. Normally i think these are all the files that would need some attention and there isnt any other config to do besides these. If you nail these down, you are covered. If the board appears to misbehave or some functions appear to be missing for example it could easily be so because of wrong pins definitions in pins.h.

What i meant about calibrating thermistor and extruder is rather hardware wise and generic. For example to find extruder steps/mm you make marks on filaments and extrude distance like 10cm back and forth, and check if the distance extruder corresponds to the distance ordered, slowly correcting etc till its exact match. This because can not determine extruder steps/mm mathematically because of squishing and hobbed bolts are not consistent, so it needs to be tweaked/calibrated. The termistor tables can also be calibrated with a thermocouple to make the temperature reported exactly match the temperature of the thermocouple. Its better to have it like that, but afaik not many ppls bother with it. If you do get these things from the original supplier it would save some effort of doing them again.

Edited 1 time(s). Last edit at 02/21/2014 07:34PM by NoobMan.
Re: Unusual stepper ratings - vref settings for new Melzi
February 21, 2014 08:42PM
Re: Unusual stepper ratings - vref settings for new Melzi
February 22, 2014 05:18AM
Ahh, I see what you mean about the calibration etc. That all makes sense now thanks.

Well I've sort of got somewhere but also not at the same time.
The guy from RP3D.com (which the old melzi was labelled as) has sent me a firmware file, which you can see in my dropbox account HERE if it's of interest.

He stated that I have to use Arduino 0023 to use this, so I downloaded that version but cannot see in the menu "Tools> Boards" a suitable board option. sad smiley
The Melzi usually has settings of Atmega 1284p and 16mhz, but I have seen comments somewhere suggesting that the Sanguino options can be used since it's based on those. Neither are available in this version of Arduino IDE though?
Is it possible to load more into that list or something?

I tried to use the nearest option of Atmega 1280, but compiling I get a bunch of errors anyway:



Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 22, 2014 07:23AM
To add boards to arduino ide you need to put certain files in a /hardware/ subfolder or something like that. In this case you probably need to put the "sanguino" folder from the archieve into that /hardware folder. Then you will be able to select the boards listed there, and i see one which has 1284p @16mhz.
Re: Unusual stepper ratings - vref settings for new Melzi
February 22, 2014 09:12AM
Doh! Stupid question of me since I'd already done that with the Gen 7 folder on a different firmware and IDE version.

Ok, so I've told it Sanguino Atmega 1284/16 now and it compiles just fine, but when I upload the firmware I get errors with it.
I'll see what I can find out with a bit of searching as I'm sure it must be something fairly simple:



Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 22, 2014 09:18AM
Think this relates to a file being duplicated or in the wrong folder.
Found info on THIS thread to try out.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 22, 2014 10:46AM
*edit*

Right - I've made some progress I think.

I FINALLY managed to get the Sprinter_Melzi firmware installed onto the new board after hours of hassle.
I realised a blunder I had made. The guy from RP3D.com told me I have to use Arduino IDE 0023, but the Sprinter firmware just wouldn't compile with it for some reason.
I was convinced for some time it related to all the SD card related files/functionality as the errors centred around that. I tried disabling SD support to no avail, and with various combinations of IDE/firmware/additional support/avrdude files etc I just moved from one error to the next, to the next. *sigh*

But, when I was looking at an install file that I'd left open (for the Gen7 support 2.1 package) I realised it stated that this was not compatible with IDE 0023, and that I needed the Gen7 V1 support package for this! DOH!!!!!
So I downloaded that version and copied the files from it that had more/newer data into the Hardware/gen7 directory that I already had.

Bingo! Sprinter firmware compiled just fine and then the moment of truth - the upload completed without any errors.

So the problem now is that the printer does absolutely nothing with this firmware installed. You have to laugh!!!

The extruder fan remains on when power is connected, but in repetier even though it connects to the printer, there is no response to manual inputs, be it either heater, the thermistor readings, or the steppers. Nothing.
I "think" that while the software connects to the printer, that it is not sending commands, or they are not getting through at least. When I try clicking manual controls randomly, I notice that there appears to be a cumulative number on the screen which I think is saying it has X commands waiting to either be acted on or sent to the printer.

The baud rate and com ports are correct, so what other reasons could there be for the instructions from repetier not reaching the printer, or possibly not being acted on?

As intended though, the firmware version shown now in repetier for the printer simply says RRP, just like my original melzi, which was the RP3D one. Great, except I can't get it to do anything. lol

Edited 1 time(s). Last edit at 02/22/2014 05:32PM by Mr Joshua.


Prusa Mendel i2 - Melzi V2
Re: Unusual stepper ratings - vref settings for new Melzi
February 23, 2014 07:55AM
Did you try to push the reset button after connecting.. seems to help sometimes!
Sorry, only registered users may post in this forum.

Click here to login