navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 25, 2012, 11:35:47 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: Internet Datalogging  (Read 5319 times)
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« on: August 16, 2008, 12:13:25 PM »

Hi all,

For some time I have been wanting to experiment with internet accessible dataloggers. 

As a first step, I thought I would buy a PICDem.net 2 development board to experiment with.

It arrived today and is now connected to the network.

You should be able to access it here (until I turn the router off and the IP address is re-allocated) - where you will be presented with a homepage.

http://192.168.1.104/   

http://90.240.254.95


http://90.240.127.233/     (hopefully fixed IP address now!)

This small board plugs into a spare port on the router, and once you have given it a valid IP address,it needs no further support from the PC - thus making for a very low power internet accessible device.

At the moment you can just read the value from an analogue input, turn some LEDs on or off or write some text in the text box and click "Write", which will then appear on the LCD module on the board. 

Leave me a message like "Hello Ken from Martin" so that I know that you have been able  to access it. 

(You might have to click on the non-AJAX link on the right of the homepage )

There is a temperature sensor on board which I will connect up to the analogue input later so that it changes in real time.


regards


Ken
« Last Edit: August 16, 2008, 03:06:53 PM by KenB » Logged
Alan
Guest
« Reply #1 on: August 16, 2008, 12:49:59 PM »

Hello Ken

I cant connect to your home page

Regards

Alan
Logged
SteveH
Hero Member
*****
Offline Offline

Posts: 1079



« Reply #2 on: August 16, 2008, 01:14:42 PM »

 Same problem as Alan, Ken... Sad
Logged

Preveli, South Crete.
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #3 on: August 16, 2008, 01:16:03 PM »

Alan,

Thanks for the feedback.

Not sure whether this is a problem with my router or firewall - I have no problem connecting from this side of the wall.

Have you tried pinging 192.168.1.104 ?   That might determine whether it's externally accessible.


Ken

Logged
Ted
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2675



WWW
« Reply #4 on: August 16, 2008, 01:19:13 PM »

192.168.x.x is just a private network address. If you cannot change this to a publicy reachable address then you will need a NAT.
Logged

Volunteer moderator
6kW Proven turbine, 20 Navitron tube solar, GSHP, WBS, Rayburn wood central heating
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #5 on: August 16, 2008, 01:22:15 PM »

Ted,

Thanks for that, I re-read AndyC's explanation:

Quote
That's only half of it though. The trickier bit is making your unit act as a server on the Internet, rather than just on your network. The IP address range you are using (192.168.0.x) is called a 'private address range' - it's designed to work only on your network and won't be 'routable' i.e. visible on the Internet. What this means is that other people on the Internet can't type in 192.168.0.50 and get your TDC3e. Now your ADSL gateway has two IP addresses - one, which is on your local network and private, will be a 192.168.0. address. The other is on the Internet (via your ISP) and will be a public IP address, which people on the Internet can reach. What you need to do is to configure a tunnel on your ADSL gateway so that requests directed at it's public IP address are passed through the gateway to the TDC3e's private IP address. Not all gateways do tunneling, but most do - unfortunately there's no standard way of setting this up, so each brand of gateway will be different.

I will have to check the router configuration to see if this tunnel is possible.



Ken
Logged
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #6 on: August 16, 2008, 01:29:12 PM »

I have a Lynksys WAG54S.

Anyone familiar with settings on this router?


Ken
Logged
stephend
Hero Member
*****
Offline Offline

Posts: 562



WWW
« Reply #7 on: August 16, 2008, 01:52:43 PM »

Applications and Gaming -> Single port forwarding -> Port Range Forwarding

Then:
Application = whatever name you'd like to call your app
Start port = 80
End port = 80
TCP/UDP = TCP
IP Address = The internal IP address you posted in this thread
Enable = checked

Save, and perhaps restart (if that's required).
Logged

KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #8 on: August 16, 2008, 02:00:30 PM »

Stephen,

Thanks for that explanation. 

I have called the application Logger

Now what IP address do I give? Is it the one from the status page?  i.e.

IP Address: 90.240.254.95
Subnet Mask: 255.255.255.255
Default Gateway: 62.25.195.34
DNS1: 195.92.195.95
DNS2: 195.92.195.94

Perhaps I should get "Internet for the over 40's"


Ken





Logged
Alan
Guest
« Reply #9 on: August 16, 2008, 02:12:00 PM »

Quote " Perhaps I should get "Internet for the over 40's " "

It’s the taking part that matters Ken.

I still prove to my self on a daily basis that I don’t know what Im doing.

Regards

Alan
Logged
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #10 on: August 16, 2008, 02:51:17 PM »

Alan, Gents,

Thanks for your help.

It's now accessible on

http://90.240.254.95

http://90.240.127.233

Now that I have disabled DCHP and hopefully got a fixed IP address

and a mate has already sent me a message.  "Get a life Ken"   Grin

Here's one being used as a net interface for a low cost weatherstation.

http://jimnickerson.org/Weather.aspx



Ken


« Last Edit: August 16, 2008, 03:05:59 PM by KenB » Logged
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #11 on: August 16, 2008, 03:25:54 PM »

Gents,

Thanks for the first message of the day "Nice One" 

I now need to start ploughing through the reams of C code to find out how to get the PIC to read the on board temperature sensor and display the status of the I/O ports.

Microchip have provided an application which allows you to compile and upload your own web page to the on-board flash memory - it's amazing what they manage to get into 32K.

regards,


Ken
Logged
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #12 on: August 16, 2008, 04:14:59 PM »

Ivan, Gents,

Thanks for the message. Received nicely.

The picture shows Ivan's message.  The orange wire is a bodge so that I can read the analogue value from the temperature sensor and not the pot.

Unfortunately some browsers put %20 as spaces into the text box.  This is avoided by clicking the link on the RHS for the version that doesn't use AJAX.

I'm now going to try customising the webpage and reload it into the flash memory - so that its titled  "Ken's Microchip Server" or something similar.


Ken



* PIC_Ivan.jpg (71.58 KB, 800x600 - viewed 361 times.)
Logged
KenB
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2691


Energy Self Enlightenment


WWW
« Reply #13 on: August 16, 2008, 06:52:00 PM »

Gents,

After a bit of HTML butchery, I finally came up with this.   Grin

Yellow was the easiest colour  (FFFF00) and seemed to look OK

It's still on line at http://90.240.127.233 if you want to have a look.


Ken


* Smiley_PIC_Server.gif (75.09 KB, 1024x768 - viewed 329 times.)
Logged
insolare
Sr. Member
****
Offline Offline

Posts: 449


« Reply #14 on: August 16, 2008, 07:29:55 PM »

Ken,
if you disabled DHCP on your router that only affects your private network. There are 3 types of public address that ISP's give out - fixed, dynamic or sticky. Fixed you normally pay lots for and are really only needed if your running a server which needs to be accessible from t'internet. Sticky address (mine) are ones you keep until you end the contract with your ISP. Dynamic are the norm (yours) and will often change when you turn off/on your router.

Rather than talk to your board with an IP address you could set up a domain name with one of the DDNS (dynamic DNS) services. These guys will give you a proper address which will be easier to remember. This will point to your IP address. Now here's the clever bit. If your address changes they can update their DNS servers on the fly. All you need is a little application on you PC or quite often there is a client built-in to routers. Check your router. If you have a setting for DDNS your in luck.

Grahame
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!