Author Topic: China CNC 6040 - Setup, Testing & Review  (Read 178229 times)

0 Members and 1 Guest are viewing this topic.

Offline PeterG

  • Frequent Contributor
  • **
  • Posts: 830
  • Country: au
Re: China CNC 6040 - Setup, Testing & Review
« Reply #50 on: April 09, 2012, 12:30:05 am »

I might make a series of videos eventually as there isn't all that much material available for complete beginners. Most websites assume you have a background in machining, milling or woodworking.


I would really like to see a series or videos aimed at the total beginner. Even a Beginners Guide to the 6040 usage would be great.

Regards
Testing one two three...
 

Offline metalphreakTopic starter

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: China CNC 6040 - Setup, Testing & Review
« Reply #51 on: April 18, 2012, 03:39:16 pm »
Looking at getting a proper video camera this weekend :)

Had a go at making a small project box tonight using some smoke grey acrylic sheet. I used Trammell Hudson's boxer script to generate the sides with tabs. This outputs an SVG file which can't be imported into Cambam directly. Easiest solution is to load it up in Inkscape, then export it as a DXF file. CamBam was used to generate the toolpath and GCode. CamBam also has an option to "dogbone" corners so you get a square corner. With the 1mm cutting bit I used, you can barely even notice it :)

I need to get some acrylic glue to hold it all together. I have an idea to use 4 bolts through the front panel, with threads tapped into the back panel. Then I can glue everything except the back, and still have access to the inside. Hard to explain in words, but basically the bolt "pulls" the back panel on through the front panel. The other option is the bolt and nut approach: http://www.instructables.com/id/How-to-Make-Anything-Using-Acrylic-and-Machine-Sc/ A combination of glued tabs for the main part, and the nut/bolt for access panels is a good compromise.







This box was just to test it out and see how well it works, but its the perfect size for a 2x16 character LCD  8)

Offline metalphreakTopic starter

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: China CNC 6040 - Setup, Testing & Review
« Reply #52 on: April 19, 2012, 02:52:34 pm »
Glued just the edges and the top and bottom fit in snugly without falling out :D

Ordered a Canon Legria HF R36 tonight. Should be here next week and I can start doing some proper videos. Didn't quite have the cash to get a HF G10 like Dave's  :P

Offline maxpayam

  • Newbie
  • Posts: 1
Re: China CNC 6040 - Setup, Testing & Review
« Reply #53 on: August 09, 2012, 05:30:04 pm »
I am planning on buying one of this chines machines from eBay.
What would you recommend to choose between 6040 or 3040?
What seller do you recommend?
Is higher price = better performance?

Does it matter if I buy from eBay international or from Europe eBay?

Thanks a lot for your reply
 

Offline morales

  • Newbie
  • Posts: 1
Re: China CNC 6040 - Setup, Testing & Review
« Reply #54 on: August 16, 2012, 06:51:17 pm »
I didn't any documentation or software with mine so thanks.
FWIW, there's a good quick intro to setting up Mach 3 here.

