Hello all..
i know this is a much asked question, but i d still ask it anyway.
I am more of a power electronics guy in embedded systems.
more to do with pwoer conversion and power control.
I did acquire a web platform long ago in hopes of using it in one of my pet projects.
Recently i got an idea for its usage.
Let me make it clear first.
I have ZERO experience in ethernet, tcp ip etc etc etc.
i did read mircochips tcp ip stack help file back to back (not thoroughly though) several times in the last week in hopes of trying to understand it.
First of, it is pathetically documented. a first time user will most probably throw his hands up in disgust at the apparent (lack of) user friendliness.
secondly there is still a very large slip between the cup and the lip between microchips stack and the web platform.
Well, this is not a rant. I am working on a project where i am using a large solar panel (100 watts) to charge a 12V 40 ah battery. This battery will be powering my clients networking hardware (2 fibre optic media converters, 2 8-port linksys switches and 1 16-port switch). The charger itself is intelligent 12V 6A charger, has a PIC controller for sensing the solar panel output, battery level, load current and charge the battery using PWM. the client is happy with the solution and the entire setup, but they have no way of checking the battery level without physically going to the field. The entire setup is self sustainant. My client is a ISP provider. There are already about two hundred such units on the field.
As a personal project, i wanted to upgrade the hardware, implement SNMP protocol using microchips TCP IP stack and plug a ethernet cable from the charger to one of the port switches on the ethernet switch, so that they could monitor the data of the charger over ethernet while in their offices. It is not a clients requirement but i did get this idea that i would like to try out. I have one of their pilot installations on the top of my office. :-D
Not for commercial purposes though, its all on my time and effort.
I do not know if its crazy or not but i wanted to see if i could achieve it.
As i mentioned earlier, i acquired a web platform a while back. i just wanted to see if i could get started on the tcp ip stack on the web platform.
but a week of reading and net trawling = zero progress.
microchips forums are but for the more seasoned pros out there who know what they are doing. i doubt if anyone will want to invest time and effort helping out a greenhorn in networking.
i just wanted to ask here if anyone can get me started with the stack.
You know, something like this
1> include these files
2> modify these #defines
3> customize these variables.
4> Write your html web page using these functions.
5> Arrange your main function like this.
6> Build and flash the dsPic.
7> Connect and run.
Voila!!
(Yes, i am that dumb when it comes to ethernet and no i have no shame in asking for help :-D )
I did get the web platform walkthrough up and running though.
Must say far more newbie friendly than microchip.
Is anybody here willing to walk a newbie through the steps?
Thank you.
I'd suggest:
(1) http://dangerousprototypes.com/docs/Int ... rogramming (http://dangerousprototypes.com/docs/Introduction_to_dsPIC33_programming)
(2) http://dangerousprototypes.com/docs/SD_ ... erver_demo (http://dangerousprototypes.com/docs/SD_card_web_server_demo)
(3) viewtopic.php?t=475 (http://dangerousprototypes.com/forum/viewtopic.php?t=475)
As for the rest, I found the Microchip documentation (especially the release notes) and their demo code very helpful.
Hi krish2487,
This sounds like a very doable project. The embedded ethernet stuff isn't very simple though. I'd also suggest the links dpropicweb suggests, especially the SD card server which is somewhat similar to what you want. From there, give us a shout when you need help.
I would also suggest a different route too, such as the contiki, uIP, or FreeRTOS ports for the web platform. They are open source and all of the code is included (so you don't have to deal with Microchip's changes to the internet stack that break compatibility between versions). There are versions already working on the web platform in our SVN. These will have even less documentation than the Microchip stack though, but there is some general stuff out there.
Here's info on grabbing code from SVN:
http://dangerousprototypes.com/docs/Using_SVN (http://dangerousprototypes.com/docs/Using_SVN)
Here's some other stack ports for the Web Platform:
http://dangerousprototypes.com/docs/Web ... m#Firmware (http://dangerousprototypes.com/docs/Web_Platform#Firmware)
Thanks Ian and dpropicweb
I guess i shall get cracking with whats already available here.
:-)
I have not at all looked at other alternatives what you suggested ian.
From what you guys have experienced which is a much easier, if not worthwhile, to pursue
Microchip TCP IP stack or a combination or uIP and FreeRTOS??
which is easier to understand and implement??
from a newbies point of view??
I would go with contiki. It is a cooperative multitasking system developed by Adam Dunkels who also wrote the uIP stack.
You wont get Real Time Multitasking, but it is easier to understand and has some very helpful constructions for abstracting state-machines in protocol handlers. They pretty much become straight line code for the developer.
And from what you are describing you don't seem to need realtime anyway.
And as a kicker I am pretty sure there is already a SNMP implementation for it to start from.
Check out http://http://www.contiki-os.org/ and just ignore everything Wireless Sensor Network, it just boils down to IP over some media and you as a user/developer shouldn't have to care.
I'd recommend contiki as well, with the caveat that none of them will be a cake walk.
Thanks for the heads up Ian,
I m just walking through the links posted by dpropicweb.
its a fairly easy to follow and intensive walkthrough..
There's an SNMP implementation for Contiki here http://code.google.com/p/contiki-snmp/ (http://code.google.com/p/contiki-snmp/)
Slides: http://cnds.eecs.jacobs-university.de/s ... i-snmp.pdf (http://cnds.eecs.jacobs-university.de/slides/2011-aims-contiki-snmp.pdf)
I would start simple, get the A2D side working on the web platform board and output it to the serial port. As a minimum you will need a protective diode and a resister network to get the battery voltage down to the 3.3V A2D range. Some people also use a mosfet to disconect the load from the battery when not charging. When you have the data sampling OK, I would look at the ethernet side and broadcast the readings as a binary UDP broadcast, and try to pick those up over the network. You can knock up a python GUI for any PC using my example very easily. Only then would I go to the trouble of trying to integrate that 50lbs of gorrilla SNMP implementation, as that's probably an order of magnitude more difficult than the rest of it.
Contiki docs: http://dangerousprototypes.com/docs/Con ... b_platform (http://dangerousprototypes.com/docs/Contiki_OS_on_the_web_platform)
Chris
thank you shuckc
its quite helpful.
i m still experimenting with microchips tcp ip stack
the recent pic24 post on the main page too was helpful to understand the web platform.
i ll graduate slowly over to contiki.
the main gap in microchips stack comes in the http programming.
i m still in the process of getting it to work properly.
A quick question.
I did come across a post either in the forum or on the main blog which gave the memory addresses to be reserved if i am using the bootloader for programming the dsPIC, but i am unable to get the same post now.
I am using MPLABX.
Ian, can you kindly specify the reserved memory addressess, I am keeping the bootloader intact for its ease of use.
Thanks
I see on this page
http://dangerousprototypes.com/docs/Com ... C_projects (http://dangerousprototypes.com/docs/Compiling_PIC_projects)
that the end address for the web platform is
0x153fe so as to not erase the bootloader.
can anyone confirm that for me?
That is right to me, make that mod to the linker (.gld) and you should be good. Eport the .hex without that range to be sure.
Thanks Ian.
I apologize for the delay and lack of any progress.
(I have just undergone surgery for my eyes and still recovering)
I am planning to get back to the web platfor soon.
I expect i should be up and experimenting by this weekend.
I ll keep that in mind while working on the web platform.
Welcome back krish, I hope for your speedy recovery.