BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Sat Jan 20, 2018 7:45 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Wifi
PostPosted: Fri Nov 05, 2010 11:55 pm 
Offline
Citizen

Joined: Sun Oct 17, 2010 4:46 am
Posts: 13
Ok, with regards to the RES pin. when I look in the data sheet it talks about the 10K pull up but it also shows it going to the RTS of the connected device. So lets just say I don't make that connection. then the RES pin is a active low pin correct. That means I keep vcc through the resistor on that pin at all times except when I want to initiate a reset, then I gnd the RES pin. Correct?

Now I had a look in the wifi docs and it says that hardware flow control is disabled so it doesn't need CTS and RTS. Question is does the nano 18?

Another question I have, can I have another serial port on the 18? I have the dev board so it has the built in usb programing connection and it is using the tx and rx pins. Now could I reconfigure a general i/o pin and use it like a serial port to talk to my wifi module. The idea then is I can actively debug my code on the basic via the editor and also have it functional to talk to the wifi. This would make life alot easier. I got the wifi to work on its own. pretty damn neat. connected beatifully to my home net and in adhoc mode.


Brad


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 12:04 am 
Offline
Citizen

Joined: Sun Oct 17, 2010 4:46 am
Posts: 13
Ok I read back in the thread, and you already talked about bitbang. the hardware serial uses the usb on the dev board and can have much higher speeds. I could create another serial port using a general io port doing bit bang but it would be slower. Ok. Off I go to see some examples..

Brad


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 12:53 am 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
Island Medic wrote:
Q: Ok, with regards to the RES pin. when I look in the data sheet it talks about the 10K pull up but it also shows it going to the RTS of the connected device. So lets just say I don't make that connection. then the RES pin is a active low pin correct. That means I keep vcc through the resistor on that pin at all times except when I want to initiate a reset, then I gnd the RES pin. Correct?
A: Yes, the reset is used during programming. That is how the compiler gets the bootloader code to accept new software and load it into FLASH after it finishes the download. I don't know what your IC3 is doing on this pin, so can't speak to that. It never hurts to have a rest switch available for the occasional misstart, so I recommend you add a grounded N/O switch and pullup.

Q. Now I had a look in the wifi docs and it says that hardware flow control is disabled so it doesn't need CTS and RTS. Question is does the nano 18?
A. Refering to the above, if you need to reset the nano for any reason, and you want to do it remotely (no switch pressing), then yes.

Q. Another question I have, can I have another serial port on the 18? I have the dev board so it has the built in usb programing connection and it is using the tx and rx pins. Now could I reconfigure a general i/o pin and use it like a serial port to talk to my wifi module? The idea then is I can actively debug my code on the basic via the editor and also have it functional to talk to the wifi. This would make life alot easier. I got the wifi to work on its own. pretty damn neat. connected beatifully to my home net and in adhoc mode.
A. Bit bang is possible on just about any I/O pin. The internal USART is available on P2 and P5, read the data sheet. The USART, using an internal baud rate generator and buffer registers, goes faster than bitbang, though.
The programming pin can do serial work as well, but only one direction at a time.

The USB-Serial chip has Tx and Rx, but these are merged into a single pin at the Nano. For another serial port with a second Tx and Rx, you might best use the hardware port. However, you'll have to add a TTL-serial adapter of some kind if you want to talk to a typical RS232 PC port.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 4:57 am 
Offline
Citizen

Joined: Sun Oct 17, 2010 4:46 am
Posts: 13
ah, ok I did finally see the hardware ports on p2 and p5. I missed that completely. Now that I have the hardware sorted out time to work on the code. It is funny I started out programing in Apple II+ basic many many years ago. It was very simillar. then I was forced to upgrade to a more object language. Now I have to go back to my roots and relearn the top down coding of basic. Pretty funny actually. The wifi module from roving networks is pretty figgin awsome. They even have a cheaper model coming out in early 2011 that will be 29.95. Can't get any better than that. Have you ever played with any of the GSM (cell phone) modules? How about RFID ever play with that at all?

Any how again thanks for the help.

Brad :)


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 5:51 am 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
Island Medic wrote:
Have you ever played with any of the GSM (cell phone) modules? How about RFID ever play with that at all?
Brad :)

No, none of that. I am thinking I should, however. The forums (and most SERIOUS electronic enthusiasts) seem to be heading towards robots, with autonomous operations gaining real attention. Whatever I do, it has to be inexpensive, easily obtained, and as simple to implement as a serial port.
Anyone have any suggestions in this matter?

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 7:56 am 
Offline
Master

Joined: Tue Jun 22, 2010 9:15 pm
Posts: 228
We've got RFID parts in the medical robotics equipment we build. What are you after? I'm somewhat familiar with a couple of devices.

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 9:06 am 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
RFID = "radio Frequency IDentification", right? Basically you have "proxy" cards that can take radiated energy from the reader and use it to power a circuit in the card that broadcasts back a unique digital "signature" for ID purposes. It's a security thing. Yes? No?

What I'm looking for is a way to get the robot to communicate to the PC to establish a remote wireless link that passes data and commands both ways. The farther the better, but "on the cheap" is my driving priority. Now, there are XBEE radio (where ZIGBEE is the simple but expensive implementation of this), bluetooth, and now I see GSM. I'd like 300 foot operating range, but if there is a cell phone solution, then this is pretty much infinite range if one is near a metropolitan area. It would be nice if the main unit just plugged into a port of some kind on the PC and the other device was a breadboardable module.

Ring any bells for anyone?
ken

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Last edited by kenjj on Sat Nov 06, 2010 9:07 am, edited 1 time in total.
spelling


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 10:16 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
GSM has massive potential, but it may not be easy to setup, or even free to use.
Some of those xbee modules have some rediculous range, like 40miles LOS (Line Of Sight), or 3miles obstructed.
Put the module on top of your roof in a sealed enclosure and there you go, massive control range.

Bluetooth is a nice option as it can link up to any PC's usb bluetooth dongle. I use a bluetooth keyboard so it's only natural for me to use bluetooth when connecting to a PC.

Also 2 bluetooth adapters can link with eachother, though i'll admit the range is horrible. 30 feet if you're lucky.

http://www.sparkfun.com/commerce/produc ... ts_id=9581
These here are not only cheap, but have good baudrates and fantastic ranges. The low frequency gives it some good penetration power too. lol
Infact i might pick some of these up. I don't want to be stuck with the limited range of bluetooth.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 6:20 pm 
Offline
Master

Joined: Tue Jun 22, 2010 9:15 pm
Posts: 228
Hi Ken,

kenjj wrote:
RFID = "radio Frequency IDentification", right? Basically you have "proxy" cards that can take radiated energy from the reader and use it to power a circuit in the card that broadcasts back a unique digital "signature" for ID purposes. It's a security thing. Yes? No?


Yeah, needs rather close contact. Don't recall who asked/replied with RFID. Not for remote control. We get security, configuration and usage info from instruments used on our surgical robot.

kenjj wrote:
What I'm looking for is a way to get the robot to communicate to the PC to establish a remote wireless link that passes data and commands both ways. The farther the better, but "on the cheap" is my driving priority. Now, there are XBEE radio (where ZIGBEE is the simple but expensive implementation of this), bluetooth, and now I see GSM. I'd like 300 foot operating range, but if there is a cell phone solution, then this is pretty much infinite range if one is near a metropolitan area. It would be nice if the main unit just plugged into a port of some kind on the PC and the other device was a breadboardable module.

Ring any bells for anyone?
ken


For 'bot communications, I've used BlueSmirf (smartfun) and now getting WiFI (not cheap) on my 'bot. The Bees, I haven't used.

A WiFi powered 'phone can work. I expect to use my iPhone4 to view my Blackfin camera-equipped 'bot (Lantronix module). Threads on LM and Surveyor forums.

Alan KM6VV

_________________
Visit:
http://groups.yahoo.com/group/SherlineCNC/
http://tech.groups.yahoo.com/group/HexapodRobotIK/


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 6:49 pm 
Offline
Citizen

Joined: Sun Oct 17, 2010 4:46 am
Posts: 13
http://www.rovingnetworks.com/pricing.php

If you look you can find a wifi module here for $40. The sales man was telling me that in then next couple of months they will have one at $30. At these kinds of prices it does make it affordable. I have one and took me about 5 min to setup and connect to my home network. Really easy to use.

I was the one asking about RFID. I have another project that I would like to build involving RFID so I was just asking if anyone had any experience with it. I wasn't trying to say that you could use it for two way comms with a bot.

The GSM was also a question for another project. Can you tell I have lots of ideas!! My wife and kids think I am nuts. Oh well.


Brad


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 9:31 pm 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
Id suggest getting RFID contactless smart cards, as opposed to standard high frequency RFID tags.

The advantages to these types is they can be writen, not just read.
Unlike most RFID readers, each card/RFID chip is pre-programmed with a specific code, and then the computer, or MCU pairs the code with the appropriate information.
These Reader/Writers however, you can set the information onto the card, so the information is shared with any RFID reader.

And you can actually store quite a bit of information on these RFID cards. A few KBytes infact. The highest i've seen was 128KB. But the cards were very expensive. 1KB and 4KB cards can be purchased on ebay for <$50 for 100pcs.

Heres a cheap one.
http://www.virtualvillage.com/rs232-13- ... 2-009.html
It's an RFID reader/writer.

And a slightly cheaper, TTL one on ebay.
http://cgi.ebay.com/13-56-MHz-Mifare-RF ... 3a5f85014f

So you could actually get an RFID card or other device such as a keychain fob. That can hold a ton of information. Easily enough for your security needs.
Also i think some of those mifare cards have micro controllers built in, but i don't know more than that.


Robot control doesn't use RFID, but can use RF transceivers, in my previous post. Not saying you can't have a robot initiate pre-programmed commands depending on what ever RFID card you swipe past it. Have a card for moving forward, another for moving back. Seems a bit of a waste though.

Island Medic, you're like me, full of ideas. I've been looking into smart cards and RFID cards for years now, long before i got interested in robotics and the like. Almost bought a smart-card reader/keyboard combo thing. I was going to use cheap smart cards to manage all my passwords. But didn't have the money for it.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sat Nov 06, 2010 10:45 pm 
Offline
Citizen

Joined: Sun Oct 17, 2010 4:46 am
Posts: 13
My next project is to make a scoring system for our local motocross club. due to the distances involved the prices go up alot. The best I have been able to come up with so far is 1500 for the reader and 900 for the two antennas I would need.this would be a complete hardware solution. Comes with a usb link to the pc and comes with a full sdk for vb and C++ and sample code. Just I don't think the club could afford the cost of the system. But it is still fun to do the research and keep my eye open for a workable solution.

My current project should keep my busy for a while yet anyway ;)

Brad


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Sun Nov 07, 2010 9:48 pm 
Offline
Citizen

Joined: Sun Oct 17, 2010 4:46 am
Posts: 13
the docs are a little light on the hserin and out. I have to build a unique url based on some variable data (base_url & user_id) and some hard coded stuff.

base_url = "open www.website.org 80",0 ; wifi module spec syntax
user_id = 18 ; this would be unique for each unit/user
enablehserial
sethserial1 h9600 ; this is all you need for a Nano chip

hserout [str base_url\50\0]
hserout ["GET /respond/main.php?action=3&userid="]
hserout [user_id]
hserout ["\n\n"] ; this tells the wifi module the page is complete.

OR

hserout [str base_url\50\0,"GET /respond/main.php?action=3&userid=",user_id,"\n\n"]


What I want to end up with is: " open www.website.org 80 GET /respond/main.php?action=3&userid=3\n\n "

Thanks
Brad


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Tue Nov 16, 2010 5:43 am 
Offline
Master
User avatar

Joined: Tue Jul 07, 2009 5:06 pm
Posts: 120
Location: Wisconsin USA
Ok i've been reading a little more into it.

These modules do have HTML clients, so you're doing good.
But you need to set up the ability to receive information.

After you send a command to the module to retrieve information from the website, you need to give the atom a way to receive the information from the module. This is where hserin comes in.
As for how you do this, i have no clue, it's with the module.
The atom uses a GET command to retrieve the information from the website, and then you'll need to use hserin to receive the information from the module.
Now then, because the hardware serial ports have a buffer, it shouldn't be too tough, but as for actual usage, sorry, i wouldn't be able to help you as I don't have one of these modules to play with.

_________________
Image
Basic Micro Blog
Universal Robot Controller


Top
 Profile  
 
 Post subject: Re: Wifi
PostPosted: Tue Nov 16, 2010 2:24 pm 
Offline
Master

Joined: Mon Aug 18, 2008 1:26 am
Posts: 799
Location: CA bay Area
To my knowledge, there is no GET command for the Atom. The Basic Stamp uses this, if I remember correctly. In fact, if you get ( ;) ) the latest reference manual, I believe you'll find it mentioned in the section about converting commands between Parallax's PBasic and MBasic.

As for HSERIN, there is a good explanation about using this command in the new manual.
You have to use some device that adapts some form of communications and sends the data out to the Atom in a serial format, whether RS232 ot TTL.
Later.

_________________
kenjj
http://blog.basicmicro.com/
http://kjennejohn.wordpress.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO