Author Topic: Multi Meeter Streaming Serial Output.  (Read 16463 times)

0 Members and 1 Guest are viewing this topic.

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Multi Meeter Streaming Serial Output.
« on: January 06, 2011, 12:17:22 pm »
Well i hope i'm asking this is the right section.

Here is what i'm trying to do.

Capture a serial stream from a meeter with a micro for conversion to speech.

This is the situation.
I'm Visually impaired and im a tinkerer i make small projects small circuits and mod mod mod the everliving crap out of almost every thing i own.

Well one of the most anoying aspects of having poor eyesight aside from how long it takes me to plug in a split molex and bouncing around the room when i burn my nose on the soldering iron is reading a meeter.

After slowly lining up the probes getting them well in spot i end up moving so much to try and see the meeter i loos the connection i'm trying to test. so i want to rig a meeter to speak it's mind when i click a foot pedel

ofcorse this can be setup to log as well but bla i want speech :)

Since my old meeter has finaly lost calabration so much that it's usless i'm in the market for a new one and this time i'm going to get a good one (100-200)$ range now that cost is going to hirt . and hirt hard for me this meeter is going to have to last me at least 10 years to be worth it.

so i'm hoping you folks out there can help.

I need a meeter that i can tap a serial line on. somthign that spits out it's readings prety fast
as you can guess i don't mind modding it if i have to.

The string is important.
it should contain.
[setting|range|reading] or more.
the spoken result (altho i'll probably shorthand it) will speak something like this.
(foot click)
{speech}-- A C One hundred fifteen point three two three volts
or
{speech} Amps one point 4 Milly amps.

All that can be parsed form the string even if it's spitting out decimal data like 1,4,9,1.9369000

I just need a good meeter that i know will last take a few Whopses off the table and i can tap a data line out of.

A plus if the data tap is powerfull enough to run an opto

oh ya :) it can be one way data no return data needed. all the other stuff is handled by the micro.

PS.
dont know wich micro i'll be using yet it's a tossup between arduino and pic right now.

PPS my old meeter was modded to run a HUGE wall mounted display wich was keeling over in it's own write as it was allso a clock / caller ID and ran constantly.

And the method i used on it was just sniffing the signals sent to the meeters lcd itself so no real data.

 

Offline saturation

  • Super Contributor
  • ***
  • Posts: 4787
  • Country: us
  • Doveryai, no proveryai
    • NIST
Re: Multi Meeter Streaming Serial Output.
« Reply #1 on: January 06, 2011, 12:44:45 pm »
This is definitely a field where electronics can help.

Many DMM from Uni-T and Agilent, at the least, can output their data into USB, and from there to an ascii/unicode file you can parse.  How they pass the file varies, so you'd have to customize it for the meter you choose.

A quick way to parse this file maybe to use the Windows built in text-to-speech converter, it won't be pretty but it will be functional very quickly.  Its available from Accessories folder.



Best Wishes,

 Saturation
 

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Re: Multi Meeter Streaming Serial Output.
« Reply #2 on: January 06, 2011, 12:59:12 pm »
I'm familiar with the windows TTS API and i'm not going the pc route i'm going to use a micro to keep the meeter portable.

not sure how to read a USB chain quite that way with the micro tho :( so i still need somthing that can be red form a standard serial port. if possible that is.

And links to the meeter and or a full model would help pleas. so i can look it up.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10234
  • Country: nz
Re: Multi Meeter Streaming Serial Output.
« Reply #3 on: January 06, 2011, 01:52:58 pm »
since all the speech you need is just fixed set of words you could record someone saying the words you need.
 
you'd need...
* mcu  (atmega/arduino should do fine. ive used them before for playing speech audio)
* the meter serial port (get a meter that has serial out. usb only meters will be too tricky)
* max232 or simlar ic if needed for meter serial output voltage converstion
* a sd card socket / breakout board
* a dac chip plus small audio amp

there is example code for reading a fat32 sdcard with a atmega mcu and probobly most others too.
WAV file are pretty easy to understand and to streem out the data to a dac ic. if ya hard code it for one type of wav. eg 8bit 11k mono ya can just ignore the file header and go straight to the audio samples, they always start at the same place in the fine

two thing to note
1.  use a sdcard smaller than 2GB.  some sdcard libraries dont like the bigger ones as they use a different standard.
2. when recording audio. Record it at the same bit/sample rate you are going to use on the mcu. it will sound way better than recording in high quallity and then using software to downsample to the same lower quallity
« Last Edit: January 06, 2011, 02:13:37 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Multi Meeter Streaming Serial Output.
« Reply #4 on: January 06, 2011, 02:11:28 pm »
WAV file are pretty easy to understand
can i get a reference for wav data format?

to zagro. my uni-t 71a can spit out serial data through ir to usb, hacking the ir led lead should be possible, but i never know how much kbps the data is sent. all i know so far is the data is spitted at 1-2 Hz only, so when you hit the pedal, the longest time you have to wait for the answer is 1 second. hope that helps.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10234
  • Country: nz
Re: Multi Meeter Streaming Serial Output.
« Reply #5 on: January 06, 2011, 02:46:27 pm »
WAV file are pretty easy to understand
can i get a reference for wav data format?

here
https://ccrma.stanford.edu/courses/422/projects/WaveFormat/

that url is all i used to write the atmega code for reading the data. In wav files the samples are just raw data, there is zero compression

if you hardcode it to assume say mono 8bit 8000samples/sec you can just jump to the data section and start sending the samples to the dac using a timer set to trigger an interrupt 8000 times per sec.
you want to run the mcu at a fast clock speed tho, so you have cpu time to do other things.  i used a atmega640 at 14mhz when i did it. but the atmega640 chip is way overkill

when testing start with a wav file of a sine wave. That way you can look at the dac output with a scope and you know what its suppost to look like.

speech is barely understandable at 4000samples/sec  compared to cd music which is at 44100.  
i used 8000 when i did it which is telephone call quallity so its fine
« Last Edit: January 06, 2011, 03:02:11 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline JohnS_AZ

  • Frequent Contributor
  • **
  • Posts: 499
  • Country: us
    • About.me
Re: Multi Meeter Streaming Serial Output.
« Reply #6 on: January 06, 2011, 03:00:30 pm »
Have you looked over the stuff on this site?

http://www.speechchips.com/shop/
I'm either at my bench, here, or on PokerStars.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10234
  • Country: nz
Re: Multi Meeter Streaming Serial Output.
« Reply #7 on: January 06, 2011, 03:09:55 pm »
Have you looked over the stuff on this site?

http://www.speechchips.com/shop/

 yeah a speech chip is another option. then it can say anything you want just by coding it
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Re: Multi Meeter Streaming Serial Output.
« Reply #8 on: January 06, 2011, 03:21:17 pm »
using a wave table is one way to go for sure.
i'll thank about it.
i've seen some synth sets that may have a smaller footprint tho.

i'm not worried about overkilling the cpu speed it's a one-off most likely.

Dev board
to
protoboard. And depending on size it may stay on proto board.

or i'll poke around for someone to do me up a pcb.

i dont like handling the acid if i can help it :p (note to all use a plastic dribble pan under the acid bowl or you may walk in to find a big ol whole in your work aria)

About the DAC.
FM synth i've done plenty of. well i've used libraries for but never used a dac...

Think i could just track down one in a cd player rip it out and poke at it with a stick? or do you have one you'd recommend?

i've got a small collection of logetech wireless headphones i can pull bits out of... (blastid folks used hotglue to hold the earpiece wires in place insted of solder......

Psi about the sd card. yes i've seen them used havent tried to interface one myself yet. do you know of any good holders that are easy to solder in EG through hole or at least Legged or maby even someone who sels them on a small brake out board? i did a quick google and it gave irrelevant results :(

umm wait.. shows i'm typing while thinking i just hada brainstorm. i've got 2 512meg micro sd cards i used for a phone and i still have the adapters :) i'll just solder direckly to the adapter :D lol if you havent notest i like to repurpous things :p
 

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Re: Multi Meeter Streaming Serial Output.
« Reply #9 on: January 06, 2011, 03:41:49 pm »
TTS256 Text to Code IC for SpeakJet
SSG01 Sound Coprocessor IC
Cost for both
47.94 US

excuse the half asleep person you'd only need one of these ... still a bit pricey since i have a speech envelope library for pic and arduino/atmel chips.

Before any one asks the library i have will set the whole chip to doing nothing but generating the sound while speaking theres no leftover cycles. it's more of a function call than anything.

or.

using an fm synth chip and building the phonim liberary on the fly and or pulling it from a table....
mind you not 100%sure wich fm chip i'd go with the old fallback is getting hard to find
was a Yamaha chip used in early computers...

posibly could use a polyphonic chip used in celphones i'll have to look at there interface :)

nice idea tho to get speech quick out of a project without bogging down the cpu with actuily making the phonim set.

sorry for the spelling errors in this post :)
« Last Edit: January 06, 2011, 07:49:19 pm by Zagroseckt »
 

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Re: Multi Meeter Streaming Serial Output.
« Reply #10 on: January 06, 2011, 03:49:38 pm »
to zagro. my uni-t 71a can spit out serial data through ir to usb, hacking the ir led lead should be possible, but i never know how much kbps the data is sent. all i know so far is the data is spitted at 1-2 Hz only, so when you hit the pedal, the longest time you have to wait for the answer is 1 second. hope that helps.


Beleve it or not i cant find that model via google i get 4 pages of apartments for rent
 

Offline arcom

  • Contributor
  • Posts: 42
  • Country: hr
    • Arc's Lab
Re: Multi Meeter Streaming Serial Output.
« Reply #11 on: January 06, 2011, 04:58:42 pm »
It's this one --> UT71A

All UNI-T's handheld multimeters capable of PC connection have an IR LED at the back side so it's pretty easy to get a reading from it. Their PC applications are horrible but they indicate current measurement mode which means that the meter doesn't just send out raw ADC values but also other parameters such as range, mode, etc.
 

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Re: Multi Meeter Streaming Serial Output.
« Reply #12 on: January 06, 2011, 06:17:29 pm »
This looks like one of the meeters in that shootout on the video blog O.o i'll have to dig through them see if it is.....

 

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Re: Multi Meeter Streaming Serial Output.
« Reply #13 on: January 06, 2011, 06:27:51 pm »
hehe reading the manual right now
cant help but notice the mild engrish.
at least it's not a flat google translate conversion.

why dont these companies just mine the net for cheep engrish to English translators ??

not a bad translation but still reads like one :)

Edit

Ok i've bookmarked this meeter it might have potential.

I'm hoping for a few suggestions so i can compare and have a bit of a choise.

no minchen about it's output in the pdf manual USB or UART or Opti

i've looked at the few micro's i have on hand and i only have a pic and an off beat arm based thing i never could get working... and the pic only has 4k ram i'll need more than that to pull off what i want so i'll probly end up getting an arduino style for testing or just grab an atmell and force the arduino preloader into it with a paralel programer :p

OOor i'll buckle and pull the one off the outofeeder for the birds...


« Last Edit: January 06, 2011, 06:41:00 pm by Zagroseckt »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11713
  • Country: my
  • reassessing directives...
Re: Multi Meeter Streaming Serial Output.
« Reply #14 on: January 06, 2011, 08:23:01 pm »
here
https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
thanx alot for the link and detailed explanation. saved it already for later reference. i prefer this raw data rather than pre-built chip or circuit, i feel like i'll have more power to control the audio.
but the synth chip will be a good option too, but later, i want to concentrate on wav first.

This looks like one of the meeters in that shootout on the video blog O.o i'll have to dig through them see if it is.....
iirc, dave reviewed ut60d. the cheaper line of uni-t (compared to mine) also got the ir-usb connection i believe. you may type uni-t in ebay and everyone (most) of them will popped out.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10234
  • Country: nz
Re: Multi Meeter Streaming Serial Output.
« Reply #15 on: January 07, 2011, 12:34:35 am »
About the DAC.
FM synth i've done plenty of. well i've used libraries for but never used a dac...
The DAC chip i used is the TLC7226,  It's...
* Around US$6  (im sure there are probably cheaper dacs available, this i just the one i had laying around so i used it)
* 4 channel
* 8 bit (which is all you need for speech, its a parallel interface so you can just wire the 8 bits up to one of the ports of the mcu)
* Fast enough for speech
* Not very complex to talk to with the mcu.

It's probably not the best day for the job but it worked fine for me.


Psi about the sd card. yes i've seen them used havent tried to interface one myself yet. do you know of any good holders that are easy to solder in EG through hole or at least Legged or maby even someone who sels them on a small brake out board? i did a quick google and it gave irrelevant results :(
There is probably a arduino board with a sdcard slot available.

umm wait.. shows i'm typing while thinking i just hada brainstorm. i've got 2 512meg micro sd cards i used for a phone and i still have the adapters :) i'll just solder direckly to the adapter :D lol if you havent notest i like to repurpous things :p
Yeah, as far as i know microsd cards are pin-pin compatible with sd cards so should work fine.

Just to give you an idea, for my mcu speech project the word "initializing" in wav format in mono 8-bit 8000-samples/sec uses around 8000 bytes of disk space.
So a 512MB card could hold something like 64000 words, that's sixty-four thousand!  :)
« Last Edit: January 07, 2011, 12:45:29 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ZagrosecktTopic starter

  • Newbie
  • Posts: 9
Re: Multi Meeter Streaming Serial Output.
« Reply #16 on: January 08, 2011, 12:29:44 pm »
Still need more chime in's on which meeter to choose.

The talking bit alltho fun to talk about i've done before.

Meeter with a lead i can tap for serial or allredy has an output.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10234
  • Country: nz
Re: Multi Meeter Streaming Serial Output.
« Reply #17 on: January 08, 2011, 12:55:52 pm »
i dont see the meter choice being all the important with regards to being able to work with your project.
All it really needs to have is a proper serial cable interface instead of usb.
And have its serial protocol documented.

Other than that your pretty much free to pick any meter that has the features and accuracy you want

There is going to be some mcu programming needed to extract the info from the serial string for any meter you pick.
I dont see the complexity of the system changing much between the different protocols that different meters may use.
Just;
- Wait for your button or foot pedel to be pressed.
- Start reading the serial data into a char array char by char as it comes in the serial port starting at the 'start of string' marker
- Stop at the 'end of string marker' or crc check.
- Disable the serial input (to stop new data from overwriting your current data before youve processed it)
- Extract out of the array each digit you want to speak and either send them to a speech chip or play the wav recording
- Reenable the serial input.
« Last Edit: January 08, 2011, 01:01:49 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

alm

  • Guest
Re: Multi Meeter Streaming Serial Output.
« Reply #18 on: January 08, 2011, 01:26:47 pm »
i dont see the meter choice being all the important with regards to being able to work with your project.
All it really needs to have is a proper serial cable interface instead of usb.
And have its serial protocol documented.
I agree. The initial question was about a continuous stream of results (don't think most meters can do that, although some can). But since you need a MCU anyway, I don't see the problem with sending a 'start measurement' command each time. It takes at least a few seconds to pronounce the result, so you don't need several samples per second either.

I would limit myself to async serial (RS-232), USB host (eg. for USB TMC or just serial converted to USB) is many orders of magnitude more complex. I would prefer a meter with a serial connection provided by the manufacturer, since drilling holes into the case is a safety hazard. I would also make sure that the connection is isolated (eg. optically).

Documentation of the protocol might be an issue. Usually the more expensive stuff has documentation (I know the protocol for the Fluke 187/189 is documented), and the cheap stuff only has a crappy piece of software. You can reverse engineer by sniffing the serial data while running the PC application, but proper documentation is much nicer to work with. If they use a standard ASIC, you may be able to get the protocol from the datasheet.
 

Offline sonicj

  • Frequent Contributor
  • **
  • Posts: 756
  • Country: us
  • updata successed!
Re: Multi Meeter Streaming Serial Output.
« Reply #19 on: January 08, 2011, 06:06:42 pm »
what about a used bench meter? Agilent/Hewlett Packard 3478A via eBay

pros:
i would think hp-ib is likely easier to interface than USB, i've seen gpib to FT232 kits somewhere before, lots of clearly documented, straight forward programming options, 6 1/2 digit resolution, 4 wire mode

im guessing there are bench meters with rs-232 out as well.... i just don't know of any.
-sj
 

Offline dimlow

  • Frequent Contributor
  • **
  • Posts: 301
  • Country: gb
  • Likes to be thought of as
    • Dimlow Ponders
Re: Multi Meeter Streaming Serial Output.
« Reply #20 on: January 08, 2011, 06:53:42 pm »
How about a talking meter ?

http://www.mpja.com/prodinfo.asp?number=16562+TE

Its says no longer available, but you should be able to find one some place
 

alm

  • Guest
Re: Multi Meeter Streaming Serial Output.
« Reply #21 on: January 08, 2011, 11:59:19 pm »
what about a used bench meter? Agilent/Hewlett Packard 3478A via eBay

pros:
i would think hp-ib is likely easier to interface than USB, i've seen gpib to FT232 kits somewhere before
Not sure about this, GPIB is a typical seventies/eighties protocol: parallel and lots of out-of-band signals, bulky cables with lots of conductors. The modern approach would be to do it serially and do everything like addressing and talk/listen mode in software. There are fairly few DIY designs interfacing with GPIB, as far as I know. At least for USB, there are off-the-shelf solutions (even though they may be expensive and complex).

lots of clearly documented, straight forward programming options
No argument here, documentation tends to be much better (even compared to modern brand-name equipment, let alone cheap stuff).

im guessing there are bench meters with rs-232 out as well.... i just don't know of any.
Most designs between late eighties and the time when USB came along feature RS-232 (eg. HP 34401A), but they tend to be much more expensive than the early eighties/late seventies stuff that is limited to GPIB/HPIB.
 

Offline sonicj

  • Frequent Contributor
  • **
  • Posts: 756
  • Country: us
  • updata successed!
Re: Multi Meeter Streaming Serial Output.
« Reply #22 on: January 09, 2011, 04:00:49 am »
wow, the manual i thumbed through said '88 but i had no idea the design was that old! heres the manual in case anyone is interested link 19.44mb

the 34401A is a obvious winner over the older GPIB, but at 6 or 7x the cost.... thats a tough pill to swallow for most enthusiasts. heres the GPIB PIC project i was thinking of... http://www.webalice.it/hotwater/PicPlot.htm  available as a schematic & .hex, kit or pre-built. and the ft232 version http://www.webalice.it/hotwater/USBpicplot.htm

-sj
 

Offline saturation

  • Super Contributor
  • ***
  • Posts: 4787
  • Country: us
  • Doveryai, no proveryai
    • NIST
Re: Multi Meeter Streaming Serial Output.
« Reply #23 on: January 09, 2011, 01:01:21 pm »
I've several old GPIB devices.  What I did was get a GPIB-USB converter, so if the OP feels like, using a GPIB device can be an option, but the adapters are not cheap.  However, like my prior post, this will tie you to a PC to do interpretation.

This is the most cost effective one, $150, the Prologix.  Otherwise, its market is the pros, and the typical adapter price is $500+.

http://prologix.biz/



You might get lucky with the pre-made talking DMM.  I see there were several available until 2009.  "Talking multimeter" was the keyword to find other who've done it.

http://forums.parallax.com/showthread.php?79927-Finished-Talking-Multimeter-that-uses-METEX

http://www.edaboard.com/thread59056.html

http://www.igi-group.com/shop/product.php?id_product=81

http://www.omega.com/pptst/UV1000.html





How about a talking meter ?

http://www.mpja.com/prodinfo.asp?number=16562+TE

Its says no longer available, but you should be able to find one some place



what about a used bench meter? Agilent/Hewlett Packard 3478A via eBay

pros:
i would think hp-ib is likely easier to interface than USB, i've seen gpib to FT232 kits somewhere before
Not sure about this, GPIB is a typical seventies/eighties protocol: parallel and lots of out-of-band signals, bulky cables with lots of conductors. The modern approach would be to do it serially and do everything like addressing and talk/listen mode in software. There are fairly few DIY designs interfacing with GPIB, as far as I know. At least for USB, there are off-the-shelf solutions (even though they may be expensive and complex).

lots of clearly documented, straight forward programming options
No argument here, documentation tends to be much better (even compared to modern brand-name equipment, let alone cheap stuff).

im guessing there are bench meters with rs-232 out as well.... i just don't know of any.
Most designs between late eighties and the time when USB came along feature RS-232 (eg. HP 34401A), but they tend to be much more expensive than the early eighties/late seventies stuff that is limited to GPIB/HPIB.
Best Wishes,

 Saturation
 

alm

  • Guest
Re: Multi Meeter Streaming Serial Output.
« Reply #24 on: January 09, 2011, 05:40:10 pm »
wow, the manual i thumbed through said '88 but i had no idea the design was that old! heres the manual in case anyone is interested link 19.44mb
According to that manual, the first edition was published in 1983, so the HP 3478A is from early eighties. HP-IB (later GPIB) was introduced in 1972, and according to Wikipedia developed in late 60s.

heres the GPIB PIC project i was thinking of... http://www.webalice.it/hotwater/PicPlot.htm  available as a schematic & .hex, kit or pre-built. and the ft232 version http://www.webalice.it/hotwater/USBpicplot.htm
I didn't know that one. It states that it doesn't implement controller mode (it's just emulating a plotter), not sure if that's enough for this application (most equipment has a talk-only mode, but I don't know if they send out a continuous stream of results). It uses a PIC to interface with the GPIB, the FT232 is only there to connect the PIC to USB. I thought you were talking about getting the FT232 to talk GPIB. I'm sure you can get any MCU with enough pins and ROM to talk GPIB, the initial implementation was in just some TTL logic (hence all the separate signals). You probably won't get the full 1.8MB/s, but neither do the Prologix devices, so apparently there is some kind of flow control.

I've several old GPIB devices.  What I did was get a GPIB-USB converter, so if the OP feels like, using a GPIB device can be an option, but the adapters are not cheap.  However, like my prior post, this will tie you to a PC to do interpretation.

This is the most cost effective one, $150, the Prologix.
Yes, that's a good solution, but a $150 DMM + $150 GPIB interface somehow doesn't sound like the simplest or cheapest solution to this problem. I think the Prologix just uses some FT232 device (or something related like FT2232), so you may be able to find UART signals inside. It can emulate an RS-232 port on the PC side.

see there were several available until 2009.  "Talking multimeter" was the keyword to find other who've done it.
I would be worried about quality. The igi-group one looks similar to cheap, crappy meters, with manual ranging and very little protection circuits. The Omega one looks better (and more expensive), but is not a DMM, more like an ADC. Just a fixed voltage and current ranges I think. Starting from a good DMM and adding a text-to-speech module seems easier than starting with good text-to-speed and adding a bodge-job DMM. Auto-ranging and input protection (eg. mains voltage on ohms range) seem almost mandatory for this application.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf