Welcome! Log In Create A New Profile

Advanced

Timers and PWM

Posted by bryanandaimee 
Timers and PWM
December 26, 2011 05:22PM
This is for all you firmware developers out there. I'm working on a toshiba driver/ 644p based electronics, and after working through PWM issues with Repetier on Gen7 which required a change to the firmware to use PWM on Gen7 which uses timer 0 for the heaters. Looking at the other 644 based electronics, Gen6 uses timer 2 and sanguinololu uses 1 and 2 or just 1 depending on version. So here's the question. which timer is most easily supported on the 644 for heater PWM on the various firmwares?
Re: Timers and PWM
December 27, 2011 04:05AM
Hmm. Sorry for complaining, but what's the point of designing yet again parts of electronics which work great already? If you insist on making your own electronics, it's a good idea to copy 1:1.

Regarding firmware, different timers have different interrupt priorities and not all timers support 16 bit resolution. Use those which are not in use for other duties, like the step interrupt.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Timers and PWM
December 27, 2011 11:37AM
The point is to have cheap integrated drivers in a through hole board that should be easy for a DIY repraper to put together. The main reason is to avoid the cost associated with the Pololu drivers. There are plenty of boards with integrated drivers, but they all use surface mount components so they are generally sold assembled. I would like an electronics that could be sold as a kit for $50 including drivers. This is kind of the Gen7T we talked about a while ago, but I'm not sure if I'll be able to preserve the Gen7 pinout completely due to routing issues with the toshiba drivers. They are very different in form factor and pinout from the pololus and quite a bit bigger. It is mostly single sided currently but lots of traces between pins.
Re: Timers and PWM
December 28, 2011 04:17AM
There is no need to keep Gen7's pin layout between versions. A $50 target is challenging, as all you can do is to replace $8.80 Pololus with $4.30 Toshibas (both prices for quantity 100).

That said, I don't mean to complain here. Trying promising new things is always a good idea, as well as keeping the parts already working. What I like about the Toshibas is not only the through hole packaging, but also the much better acessibility for cooling. They can also be desoldered reasonably when defect, so there's no need for plugs. The female plugs on a Gen7 are $2 alone.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Timers and PWM
December 28, 2011 06:59AM
@Brianandaimee: I see definite advantages in being able to drive up to 3 Amp per phase. This would open the way for using, for example, stronger nema23s on the heavier axes (for aluminium plate + heater + glass + structural support + bearings + at least 10 mm wide belts tend to add up in inertia).
Many commercial CNC designs use independent boards, one per axis. This is great for modularity.

Have you tried this one? [www.thingiverse.com]

@Traumflug: Plug connectors are indeed grossly overpriced. I have been relying on direct soldering, screw blocks and salvaged molex connectors from old school computers. Automobile 12V connectors are relatively cheap and easy to find. Another option would be to use a couple of routed/etched pcbs, secured with m2 screws, and covered with printed plastic.

Maybe it is time to put out some reprap DIY connector block "standard"? smoking smiley
Re: Timers and PWM
December 28, 2011 11:39AM
Mouser has the toshibas for$2.83 in those quantities, and where do you get Pololu's for $8.80, is there a supplier of pololu drivers that is cheaper than pololu? ($9.71 qty 100)

Re separate drivers, I've seen AKA47's driver circuit, haven't seen the one you mentioned yet, but I'm aiming for a low price point so I don't think that would work for my project. An integrated electronics will bring the price down. Also a lot of people complained about the rats nest of wires working with gen3 which was modular.

Re Gen7 versions, I'm happy to call it Gen7T since I think the aim of the design is the same and I've tried to keep the pinout mostly the same. The other thing I'm worried about is reprapability (is that a word?). I have so many traces between pads that I wonder if it will be practical to route even though it's a single sided board. What are your design rules for boards you route on your reprap?
Re: Timers and PWM
December 29, 2011 06:31AM
Quote

What are your design rules for boards you route on your reprap?

Track width minimum 30 mil for toner transfer etching and minimum distance between copper 16 mil (0.4 mm). Pin diameter either 60 mil with 30 mil drill (0.75 mm for resistors, caps, ATmega pins) or 80 mil with 40 mil drill (1.0 mm for jumper, connectors, etc.). So no, with current milling technology tracks don't fit between 100 mil (2.54 mm) spaced pins.

Isolation tracks of 0.4 mm are about the minimum when using a dremel-like tool at some 20'000 RPM. Going smaller you get substantial burrs which have to be grinded away. Perhaps there's some room for improvement, as the play of the spindle has substantial influence on the appearance of burrs. Getting a play-free spindle surviving more than a few hours is possible with cheap parts, but not exactly trivial, as standard roller bearings always have axial play.

Professional equipment starts at somewhere EUR 500.- for the spindle alone. They also use mill bits with an expected lifetime of one 100x160 mm board, costing some 10 Euros per bit.

Another thing is, the smaller the isolation gap is, the easier you get solder bridges, as DIY boards usually have no solder mask print.

To sum up, going substantially below 0.4 mm isolation tracks currently isn't really an option. Going with a few wire bridges is much easier.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Timers and PWM
December 29, 2011 11:26AM
Hmm, the thing is these drivers pretty much require either large numbers of between pin tracks or a double sided board. I don't think I could get a single sided design with a reasonable number of jumpers. I still might be able to do it with toner transfer. I'll try it out once I get the heaters and serial port wired.
Re: Timers and PWM
December 30, 2011 12:37PM
Traumflug Wrote:
-------------------------------------------------------
> Track width minimum 30 mil for toner transfer
> etching and minimum distance between copper 16 mil
> (0.4 mm). Pin diameter either 60 mil with 30 mil
> drill (0.75 mm for resistors, caps, ATmega pins)
> or 80 mil with 40 mil drill (1.0 mm for jumper,
> connectors, etc.). So no, with current milling
> technology tracks don't fit between 100 mil (2.54
> mm) spaced pins.
>
> Isolation tracks of 0.4 mm are about the minimum
> when using a dremel-like tool at some 20'000 RPM.
> Going smaller you get substantial burrs which have
> to be grinded away. Perhaps there's some room for
> improvement, as the play of the spindle has
> substantial influence on the appearance of burrs.
> Getting a play-free spindle surviving more than a
> few hours is possible with cheap parts, but not
> exactly trivial, as standard roller bearings
> always have axial play.
>
> Professional equipment starts at somewhere EUR
> 500.- for the spindle alone. They also use mill
> bits with an expected lifetime of one 100x160 mm
> board, costing some 10 Euros per bit.

It depends on where you situate "professional". Enterprises tend to get very expensive material for productivity reasons, this is not the main issue in an environement of mostly DIYers and tinkerers.
You can find very competent carbide 60 degrees v-bits with 0.2 mm flat ends at around 1.5 euros apiece on ebay. Haven had any major issues with them, they break on mis-manipulation of course like any v-bits. --> "good enough".
A complete solution like a fuly fitted 30x20 gantry aluminium router/engraver table -usually with 16mm round rails and C7 ballscrews) comes at around 400 USD (machine+ electronics) + 300 USD (transport) + custom duties. That's less than a Mosaic or an Ultimaker. The spindle is usually a well-blanced, cleverly refurbished DC motor having spent its first life on some large airplane, fitted with an ER11 collet. In my experience, this stuff is stiff and precise enough to route isolation tracks and drill holes spaced the usual 100 mil. It WILL have problems with track widths of 20 mils or less, so some designs must be adapted.

IMHO there is no problem in also attaining this precision with homebuilt frames (plenty of people are doing it), but the design goals and compromises are quite different from a plastic extruding robot. We are not yet at the "one cheap frame fits all" nirvana. Maybe with next gen designs like Nophead's Prusa 90, the Prism, wider belts?

Cheers,
Re: Timers and PWM
December 31, 2011 04:14AM
Lanthan, do you have a link to such a spindle? I've searched the internet quite a bit and couldn't find something light enough for a WolfStrap and precise enough for copper milling. Currently I use a Proxxon Micromot 50, which can be readjusted to be play-free, but this wears out quickly.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Timers and PWM
December 31, 2011 05:56AM
Lanthan Wrote:
> A complete solution like a fuly fitted 30x20
> gantry aluminium router/engraver table -usually
> with 16mm round rails and C7 ballscrews) comes at
> around 400 USD (machine+ electronics) + 300 USD
> (transport) + custom duties.

I'd love to know where I can get one of these. I have been looking at a Zenbot 1216, these are 12 x 16 at $799 + $300 for electronics.
Re: Timers and PWM
January 01, 2012 07:47AM
Hi folks,
Happy new year to you all,

Have a search at "cnc 3020" on ebay, with international scope enabled and sorted by price plus shipping cost, lowest first.

Many shops are HK resellers, they might be ok as long as they are reasonably specialized in machine tools.
have a look for example at this one:

[www.ebay.com]

the spindle made from the refurbished electrocraft 240 dc motor is very visible in the picture. Notice the solid aluminium mount too.

Traced back my spindle to this:

[www.electrocraft.com]

[www.electrocraft.com]

as you see, it is "good enough" up to 5000 RPM. Not excessively torquey, but for engraving it is OK.

the funny part: originally it is a servo drive, but the sensor part has been destroyed, probably in the process of dismounting

here it is working:
[www.youtube.com]

in view of this, there MUST be a cheap and very abundant source of used electrocraft 240s for export (think: mandatory manutention of a whole boeing fleet), actually you can find 'em easily:

[www.ebay.com]

[www.ebay.com]

you still have to replace the main bearing and fit in an er-11 collet on an 8 mm hollow axle instead (about 15 USD on ebay). you can adjust chuck holders up to 6 mm on that.

I have one such spindle, planned with a smaller aircraft motor, in the works, but I'm handicapped by the lack of a lathe (doh) to adjust a couple parts

so back to the cheap cnc shops, one that has been in business for a while is cncdiy
[www.cncdiy.org]
But as they are better known, their prices have taken a hike.
They do sell the entry-level e240 spindle:
[sites.google.com]

As for me, I purchased my 6040 table (about 60 - 70 kg) from some well named "lovehappyshopping" on ebay.

[stores.ebay.com.au]

it survived the ultra-violent treatment by folks at ups (do they run special rendering missions?) and arrived in functional condition. I have some report and pictures (compelte with the trademark black cat) on cnczone, always a good source:

[www.cnczone.com]

right now it is awaiting installation in the new home. Has been fantastic for learning. It will cut my future Prusa90 adaptation ;-) since my classic prusa mendel frequent re-calibrations have been pure suffering.

Lesson learned: for small stuff like pcbs, a smaller table is more convenient, quieter and less vibration.Moving table designs seem sturdier, like this
[sites.google.com]

A smaller version is sold cheaper and spindle less as "sable 2015"

Cheers,

Lanthan
Re: Timers and PWM
January 02, 2012 06:26AM
Thanks for the comprehensive answer, Lanthan.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Timers and PWM
January 02, 2012 07:21AM
Further thoughts:
For PCB milling, one should aim to input the minimal energy necessary to do the job --> less wear and vibrations.

Incomplete limerick of the day:

There was a guy on the Internet
Selling small spindles by the ticket,
His name was wolfgang engineering,
...

Those were reputed to be extremely precise, and used a rather small DC motor coupled to the spindle with two belts - actually they look like o-rings.

a review here:
[www.cnczone.com]
a comparison between dremel and that spindle by a member of the linuxcnc core team:
[axis.unpy.net]

... although he seems to have stopped making them.
The one shortcoming I see is not using an ER-11 standard collet for versatility.


He makes beautiful micro-turbines
[stores.ebay.com]
[www.wolfgangengineering.com]

All this still seems in the "manufacturable" range - as long as you have a lathe.
more examples of spindles
[www.cncathome.com]
Re: Timers and PWM
January 02, 2012 07:40AM
Lanthan, thanks for the info!

I had more to say but the spam blocker won't let me...
Re: Timers and PWM
January 04, 2012 04:37AM
Quote

I had more to say but the spam blocker won't let me...

Logging out and logging in again "cures" the spam blocker.


Regarding the Dremel, I have similar experiences with a 220V-Dremel as well. This thing, especially the rotating part inside it, is simply too heavy and makes the whole machine vibrating. A smaller Dremel-like spindle, like a Proxxon Micromot 50 is much better in this regard. Less diameter, less vibrations.

If you plan for a spindle for isolation milling, plan for as many RPM as possible. 20'000 RPM is just sufficient for 0.4 mm diameter in copper.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Sorry, only registered users may post in this forum.

Click here to login