Hi, I've been stuck with this machine for about 2months already, and i haven't been able to get it to move. Ive installed Mach3, and i set the ports, and pins, settings, and also the motor turn, But I don't know if thats all the settings i need to change. Can someone please help me get my CNC 6040 router machine running.. Ive use the cnc usermanuel, and set the settings exactly how they tell me, but still no progress....help  :'(
 

Offline GeoffS

  • Supporter
  • ****
  • Posts: 1272
  • Country: au
Re: China CNC 6040 - Setup, Testing & Review
« Reply #55 on: August 16, 2012, 10:31:00 pm »

Hi, I've been stuck with this machine for about 2months already, and i haven't been able to get it to move. Ive installed Mach3, and i set the ports, and pins, settings, and also the motor turn, But I don't know if thats all the settings i need to change. Can someone please help me get my CNC 6040 router machine running.. Ive use the cnc usermanuel, and set the settings exactly how they tell me, but still no progress....help  :'(

A good place to look is cnczone.com. Here are several threads over thereon the shortcomings of the 6040 CNC routers and how to fix them.
http://www.cnczone.com/forums/chinese_machines/134758-any_experiences_cnc_6040_router.html
http://www.cnczone.com/forums/chinese_machines/157193-experience_carving-cnc_com_6040_router.html
 

Offline Devian

  • Contributor
  • Posts: 41
Re: China CNC 6040 - Setup, Testing & Review
« Reply #56 on: August 17, 2012, 07:01:49 am »
Really thank you for your sharing. Very detailed.
 

Offline metalphreakTopic starter

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: China CNC 6040 - Setup, Testing & Review
« Reply #57 on: August 17, 2012, 09:04:14 am »
maxpayam: I don't think many people actually sell them locally. Usually its a "local seller" on ebay and they ship it from hong kong still. The 3040 and 6040 models are basically the same apart from the dimensions. The choice between the refurb DC brushed motors and the proper (new!) water cooled spindles makes up a large difference in the prices. Any of the ebay sellers with decent feedback and some good pictures should be fine. I'm certain they all sell the same kits anyway!

The water pump they include is almost always noisy rubbish. I've still not bothered to make my own cooling kit as the spindle doesn't even get warm with the short run loads I put on it.

Offline michel pet

  • Newbie
  • Posts: 1
Re: China CNC 6040 - Setup, Testing & Review
« Reply #58 on: September 18, 2012, 04:03:25 pm »
i like to now how big the controller box is.
good some one tel me the lxbxh.
 

Offline thakidd

  • Regular Contributor
  • *
  • Posts: 56
 

Offline JimFouch

  • Newbie
  • Posts: 4
Re: China CNC 6040 - Setup, Testing & Review
« Reply #60 on: October 27, 2012, 11:55:26 pm »
I just ordered mine.  ;D I'm out of the country for a few more weeks, so it will probably make it to my house before I do.

For anyone who already has one, I have a few questions....

It comes with an 1/8" collet, but I should be able to use other size collets as as long as they are for an ER11 spindle,correct? I would like to be able to use up to 1/4" bits. I bought these from eBay...hope they work... http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=221017860685&ssPageName=ADME:L:OC:US:3160

What is the size of the t-Slot table's actual slots? I see nuts for 3/8" and some for 1/2" slots. I'm going to want to find some additional clamps.

Are the parts that make up the Y Gantry all made of aluminum? I can't really tell by the pictures. They look like they are, but they could also be wood.

Does anyone have access to an english manual for the VFD?

With a lower feed rate, do you think this unit could cut mild steel?
 

Offline ecat

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: gb
Re: China CNC 6040 - Setup, Testing & Review
« Reply #61 on: October 28, 2012, 02:15:36 pm »
It comes with an 1/8" collet, but I should be able to use other size collets as as long as they are for an ER11 spindle,correct? I would like to be able to use up to 1/4" bits. I bought these from eBay...hope they work... http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=221017860685&ssPageName=ADME:L:OC:US:3160

You should be fine. There are other grades of collets, better balanced for higher speed but for the most part ER11 is ER11.

Are the parts that make up the Y Gantry all made of aluminum? I can't really tell by the pictures. They look like they are, but they could also be wood.

They will not be wood.

Does anyone have access to an english manual for the VFD?

A good place to start: http://www.woodworkforums.com/f170/tips-newbie-huanyang-vfd-users-96380/

With a lower feed rate, do you think this unit could cut mild steel?

Ouch!

These 6040s are just about up to cutting aluminium, steel would be a gamble. Even if the machines frame, screws, bearings and motors could survive, I don't think the spindle has enough power at low speeds and I doubt the spindle bearings would last for long.

Read through this, twice: http://www.cnccookbook.com/CCCNCMillFeedsSpeeds.htm
Download and play with the free trial calculator.

From memory, the forces required to cut steel are TEN times greater then those required to cut aluminium. After reading the above link feel free to come back and correct that x10 figure if I've got it wrong.
 

Offline sergiopaschoal

  • Newbie
  • Posts: 1
Re: China CNC 6040 - Setup, Testing & Review
« Reply #62 on: January 19, 2013, 04:37:28 am »
Some of this is copy/paste from my blog:

Jan 16th: Ordering
So I’ve just ordered myself a CNC machine from China. It’s a “6040" model (that’s 60cm by 40cm working area) from ebay seller “amonstar”. So far so good. I’ve received a tracking number and the seller was quick to respond to my question about the watercooled spindle motor (needed to know if it was an ER11 or ER16 collet. It’s ER11). Will keep this blog updated with my progress. ETA for arrival is 7-10 days as long as there are no customs delays.
Can’t wait to get it set up  Already have an old PC with a parallel port, 17? monitor and everything else.

Additional Notes: tracking number took 2-3days to update as a valid number with info. This is the item: http://www.ebay.com.au/itm/300550896456 ~$1750 delivered

Jan 22nd: Delivery (not quite...)
According to DHL it has cleared customs and is ready for delivery (hopefully on monday!).

Update: DHL passed the package on to Australia Post for delivery... AusPost left a card saying I had to pick it up as it was a 53.5kg package and they would not deliver!

Jan 24rd: Pickup
Drove down to AusPost depot to collect it. It was all in one big box but fit fine into the back of Mum's Ford Territory :) Would never have fit it in my car.

Click for bigger pics:
          

For the last week I've been a bit sick, but I had time to setup an old IBM/Lenovo desktop PC with Windows XP / Ubuntu dual-boot. I've got Mach3 that came on a cd with the machine (probably not a legit license...) and EMC2 in linux to try. Spent the last couple of days clearing out the store room in our house. Put up some pine shelving to make room on the table :)

Assembly of the machine is pretty easy. The side rail that the cable chain sits on, as well as the moving gantry part are packed separately in the box. 5 bolts either side secure the gantry and the cable chain is secured via a screw to the side rail. It only took about 15mins to setup including the PC and wiring.

Current Setup:


And a quick video running some sample G-code that was on the cd:



Still need to hook up the VFD controller for the spindle, and work out some kind of water cooling system. There is an included 24v pump that can be connected to the main control box (there's a switch on the front panel to control it) but it looks pretty cheap/crappy. I think the idea is you just run it with a large bucket/container of water or coolant. I've got a spare 2x120mm radiator and some pumps from a PC cooling kit I'll probably use to make a closed loop system with a small reservoir (Swiftech MicroRes).

Will see if I can get my first cut going tomorrow as it was about 10pm when I shot that video.

Some specs of the machine are on that ebay listing. It's not immediately obvious from the wording, but it has a step resolution of 0.05mm which is ~2mil ?? Should be good enough for some PCB stuff. Has a milling movement area of about 60cm by 40cm but the table itself is a little bit bigger. The specs seem to have been copied and pasted from a similar machine or something. Mine came with 3A steppers not 2.5A, and the 1000-8000rpm is for the 200w spindle, not the 0.8kW VFD one which goes up to 24,000rpm

Any questions, just ask. I'll add more info/vids as I go and learn more (i'm a complete noob to CNC atm).

! Hello all

I have a CNC6040 identical to that of our friend metalphreak
Unfortunately I am not able to configure Mach3.

Motor Tuning and Setup

Steps per:
Velocity:
Acceleration:
Step Pulse:
Step Dir:

I put the settings:

X: 320 - 2000 - 200 - 10-5
Y: 320 - 2000 - 200 - 10-5
Z: 320-800 - 150 - 10-5

Unfortunately it did not work ...

I wonder other settings.

Follow this guide: http://mambohead.com/wp-content/uploads/2010/12/CNC-6040-Router-Engraver-System-Installation-Manual.pdf

Could anyone help me?


Thank you!
 

Offline obake

  • Newbie
  • Posts: 1
Re: China CNC 6040 - Setup, Testing & Review
« Reply #63 on: February 20, 2013, 08:09:04 am »
For those who are struggling with mach 3 setup: 6040 CNC (mine had 1.8o 3A steppers & watercooled 800W rotary)
Mine came with instructions as follows:
Motor outputs: (use V for check)
x: V 2 3 X V 1 1
y: V 4 5 X V 1 1
z: V 6 7 X V 1 1

Input signals:
Estop: V 1 10 V X 0  (notice active low checked so the emergency stop is inactive with the button out)

Motor Tuning
X: 400 2000 200 -- 10 3
Y: 400 2000 200 -- 10 3
Z: 400 800  100 -- 10 3

If you can't seem to get your machine to move (but you see the x,y,z numbers change in mach3 when you use your keyboard), it is probably that the parallel port has the wrong address. How do you find the right one, you ask... Go to device manager (control panel>system>device manager). Look for ports & com or something like that. Find your adapter (i had a Rosewill PCIe to Parallel). right click it and go to properties, then the "resources" tab. You should see some little icons and numbers with dashes. the "port address" should be the first part of the top one. For example, mine had (icon) DC00-000(something or other #). So, i changed mach3's port #1 from 0x378 to DC00 clicked ok and bam! it works. (have not tested actual cutting yet)

On a bad note, i seem to have controller feedback whenever I have the waterpump on and the parallel cable connected (causes the steppers to sputter and move). I haven't been able to get rid of it, so I will probably need to run a waterpump another way. I guess I won't be carving tomorrow.

Also, my plan is to run this machine using my Win7x64 LAPTOP & USB!  Insane you say? To do that you would need to convert buffered signals to parallel synchronized pulses that a cnc controller would like, you going to have kernal and OS problems and stuff. Well, someone better than I has already done it. For around 80 bucks, I bought an "rt-stepper" from ecklersoft that is based on linuxCNC and does just that. It should be able to run off of most any LinuxCNC and USB2.0 OS. (so my older XP laptop or desktop, my shiny new Win7 x64 laptop...maybe a even a droid tablet, if you feel risky). To do that, I need to learn how to set up linuxCNC with the proper parameters. Any tips would be greatly appreciated (or if you've done it for this machine, your config.ini).
 

Offline metalphreakTopic starter

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: China CNC 6040 - Setup, Testing & Review
« Reply #64 on: March 06, 2013, 10:05:50 am »
"Spluttering" issues are almost always because of the VFD and spindle having poor grounding. When I connect my depth setting probe, I connect the probe ground to the CNC chassis. If I turn the spindle on, it moves all over the place! Very bad thing to happen when its so close to a work piece. Have yet to be bothered enough by this to fix it  :scared:

Mach3 configuration issues are entirely dependent on your PC and how much of the Mach3 manual you have read ;) If you get no movement at all from the machine, it isn't configured properly.

Do note that the Parallel port driver board inside the box needs an external 5V source to power it! There is a DC input jack right next to the parallel port. You should have received a USB to DC jack cable with your machine. This needs to be plugged into the PC to provide the 5V!

I tried cutting steel plate. It works - slowly - but the machine definitely doesn't like it. I will not be trying steel again in the future - it's simply not designed to do it. Aluminium is fine however.

Offline Virgus

  • Newbie
  • Posts: 9
Re: China CNC 6040 - Setup, Testing & Review
« Reply #65 on: May 30, 2013, 10:27:34 pm »
Hello everybody,
I'm trying to realize some PCBs with Eagle and pcb-code plugin.

I modded my CNC6040 adding three home switches, lights to the power/spindle switches
and the probe socket to do the z probing, and I started milling a couple of rectangles of the same size/depth
of my PCB into a piece of MDF.

The rectangles g-code was created online from the following link:
http://www.daycounter.com/Calculators/GCode/GCode-Rectangle-Inner.phtml

To my surprise if I mill an outline of a rectangle everything is fine, but if I mill a filled rectangle
the x axis gets misaligned at every row, producing an overall misalignment of 2mm over 5cm along the Y-axis.
No problem seems to occur on the y axis alignment. I attach a low-res picture of the two results.

I'm using Mach3 on a Windows PC and I uploaded all configs, nc files and hi-res picture at the following link:
https://www.box.com/s/4avfosq38sitt7go4fh6

I'm stuck as I have no clue of what might cause this, any hint/suggestion will be greatly appreciated!!!

Kindest regards and
cheers from Paris!
 

Offline bilko

  • Frequent Contributor
  • **
  • Posts: 405
  • Country: 00
Re: China CNC 6040 - Setup, Testing & Review
« Reply #66 on: May 30, 2013, 10:46:40 pm »

Do note that the Parallel port driver board inside the box needs an external 5V source to power it! There is a DC input jack right next to the parallel port. You should have received a USB to DC jack cable with your machine. This needs to be plugged into the PC to provide the 5V!

If the parallel port driver board is opto isolated you will need a separate 5V power supply, maybe from a wall wart. Plugging the cable into the PC USB will defeat the opto isolation and will cause ground currents to flow down the USB cable. This is a possible cause of the 'funny business' when starting the VFD drive.

All ground cables should be star earthed (central earth point), that is machine ground and PC ground should be connected together at one point and then this ground runs to utility ground.

Other potential problems can occur with the over travel limits
Do you have schematics for the parallel driver board that you can post ?
 

Offline Virgus

  • Newbie
  • Posts: 9
Re: China CNC 6040 - Setup, Testing & Review
« Reply #67 on: May 30, 2013, 11:32:16 pm »
Hello bilko,
many thanks for your prompt reply!

My CNC6040 is a recent version with the black controller housing, thus no usb cable for the 5v any more.
The board inside the controller is the YOOCNC-NT65-3X (picture attached) but I couldn't find any schematic on the net!

I'll check tomorrow if there's any voltage difference between the PC and the controller grounds.

I just read about the motion mode settings in Mach3 and I'm wondering if anything would change if I set "exact stop" instead of "constant velocity"...

Good night and thanks again for your help!
V.
 

Offline metalphreakTopic starter

  • Frequent Contributor
  • **
  • Posts: 815
  • Country: au
  • http://d.av.id.au
    • D.av.id.AU
Re: China CNC 6040 - Setup, Testing & Review
« Reply #68 on: May 31, 2013, 02:26:49 pm »

Do note that the Parallel port driver board inside the box needs an external 5V source to power it! There is a DC input jack right next to the parallel port. You should have received a USB to DC jack cable with your machine. This needs to be plugged into the PC to provide the 5V!

If the parallel port driver board is opto isolated you will need a separate 5V power supply, maybe from a wall wart. Plugging the cable into the PC USB will defeat the opto isolation and will cause ground currents to flow down the USB cable. This is a possible cause of the 'funny business' when starting the VFD drive.



All ground cables should be star earthed (central earth point), that is machine ground and PC ground should be connected together at one point and then this ground runs to utility ground.

Other potential problems can occur with the over travel limits
Do you have schematics for the parallel driver board that you can post ?

They don't actually use discrete opto-isolators, but an IC instead. I don't think it's even isolated anyway. USB port ground is mains earth referenced, as is the VFD controller. The 24V DC power supply may not be though. Best option is to just earth everything to the same common mains earth to eliminate issues.

I reckon they were just too cheap to put a 5v regulator on there to power it from the internal 24V DC supply ;)

As the spindle is probably not earthed (and therefore neither is the frame since they are mechanically and electrically connected), connecting the probe ground to it is probably inducing tons of noise. It's a fairly common issue with these that many people have pointed out. Like I said, it never affected me until I wired up my own probe interface (which is not a standard feature even though the board has an allowance for it) so technically there is nothing "wrong" with the design  ::).

Virgus: the controller you have seems much more integrated (read: cheaper design) than the one I received. All the axis drivers are on one board by the looks of it along with the interface driver? It certainly seems to be missing steps on the x axis there. Could possibly have the settings in Mach3 set too fast or it could be a fault axis driver. Easy way to check = swap the X and Y connectors and run the test again. If the missed step issue moves to the Y axis you know it's the driver :) Replacement would be a pain though - mine are separate units so I could just replace one (but I haven't needed to).
« Last Edit: May 31, 2013, 02:33:57 pm by metalphreak »
 

Offline Virgus

  • Newbie
  • Posts: 9
Re: China CNC 6040 - Setup, Testing & Review
« Reply #69 on: June 02, 2013, 07:33:07 pm »
Hello Metalphreak
thanks for your comment, you made me google around and I found many posts about TTL ICs on CNC6040 Controllers.

Many others on the net complain about the low quality of YooCNC controllers. Following this
post I bought some 74LS14 ICs to replace the 74HC14 I found on the controller. Hope it won't be necessary though...

Another post said that the z-probing cable might cause interference to the step motors signals.

Yesterday I've milled a PCB and noticed that the lost steps were happening all of a sudden on any axes (the x one is the most common to have some lost steps though) never near a change in speed/direction. First I thought about a possible mechanical problem because of the noise but then I lost a step on the z axe a few seconds after the first one and realized it must be something related to the controller/cables/interferences... or grounding maybe.

By the way, one thing that already improved a little was that I changed motion mode to "exact stop" but I cannot be sure if it's just a coincidence or not.

I'll do the test you proposed and see, I also have to try lowering the speed and unplugging the probe cable to eventually reduce interferences... and check the grounding of course.

Cheers,
V.
« Last Edit: June 02, 2013, 07:40:14 pm by Virgus »
 

Offline abyrvalg

  • Frequent Contributor
  • **
  • Posts: 824
  • Country: es
Re: China CNC 6040 - Setup, Testing & Review
« Reply #70 on: June 02, 2013, 09:11:43 pm »
Try hooking the machine to a different PC also. We had troubles during our new AMCNC-01 first tests (missed steps, choppy spindle PWM - this can be heard), changing the PC had cured them all (dreaded parallel port power management issue ?)
 

Offline gxti

  • Frequent Contributor
  • **
  • Posts: 507
  • Country: us
Re: China CNC 6040 - Setup, Testing & Review
« Reply #71 on: June 02, 2013, 09:19:57 pm »
I don't really understand why, in 2013, devices are still being sold with bitbang parallel control. It made sense 20 years ago but these days a $2 microcontroller with USB or Ethernet could do a far better job and not have so many compatibility issues. Real parallel ports aren't free anymore, and even when you have one it's still bad design to use a general-purpose PC to control big motors in real time.

Seems like an opportunity for a OSHW project to design such an interface and make a lot of noise to get it adopted.
 

Offline Virgus

  • Newbie
  • Posts: 9
Re: China CNC 6040 - Setup, Testing & Review
« Reply #72 on: June 02, 2013, 11:07:18 pm »
Yes abyrvalg,
I'll setup and try another PC to see if there's any difference with the parallel port.
Actually the change between 74HC14 and 74LS14 ICs might solve parallel incompatibilities,
hope I won't have the need of doing that anyway...

Yes gxti a usb CNC controller would be great!

Cheers,
V.
 

Offline hexpope

  • Contributor
  • Posts: 40
Re: China CNC 6040 - Setup, Testing & Review
« Reply #73 on: June 11, 2013, 11:38:03 pm »
Hi Virgus,

I am the same CNC router box as yourself. And I am having the same problems as yourself !

I will replace the IC's and maybe the capacitors beside every motor input header to a better branded low ESR type, I think the ones that come with them are Chong.

Let us know how you get on with the mods ! If I can't fix the noise and crappy sounds coming from the steppers I am moving over to Pokeys and Postep25 drivers.

 
 

Offline Virgus

  • Newbie
  • Posts: 9
Re: China CNC 6040 - Setup, Testing & Review
« Reply #74 on: June 12, 2013, 12:29:06 pm »
Hello hexpope,
I received the ICs a few days ago but I've not changed them yet.

For now I found a compromise: I lowered speed and acceleration and I do several times a homing of the three axes.
Another thing I read is that the probe cable needs to be disconnected during milling to avoid the capture of interferences
but to my experience this seems not to be a big issue: I just keep the probe cable far from the motors cables...

Moreover I tried to minimize the steps loss by optimizing the g-code.
I bought this excellent tool: http://www.pcbgcode.com/PCB-Gcode-Wizard%20homepage.htm
Paul, the programmer, is kind and very helpful as he gave me advises and suggestions!

Reducing the speed and the code to process allows to have no error for small circuits (I do the homing between each milling step just in case) and I postponed for now the ICs change, so I recommend you first to try this and to install the home switches if you have not done it yet
as they're mandatory with the cheap controller we've got.

I'd like to start doing SMD and I cross my fingers that it will work, meanwhile I'm doing small things to gain more confidence
and experience: I had a nice result last week with a 0.1mm cutter bit (see attachment).

Good luck and keep us updated!
V.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf