Re: PIC && WiFi suggestions
Quote:
Originally Posted by
Darrel Taylor
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.
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.
Re: PIC && WiFi suggestions
Quote:
Originally Posted by
dhouston
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.
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.
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.
Re: PIC && WiFi suggestions
Quote:
Originally Posted by
dhouston
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?
Re: PIC && WiFi suggestions
Quote:
Originally Posted by
jellis00
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. :o
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.
Re: PIC && WiFi suggestions
Quote:
Originally Posted by
Darrel Taylor
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
Re: PIC && WiFi suggestions
Quote:
Originally Posted by
jellis00
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.
Re: PIC && WiFi suggestions
Quote:
Originally Posted by
Darrel Taylor
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