PIC && WiFi suggestions


Closed Thread
Results 1 to 23 of 23
  1. #1
    Join Date
    Oct 2008
    Posts
    29

    Default PIC && WiFi suggestions

    I want to experiment with getting a PIC to send some simple data wirelessly to a PC.

    google [ pic xbee] brings up many sites yet think some pro's on this site can get me started...

    Would like to get some suggestions on which PIC, WiFi module and PC receiver to use to build this experiment.

    tia

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Is Wifi a real must? How about the expected range?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I guess it depends on what you need, but ...
    I wouldn't mess with xbee-zigbee-newbee or whatever.

    Go with Something that gives you Everything, like serial over wifi. Using a COM port redirecter on the PC, it looks like a serial port, but it's wireless.
    HTTP server, Network Time access, etc. etc. etc.


    MatchPort® b/g
    http://www.lantronix.com/device-netw...matchport.html
    <br>
    DT

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Mastream(now Digi) Xbee whatever Bee, are pretty straightforward to use... they also have Wi-fi
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Oct 2008
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    thanks for the replies!

    regarding range, i would say not more than 100' from any given Tx to Rx {visualize warehouse}.

    i have been looking at these products ...
    ####
    WiFly 802.11b Serial Module - Roving Networks
    http://www.sparkfun.com/commerce/pro...oducts_id=8869

    XBee Pro 50mW Series 2.5 Wire Antenna
    http://www.sparkfun.com/commerce/pro...oducts_id=8876
    ####

    however, what Darrel pointed out with the COM redirector is quite interesting after taking a glance at the web page. I had looked at "TCPmaker" from melabs but already having a web server embedded cuts out a lot of work. the redirector takes care of getting transmitted date into, say an app like Excel or mysql.

    going to read some more from the Lantronix website.

    many thanks!!
    Bill

  6. #6
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Great, sounds like you're interested. So I should also say that there's NO programming to do on the PIC side.

    If you can HSEROUT to a PC with a cable, then the same program will work with the MatchPort.

    After installing the software on the PC, you just pull-up a web page with a browser to set the baud rate for the PIC and a few other options, then the device will automatically show up in the list of COM ports, in any PC program.

    Couldn't be easier.
    Unless they gave them out for free.

    Or maybe if it came with a wireless router ... which you'll need (but probably already have).

    DT

  7. #7
    Join Date
    Oct 2008
    Posts
    29


    Did you find this post helpful? Yes | No

    Default

    Hey Darrel,

    Liked what I saw on LANtronix's site. It may be overkill for this project both in cost and options it offers. But certainly worthwhile to make comparisons...I still may use it. It certainly offers ALOT.

    Just curious, but why the thumbs down on the XBee modules? Because not one module does everything? Not a quality product? etc ??

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Just a personal preference based on Compatibility.

    Almost everyone has a wireless router.
    Nobody has an XBee receiver.

    XBee is point to point.
    WiFi is point to World.

    With the matchport, no PC is required locally, just a router, and the device can be accessed from Anywhere. Or visa versa.

    You can even send email alerts, straight from the device.

    Granted, Xbee is cheaper. But if you're going to do it.
    Might as well do it right.
    <br>
    DT

  9. #9
    asithakal's Avatar
    asithakal Guest


    Did you find this post helpful? Yes | No

    Post Wi Fi Localization

    I'm planning to implement a robot with Wi Fi for Localizatin and communication with a central Control PC.

    How can I simultaneously Transmit and receive information from my Robot controlled by a PIC, to and from my PC ?

    Can I directly connect a USB Wi Fi Adapter to my PIC Circuit and what other devices/peripherals would i need to get this Done?

  10. #10
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Granted, Xbee is cheaper. But if you're going to do it.
    Might as well do it right.
    <br>
    Here are others for about the same cost to slightly more but, IIRC, a better feature set. If you are outside the USA, Mouser has taken an overly aggressive view of recent changes in export laws so you might want a source that's outside the USA.I decided against the Lantronix device because it just would not fit my enclosure but earlier Lantronix devices had severe restrictions on SMTP that rendered it nearly useless so I suggest you explore this if you really need email. That said, the WizNET device lists SMTP but really doesn't have it - it's a mistake in the docs. The ConnectOne device has the best feature set and its SMTP does work.

    Also, most of the virtual serial ports (e.g. Comport Redirector) only work under Windows.
    Last edited by dhouston; - 18th August 2009 at 19:19.

  11. #11
    Join Date
    Sep 2009
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Hi, apologies if this is a stupid question but, after the wifi module converts the serial data to TCP/IP and sends it on the network, how can an application retrieve the data again. For example if I was using the serial data in a VB application how would i retrieve it. Would i have to create a socket? Or is there some software included with the modules to do this for me?

    Thanks

  12. #12
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    It depends on the hardware. Bluetooth-serial adapters have virtual serial ports under Windows so you can write VB code for the serial port. Some WiFi-serial adapters also have virtual serial ports but with other hardware you'll need to handle the TCP/IP traffic. See the references to Com Port Redirector in the earlier messages in the thread.
    Last edited by dhouston; - 10th September 2009 at 17:25.

  13. #13
    Join Date
    Sep 2009
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    Thanks, thats exactly what i was hoping to find!

  14. #14
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    Quote Originally Posted by Darrel Taylor View Post
    I guess it depends on what you need, but ...
    I wouldn't mess with xbee-zigbee-newbee or whatever.

    Go with Something that gives you Everything, like serial over wifi. Using a COM port redirecter on the PC, it looks like a serial port, but it's wireless.
    HTTP server, Network Time access, etc. etc. etc.


    MatchPort® b/g
    http://www.lantronix.com/device-netw...matchport.html
    <br>
    Darrel, I am in need of a WiFi module in an embedded microcontroller application I am working on. MatchPoint b/g looks like a good match. However, I don't know what is meant by a "COM port redirecter on the PC". Can you explain?
    My application must work as follows so would appreciate your opinion as to whether Match b/g will do all this with a 16F883:
    1) 16883 and ultrasonic ranger (which gets its power from I/O pin of 16883) are awakened from sleep every 0.5 secs and ultrasonic ranger is powered up and pulsed for a range measurement (about 80msec). Ranger is checking to see if the range has changed from the previous cycle transmission. Vdd is also being internally checked in 16F883 for low battery. If either condition exists, an interrupt will be sent to the MatchPoint to wake it from sleep mode and then send date/time stamped report (from DS1307 or DS1337 RTC) containing range change and battery status via serial interface (RS232, EUSART, or what?) to MatchPort so it will transmit report via WiFi network to PC.
    2) When PC receives date/time stamped report it will check the RTC date/time against the network/PC time. If not synchronized PC tells MatchPoint to send message to 16F883 to re-synch the RTC chip (DS1337 or DS1307) time to network/PC time which is included in message. If synchronized, PC sends ACK report to MatchPoint to advise 16F883 time is still synched.
    3) 16F883, ultrasonic ranger, and MatchPoint go back to sleep mode until next 0.5 sec cycle.
    4) Repeat 1) thru 3).

    I plan on using the AT modem message mode to send serial data messages to/from MatchPort unless you suggest a different messaging technique??? I also don't know whether the EUSART of the 16F883 can be used as the RS232 interface with the MatchPort????

    I checked with Lantronix today to see if there was any way to command the MatchPort out of sleep mode by the PC on the network side. I was in hopes to do this to command the MatchPort and 16F883 out of sleep mode when the PC had data for the embedded microcontroller. Answer was no, hence my approach above to keep MatchPort awake until either a synch report, message report or ACK are received back to the 16F883.

    From what I see in MatchPort data sheet, 16F883 will not have to mess with WiFi settings or the serial settings which are already programmed into the MatchPort firmware...true??? Lantronix also told me that the PC side can't change any of these settings either since the MatchPort operates basically as a gateway....true???

    Would really appreciate your advice on achievability of above with MatchPort or if not what other WiFi device you would suggest.
    Last edited by jellis00; - 27th May 2011 at 06:21. Reason: MCU is 16F883 not 16F873

  15. #15
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    That sounds like a lot of current for a battery operated device. How much does the MatchPort draw?

    It looks like all WiFi modules will draw in the 250mA area when transmitting.

    You might look at the ConnectOne Mini Socket iWiFi. You send it AT commands - there's an example (wired or WiFi will be nearly identical) in the new Ethernet section here. I suspect but do not know for certain that there's an AT command to wake it from deep sleep mode.
    Last edited by dhouston; - 27th May 2011 at 06:47.

  16. #16
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    Quote Originally Posted by dhouston View Post
    That sounds like a lot of current for a battery operated device. How much does the MatchPort draw?
    Lantronix told me today that the MatchPort b/g without AES uses 740 mW when active and 250 mW when inactive and it draws 350 mAmps when data is transferred. I'm not sure whether there is a separate sleep mode in adition to inactive or not?? If not, I may have to use a NO relay under MCU control to turn power to the MatchPort on only when data needs to be sent via WiFi. Plan on using 250 mAH NiMH rechargeable battery as power source for application. The data transmit duration will be so short (maybe 0.2 secs) that the mAH load will be very small, so 250 MAH battery ought to last awhile.
    Last edited by jellis00; - 27th May 2011 at 06:34.

  17. #17
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    The ConnectOne module I mentioned draws 250mA transmitting and 8µA in deep sleep. Panasonic BR type batteries (non-rechargeable) pack a lot of power. They also have a very flat discharge curve, maintaining near full voltage until near end-of-life. I don't know your details but these may be worth a look.
    Last edited by dhouston; - 27th May 2011 at 07:02.

  18. #18
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    A couple more points...

    What voltage for the PIC? BR batteries output 3V.

    A few years back I used two BR coin cells (6V) with a 5V LDO to supply the PIC as well as sensors read by ADC. To monitor the battery, I read the LDO output with an ADC channel while using the battery voltage as Vref. As long as Vbat>Vreg the ADC read less than MAX and the battery charge was >5V. As soon as dropped below 5V, the ADC read MAX. This would occur very near end-of-life. Here's a schematic.
    Last edited by dhouston; - 27th May 2011 at 16:07.

  19. #19
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    Quote Originally Posted by dhouston View Post
    That sounds like a lot of current for a battery operated device. How much does the MatchPort draw?

    It looks like all WiFi modules will draw in the 250mA area when transmitting.

    You might look at the ConnectOne Mini Socket iWiFi. You send it AT commands - there's an example (wired or WiFi will be nearly identical) in the new Ethernet section here. I suspect but do not know for certain that there's an AT command to wake it from deep sleep mode.
    Thanks so much, Dave, for this info. I checked out the MiniSocket from ConnectOne and have a couple of questions:
    1) I couldn't find the "new Ethernet Section" and would like to read the example you mention that is located there. Can you be more specific as to how to find the "Ethernet Section" url location on their MiniSocket web page?
    2) You mention in another post that the MiniSocket only consumes 8 uA in sleep mode, yet the data sheet I see says it consumes 8 mA in power save mode and 40 uA in deep sleep mode. Can you please clarify where your "8 uA" comes from?
    3) I checked the AT+i Progammers Guide and I couldn't find an AT+i command to awaken the MiniSocket from PC side. I sent a question on this via email to ConnectOne and will let you know answer when I receive it.
    4) Do you have an PicBasic Pro code that you have developed for use with the MiniSocket for the PIC MCU serial interface (RS232, RS485 or UART??) that you could share with me?

  20. #20
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    Quote Originally Posted by jellis00 View Post
    Thanks so much, Dave, for this info. I checked out the MiniSocket from ConnectOne and have a couple of questions:
    1. It was added to the PicBasic Forum - Communications section a few days ago. Here's a direct link to mackrackit's code.

    2. It probably came from conflating the values you cite in a quick scan of the product brief.

    3. They are usually quite prompt in response.

    4. mackrackit's code cited above will serve as well as anything else. The AT commands are the same although there may be differences in details and configuration.

    As I noted recently in another thread I usually use ZBasic for projects that need more than 8 pins. It nearly eliminates development time and can cost as little as $10 for the smallest of their chips. However, I don't believe there's any way to put their chips to sleep in a really low drain mode. You can with a PIC but I believe you need to use the ASM sleep commands to do this. It's been too long for my feeble old brain to recall details and I lost a network HDD that had nearly all of my older projects a few months back.
    Last edited by dhouston; - 28th May 2011 at 23:30.

  21. #21
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    Quote Originally Posted by Darrel Taylor View Post
    I guess it depends on what you need, but ...
    I wouldn't mess with xbee-zigbee-newbee or whatever.

    Go with Something that gives you Everything, like serial over wifi. Using a COM port redirecter on the PC, it looks like a serial port, but it's wireless.
    HTTP server, Network Time access, etc. etc. etc.


    MatchPort® b/g
    http://www.lantronix.com/device-netw...matchport.html
    <br>
    Darrel,
    After reviewing its data sheet and your posts, I have decided to give it a go with a MatchPort b/g for our application.
    Do you have any kind of a reference design that uses one of the PIC chips with the MatchPort b/g that you could share with me? What I am looking for are:
    1) a schmatic;
    2) an example PCB interface/layouot between the PIC and the MatchPort;
    3) and some applicable PICBASIC PRO code that will setup the MatchPort and the serial interface, and also send/receive serial data/messages to/from the MatchPort using AT messages. Any help on this would be greatly appreciated.
    John Ellis

  22. #22
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    Quote Originally Posted by jellis00 View Post
    I have decided to give it a go with a MatchPort b/g for our application.
    What kind of range do you need? Could this doohickey work in your application? It might save you both work and money. Plus, it's really easy on a battery in sleep mode.

  23. #23
    Join Date
    May 2004
    Location
    brighton
    Posts
    149


    Did you find this post helpful? Yes | No

    Default Re: PIC && WiFi suggestions

    Quote Originally Posted by Darrel Taylor View Post
    Great, sounds like you're interested. So I should also say that there's NO programming to do on the PIC side.

    If you can HSEROUT to a PC with a cable, then the same program will work with the MatchPort.

    After installing the software on the PC, you just pull-up a web page with a browser to set the baud rate for the PIC and a few other options, then the device will automatically show up in the list of COM ports, in any PC program.

    Couldn't be easier.
    Unless they gave them out for free.

    Or maybe if it came with a wireless router ... which you'll need (but probably already have).

    DT
    Hi Darrel

    I have being reading your reply to this Bill ( Although its years old)
    just wanted to know if there are now newer similar modules that are easy to use like those today.
    i am thinking of adding this to a Data Logger project that has got serial data output so it can be read from anywhere
    in the world .
    A push in the right direction is needed here

    Isaac

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. PIC with WIFI module
    By JAWORSKI in forum Schematics
    Replies: 2
    Last Post: - 3rd December 2008, 03:19
  3. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  4. PIC Suggestions
    By Tobias in forum Off Topic
    Replies: 10
    Last Post: - 7th January 2008, 06:04
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts