Prototype: Web platform

in Prototypes, web platforms by Ian | 67 comments

This is an old version, see the latest version on the documentation wiki.

The Dangerous Prototypes web platform is a tiny server designed for networked hacks where a full PC is inconvenient. There’s lots of interesting projects that bridge the internet to microcontrollers, but most of them have a PC in the middle to handle network stuff. This business card size internet appliance can connect to web services, control physical objects from a browser interface, or email sensor status reports; no PC intermediary required!

This isn’t our first small server. Ian designed a popular web server on a business card featured at Hack a Day. The new web platform is also in the profile of a business card, but everything else is kicked up a notch. The microcontroller is a fast dsPIC33 (80MHz/40MIPS) with twice as much program space, DMA, and hardware math assistance. There’s also a simple USB connection for firmware updates and communication with a PC.

This article introduces the hardware. We demonstrate it with an small web server that controls I/O pins and accepts new web page uploads through a web browser.

The Web Platform is available as a kit for $35, including worldwide shipping. Seeed Studio will assemble yours for $5 more.

Hardware

Click for a large image of the schematic [PNG]. We used the freeware version of Cadsoft Eagle to make the circuit and PCB. Download the latest files from the project Google Code page.

dsPIC 33FJ128GP204

A dsPIC33FJ128GP204 3.3volt microcontroller (IC1) provides a lot of muscle to this tiny web server. dsPICs run up to 80MHz/40MIPs, and have some advanced features like DMA and hardware math assistance. The chip we used has 128Kbytes of program space, twice the storage of the 24F PIC in the Bus Pirate.

The dsPIC33- series also has peripheral pin select, a feature that allows custom pin assignments for the various hardware modules. This feature makes the simple, clean PCB layout possible. We considered using a 32bit PIC32, but these chips lack peripheral pin select and some key software support like an open source bootloader.

The PIC requires a 0.1uF bypass capacitor on each power pin (C2,3,4), and a 10uF capacitor (C31) for an internal 2.5volt regulator that powers the core. PICs are programmed through a five pin ICSP header (ICSP). A 2K pull-up resistor (R20) to the MCLR pin enables the PIC, a button (S1) temporarily grounds MCLR to cause a reset.

ENC28J60 network MAC & PHY

An ENC28J60 MAC/PHY (IC2) connects the PIC to an ethernet network at 10Mbps. This is a really popular chip for adding internet connectivity to hobbyist projects.

A 25MHz external crystal (Q1) and two 27pF capacitors (C22,C23) provide the clock source. Like the PIC, the ENC28J60 has an internal 2.5volt regulator that requires a 10uF capacitor (C32). Each power pin also gets a 0.1uF decoupling capacitor (C5-8).

R21 is a bias resistor for the ethernet PHY. The value depends on the ENC28J60 revision you’re using, current chips require a 2.32K 1% resistor. The PHY also requires a simple termination circuit (R10-13, C9-10, L1).

Pinouts are inconsistent among ethernet jacks. We used a jack (J3) with integrated magnetic provided by Seeed Studio. Verify that your jack has the same pinout, or modify the PCB to fit a jack available to you.

EEPROM

A 25AA1024 SPI EEPROM (IC3) provides 128Kbytes of external storage space.  The EEPROM can be used to store settings and web pages for the Microchip web server demonstration firmware, for example.

The EEPROM pins are brought to a header (EP) so it can be dumped with an external programmer like the Bus Pirate.A 0.1uF capacitor (C12) decouples the chip’s power supply. Hold and write protect are tied high to permanently disable these features.

microSD CARD

A microSD card provides a massive amount of removable storage that can be used raw, or with a PC-readable FAT file system. The latest Microchip web server demos can read files directly from a FAT-formatted SD card.

SD card holders are another part with really inconsistent footprints. We used a holder provided by Seeed Studio. Make sure you can get a similar holder, or modify the PCB to fit one you can find. We always use a 0.1uF capacitor (C11) on SD card supply pin, but it’s probably not necessary because the cards are decoupled internally.

FTDI 232R USB->serial chip

The Web Platform has a serial port-based bootloader to flash new firmware without a programmer. Serial ports are dead simple, but they’re getting antiquated and the connectors are huge by modern standards. An FTDI 232R (IC4) provides a USB->serial interface for loading new firmware in bootloader mode, and for simple USB connectivity from user programs.

The FTDI chip is powered by the USB supply. A ferrite bead (L2) and 10uF capacitor (C33) reduce electrical noise, and the supply pin gets a 0.1uF bypass capacitor (C13). A 0.1uF capacitor (C14)  is also required for the internal 3.3volt regulator. A single LED indicates the connection status and activity (R7, USB).

The FTDI232R has a separate supply pin for the I/O pins. While the chip runs from the 5volt USB supply, the I/O pins operate from the voltage connected to the VCCIO pin. We connected the VCCIO pin to the internal 3.3volt regulator so the chip interfaces the PIC at 3.3volts. We decoupled the VCCIO pin (C15), though the datasheet doesn’t explicitly specify this.

The chip is only powered when a USB cable is connected, and the chip can get hit with 3.3volts from the PIC when it’s powered down. A letter to FTDI tech support confirmed that this scenario is acceptable. However, we’re still a bit concerned it might be a weak point in the design. Out of an abundance of caution, our code only activates the UART transmitter after a value is received from the FTDI chip (indicating an attached PC). We recommend you do the same.

Auxiliary I/O pins and LEDs

We felt a major shortcoming of our previous mini-servers was the lack of enough I/O pins and LEDs. This design has a 10 pin I/O connector with 8 data pins, 3.3volts, and ground. All 8 data pins are 5volt tolerant, and all but RA9 (pin 1) can be assigned to hardware modules like SPI, UARTs, PWMs, counters, etc.  using peripheral pin select. Be cautious with external connections because the dsPIC outputs are rated for 4mA maximum sink and source.

The PWR LED is hardwired to the 3.3volt supply to indicate that the circuit is powered. ACT and LNK display the ethernet link and activity status from the ENC28J60. Three LEDs are available for for any purpose: LD1, LD2, and SD (not shown). LD2 shares a connection with pin 1 of the I/O header. Each LED has a 1K1 current limiting resistor (R1-3).

Power supply

The circuit requires a fairly hefty 3.3volt power supply to cover the needs of the ENC28J60. We used a large low-dropout regulator (VR1) that can supply 1amp+. The regulator has a 0.1uF input capacitor (C1) and a 10uF output capacitor (C30).

5volts is the ideal supply input. Higher voltages will work, but they also increase the amount of heat that the regular must dissipate. The power supply jack (J1) mates with a common 2.1mm DC barrel connector, the center tab is positive.

PCB

The schematic and PCB were made with the freeware version of Cadsoft Eagle. Download the latest files from the project Google Code page.

The PCB is double sided, but most of the action is on the top layer. Hardware module pin assignment makes all the routing clean and straightforward. The bottom layer is primarily a power connection to all the chips, and a large ground plain. We had our PCBs made with Seeed Studio’s Fusion PCB service (formerly propaganda). You can buy the extras PCBs from our order in the Seeed Studio store.

Partlist

Click for a full size placement image [PNG]. Most parts are surface mount, be sure to use flux and have solder wick handy to clean up any bridges. Our strategy is to start with the ICs (IC1-4), then attach larger surface mount components like S1, Q1, Q2, VR1, and the uSD card holder. After the major SMDs are attached, we start adding passive components like resistors, capacitors, and ferrite beads. Finally, we solder the through-hole parts like J3 and the headers.

Part Value Quantity
IC1 PIC33fj128gp204-i/pt (TQFP44) 1
IC2 ENC28J60-SO (SO28W) 1
IC3 25LC/AA1024-I/SM (SO8M) 1
IC4 FT232RL (SSOP28) 1
C1-15 0.1uF capacitor (0805) 15
C20-23 27pf capacitor (0805) 4
C30-33 10uF capacitor (SMC A) 4
L1,L2 200mA+ ferrite bead (0805) 2
LEDs LED (0805) 7
Q1 25Mhz crystal (HC49U) 1
Q2 32.768khz crystal (SMD) 1
R1-7 1,100 ohm resistor (0805) 6
R10-13 49.9 ohm 1% resistor (0805) 4
R20 2,000 ohm resistor (0805) 1
R21 2,320 ohm 1% resistor (0805) 1
VR1 3.3volt regulator (D2PAK/TO-263) 1
S1 Tact switch (DTSM-6) 1
J1 2.1mm power jack (SMD) 1
J2 MINIB USB jack (SMD) 1
J3 HR911105A ethernet jack 1
USD Seeed Studio microSD holder (SMD) 1
EP 0.1” pin header (03×2) 1
ICSP 0.1” pin header (05×1) 1
I/O 0.1” pin header (05×2) 1

Firmware

In this initial demonstration we’ll introduce the bootloader firmware and a simple network function test with HTTP server. Over the next few weeks we’ll post shorter how-tos that demonstrate other features and uses for the web platform.

The latest firmware downloads are on the project Google Code page. The code is written in C, and is compiled with the free Microchip C30 demonstration compiler.

Other demos:

Bootloader


We ported the open source ds30 Loader bootloader to the web platform so it can be programmed through the USB connection; no PIC programmer required. The ds30 Loader project has serial bootloader firmware for most PICs, and bootloader software for most computer operating systems. The bootloader is programmed into the chip once with a PIC programmer like an ICD or PICKIT, then future updates can be done over the USB port.

The bootloader resides in the uppermost page of the PIC program memory. It activates immediately after power on and waits for a commands entering the UART connected to the FTDI USB->serial converter. The bootloader passes control to the main firmware if it doesn’t detect an update request after three seconds.

To use the bootloader:

  1. Power up the web platform.
  2. Attach a USB cable from a computer to the web platform.
  3. Start the bootloader client software.
  4. Configure the bootloader to communicate with a PIC 33FJ128GP204 at 115200bps on the appropriate serial port for your system. See the image above.
  5. Press the reset button on the web platform. Next, click download on the bootloader software within 3.5seconds. Always follow this order or the bootloader may be damaged. The new firmware will be loaded into the PIC.
  6. The bootloader will automatically pass control to the main program when the upload completes.

If the client warns you that the bootloader will be overwritten, ALWAYS CANCEL. If the bootloader is overwritten you’ll need to program it into the chip again with a PIC programmer.

Export firmware for the bootloader

Update: ds30 Loader author Mikael Gustafsson let us know that exporting the firmware isn’t required. You can bootload the .HEX file created by MPLAB directly. This method also works.

To use firmware compiled in MPLAB with the bootloader, export it with the end address set to 0x153fe. The bootloader resides in the page starting at 0×15400, and the client will refuse to upload new firmware that overwrites the bootloader.

Network test and HTTP server

Our first firmware example is a simple network function test with an HTTP server. Over the next few weeks we’ll post shorter how-tos that demonstrate other features and uses for the web platform. This demonstration verifies that the network, EEPROM, and USB->serial connection are functioning correctly.

Microchip’s ‘free’ TCP/IP stack provides all the network functions we need to exist on an ethernet network and work with internet resources. The stack is open source and free-as-in-beer, but the Microchip license prohibits distribution. Due to licensing issues, we compiled firmware and our original source code in the project Google Code SVN. If you want to compile the firmware yourself,  you’ll need to download the Microchip TCPIP stack and follow the instructions in the source files.

A compiled version of the network function test is included in the project archive. Program it into the PIC via the bootload procedure described above.

DHCP and IP announce

The demo includes a Dynamic Host Configuration Protocol client that automatically configures the network settings using the DHCP server on your local network. The vast majority of networks and routers support DHCP.

When an IP address is acquired by DHCP, the web platform announces it in a broadcast packet to all computers on the local network. Microchip provides a small Windows utility called MCHPDetect that displays these packets, source code is available in the TCPIP stack download.

Ping

Ping the web platform at the IP address shown in the broadcast packet to check if the web platform is alive on your network. The dsPiC is really fast, it has sub-millisecond response times on our network.

UART echo


Any character received through the FTDI USB->serial connection is echoed back. Use a serial terminal to verify that the UART and FTDI232R function correctly. The USB LED should blink.

EEPROM-based web server

The demo includes Microchip’s HTTP web server with “out of the box” ability to read and control pins on the IO header from a web page. Web pages are uploaded with a web browser and stored in the EEPROM.


Open the server’s IP address with a web browser. If there’s no existing pages in the EEPROM, you’ll be redirected to the website upload page (http://192.168.1.129/mpfsupload, for example). Upload the demo website from the Microchip TCPIP stack (Microchip Solutions\TCPIP Demo APP\MPFSIMG2.bin). We’ve included our own, much simpler demo if the Microchip image isn’t available.

Navigate to /mpfsupload again at any time to upload a new website image.

After the image is uploaded, navigate to the base web address (http://192.168.1.129/) and view the demo page. You may need to control-refresh to clear your browser’s cache.

Microchip’s demo page is a super easy way to control outputs and read digital sensors from a web browser. The demo site uses AJAX to control LEDs and the I/O header pins. We mapped the LEDs to LD1, LD2 (IO1), and IO2-4 on the web platform I/O header. The buttons are mapped to I/O header pins 5-8.

Taking it further

Over the next few week’s we’ll release other firmware examples for the web platform, including more demos with the Microchip TCPIP stack such as an SD card-based web server, and custom demos like a port of the #twatch firmware. Feel free to request specific demos in the comments or the web platform forum.

Get one!


The web platform is available as a kit for $35, including worldwide shipping. For an extra $5 Seeed Studio will assemble it for you.

Thank you for your support! Your purchase of our open source hardware keeps the new projects rolling.

Resources

This entry was posted in Prototypes, web platforms and tagged , , .

Comments

  1. tayken says:

    Great work! :) Surely I’ll be ordering one, but first I have to decide if I can assemble it myself. I’m not experienced in SMD soldering but also I don’t want to miss the fun. What is the hardness level? :S

    Also why did you choose a dsPIC? I’m familiar with PIC24F-24H series and I’m using them now, but I would like to learn the advantages of using a dsPIC in my projects.

  2. Ian says:

    Hi tayken – The dsPICs are 2.5x faster (40MIPs), and have ‘real’ PC-like features like DMA (transfer between peripheral and memory without CPU intervention), hardware math functions for digital signal processing (hardware multiply and divide of 24 or 32 bits, I forget the exact specs).

    The down side is that the dsPIC only sinks/sources 4mA on the I/O pins, while most (some) 24FJs do 20mA.

    I’d say this is a ‘difficult’ board to solder, but 0805 is a nice size for passives and most of the chips are large SOIC. The TQFP PIC is basically a 4-sided SOIC chip, the pins are pretty big. The most difficult components are the SSOP FTDI chip and the SMD USB JACK (because the tab is slightly recessed). Be sure to have plenty of flux and solder wick handy. You could also practice on the Hackable Christmas card first ;)

    As a side note, working with Seeed is awesome! They’ve setup the order page with a +$5 assembled option, so if you decide against the kit they can assemble it for five bucks.

  3. Ben Combee says:

    Very cool… I just pre-ordered two of these in assembled form. I’ve been working a lot with Arduinos and Ethernet shields in my Webduino library, but the hardware costs of this board with its own processor are less than the cost of the shield alone for Arduino.

  4. J. Peterson says:

    Very cool. I used a similar design for the Puzzlemation “tray”. The Microchip stacks for both TCP/IP and FAT32 are really great; they make it easy to trade off features vs. ROM space so you can fit everything in.

    One annoying thing is the ENC28J60 runs rather hot and uses quite a bit of power; if it wasn’t for that you could run the design off of a couple of AA’s. Mine was on a daughter card so I could unplug it for battery powered demos in the field.

    I wonder if the ENC28J60′s power consumption is just a requirement for driving an Ethernet connection, or if it’s possible to find a lower-power Ethernet solution?

  5. tayken says:

    Wow, that was a quick reply! :)

    Well Ian, I decided that I shouldn’t miss the fun, so I’m buying a kit. Also I’m following your advice about practicing on on the Hackable Christmas card first :)

    So one reason for choosing a dsPIC is speed. Also DMA feature can be useful. Are you planning to write some tutorials or point me to written tutorials for using the features of the dsPIC? Do you have some other project ideas for this MCU?

  6. Ian says:

    @Tayken – I have a few demos planned for the next couple weeks. This week I’ll post a demo with Microchips FAT SD card server (serve web pages directly from SD cards), and I’ve got something holiday-themed.

    A major goal for this project is to find and improve a GPLd TCPIP stack. The Microchip stack is fantastic, but it’s not redistributable which significantly reduces the value as an educational tool. It would be nice to have a truly open source alternative.

  7. Mike Donovan says:

    Questions:

    Can the board run off of USB power, or is the 5V supply required?

    Does/could Seeed offer a suitable USB-to-power-plug cable (like the ones often included with USB DVD drives)?

    Ideas:

    Create a demo SNMP server which can send traps on I/O pin changes.

    Create a demo IRC/AIM/XMPP/SMTP client which can send messages on I/O pin changes.

    Create a demo using an 8-bit A/D chip connected to the 8 I/O pins.

    Create a demo using an I/O chip connected via I2C.

    Create a demo of how to access the I/O status via XML/Json/OSC/Flash.

    Port the Bus Pirate software to this board. :-D

  8. riza says:

    @Mike

    I think it is more likely to port #twatch firmware.

    @ian

    Is it possible to program this board as a simple NAS (using the sd card as storage)?

    • J. Peterson says:

      @riza

      You could do a simple NAS, but you’d have to use a simple protocol like FTP or a simple home-grown protocol. The Microchip stacks for TCP and FAT would make this pretty straightforward (they’re free [as in beer] and open source, but they’re copyright Microchip and not re-distributable in source form).

      You might be stuck with 8.3 filenames and a maximum of 2G of space; I don’t think the Microchip FAT stack supports FAT32

      Squeezing something like Samba into the chip would probably be a significant software challenge.

      • Ian says:

        I believe the MC FAT library supports FAT32. If not, the GPL’d DOSFS does support FAT32 (and it’s redistributable).

  9. Andrew says:

    Great stuff Ian.

    Just wanted to confirm – is a PIC programmer required to get the bootloader in, or does the PIC come from Seeed (/Microchip?) with the serial bootloader already programmed in?

    I don’t have (or particularly want) a PIC programmer, but I’ve been wanting an ethernet-talking thing with a few I/O pins :)

    Worst case I suppose I can use my bus pirate to get the bootloader in.

  10. Ian says:

    Here’s a new demo that uses an SD card with the web server:
    http://dangerousprototypes.com/2009/12/16/web-platform-sd-card-server-demo/

    @Andrew – The assembled boards will come programmed, I’m awaiting confirmation on the kits. The vast majority of web platforms have been ordered assembled, Seeed will probably do most assembled and keep a few aside to fill the kit orders.

  11. Ian says:

    Here’s another demo with a Twitter controlled Christmas tree. An implementation of the #twatch can’t be far behind!

    http://dangerousprototypes.com/2009/12/18/web-platform-twitter-controlled-christmas-tree/

  12. EllisGL says:

    Any plans for a wireless version?

  13. Picasso says:

    I would love to see this in a POE version please.

  14. fred says:

    An entire Christmas Display controlled via X10, but much more tacky – http://www.komar.org/cgi-bin/christmas_webcam

  15. Josh says:

    I would also love a PoE version of this – is it possible? or does the device draw too much power?

  16. Peter says:

    I hate sounding like an echo, but that’s the first thing I thought too: A poe version would be cool ;)

    • Lorenzo says:

      PoE would make this the perfect platform for wired home-automation.
      I’m assuming that the only impediment is some added cost… maybe $5 ?

      • Ian says:

        This board doesn’t have POE, but there are ‘y’ cables that expose the power from a POE system. You could use that to power the board.

  17. Lorenzo says:

    Yes, like the Linksys POES5. This doubles the size (and the cost) of the whole thing.

  18. George Smart says:

    I wonder if the hardware is capable of streaming MP3s from the internet? I understand that this would be an elaborate project. MP3 decoding could be handled either in the PIC or (more simply) subbed out to an VS1001k MPEG decoder chip. I was just wondering if the dsPIC would have enough space to get everything in? I am experienced with network programming, PIC 24, just not dsPICs. Have ordered one though. Cheers.

    • Ian says:

      I believe so. Microchip has a demo web radio using an MP3 chip and a ‘slow’ 8bit PIC chip, this PIC is much faster and 16bit.

  19. Val K says:

    Can this be programmed using the SDCC (Small Device C Compiler)? Is the code that you’ve used tied too closely to the Microchip compiler?

    • Ian says:

      I’m sorry, I’m not familiar with the SDCC compiler. If SDCC supports the PIC33fj128GP204 then the compiled firmware should work, but I don’t know if the Microchip TCPIP source will compile with SDCC.

      • sqkybeaver says:

        no sdcc would not work.
        SDCC is mostly for the 8051, and that is where it shines, i have been using it for a few years with the silabs chips. porting from hitec to sdcc is pretty tedious. not to mention sdcc is 8 bit.

  20. denkigai says:

    Just ordered a board from Seeed. I am wondering why the new design is not using the ENC424J600 for 10/100bT support? While a 10 Mbps interface is fast enough from a throughput point of view, there is something to be said for keeping slow devices off the network.

  21. Ivan says:

    Is this Arduino compatabile?

  22. Boris says:

    Dear Ian,

    I’d like to know what is the performance of the web server, how much time does it take to download for example a 1Mb zip, or jpeg, or something. If someone else knows the answer please let me know!

    Thank You!

  23. Zotty says:

    Just ran into this board and it looks like it offers everything I was looking for! Very nice. Not familiar with these modern PIC’s though, but that shouldn’t be a problem.

    As for a TCP/IP stack, did you ever look into using uIP (http://www.sics.se/~adam/uip/index.php/Main_Page)? It was written for 8-bit controllers, but has a BSD-style license and has been ported to various platforms, including NXP’s 32-bit LPC controllers. Maybe this will be useful in some way ;)

  24. Zotty says:

    Last part fell off… What I wanted to say was maybe uIP can be modified for 16-bit microchip as well if not done already

  25. Rslmanu says:

    Hi,
    I just received my web platform kit.
    After having soldered all the components, I wanted to write the bootloader but got this message “Downloading Programming Executive … FAILED”, even if the DsPIC was correctly recognized. I am using a pickit2.
    After looking at the microchip forum, I found this solution : change the “PE33: Y” line to “PE33: N” in the pickit2.ini file. Ok.
    It worked and I don’t have this message any more. But the writing always fails: I have another message: “Programming failed at program memory address 0×000080″.

    So if anyone has any idea of what might be wrong ….

  26. Rslmanu says:

    Ok,
    it was a bad connection on the pin of the dspic going to C31. Shame on me!

  27. Markus Gritsch says:

    Would it be possible to replace the dsPIC33FJ128GP204 by a dsPIC33FJ128GP804? It costs almost the same and has 16 kB of RAM (instead of 8kB), and a 16-bit DAC.

    • Ian says:

      I think that would work.

      • Markus Gritsch says:

        Thanks Ian. Since I am new to PIC programming I do not have a PIC programmer, so there remains the problem of getting the bootloader firmware into the dsPIC33FJ128GP804. Do you know if SeeedStudio does manufacture the web platform themself and could therefore use a dsPIC33FJ128GP804 (and program the bootloader) when asked nicely?

      • Ian says:

        I don’t think so, the assembled version has already been made. The bootloader would also have to be compiled for the different chip.

        A PICkit2 programmer is about $30 though, and a great way to get started with PIC microcontrollers.

      • Markus Gritsch says:

        Is it possible to debug the dsPIC33FJ128GP204 code with a PICkit 2?

      • Markus Gritsch says:

        I just want to confirm that debugging with PICkit 2 works perfectly. I bought a PICkit 2 for € 25 already three weeks ago, but it took until yesterday I received the Web Platform from Seeed. Very nice.

  28. Markus Gritsch says:

    The page says “We ported the open source ds30 Loader bootloader to the web platform…”. Did you have to change more than specifying the correct oszillator speed and selecting the UART used in the settings.inc file or was this enough?

    Diffing the version of ds30 included in web-platform.v0a.zip with the current release shows quite a few differences and the website for older ds30 releases seems to be broken, so I cannot compare myself.

  29. Dale Robertson says:

    What are people doing to mount these?
    there are no holes to put this thing on standoffs.
    was this designed to go into some standard enclosure with card guides or something similar?

    • Ian says:

      I use double-sided tape in an enclosure that I had available. Enclosures seem to be so random that I haven’t yet found a ‘standard’ to work with. I’m always open to suggestions though.

  30. Markus Gritsch says:

    Ian, could you please elaborate a bit on why you choose a crystal for the secondary oscillator, but spared one for the CPU, and used the internal FRC oscillator instead?

    As I am currently reading my way through the data sheet and the reference manual, I was surprised that the web platform uses a crystal osc for the real time clock, since the use case for this seems to be having the dsPIC33 in sleep mode and keep the RTC still ticking. Though I don’t think the sleep mode was the main motivation for adding this crystal.

    On the other hand, when not using the sleep mode, a clock could also have been implemented using the main oscillator if it would use a crystal instead of the FRC, with the additional benefit of having predictable/precise timings when interfacing with other hardware.

    Thank you in advance :)

    • Ian says:

      I didn’t actually place the 32.768khz crystal on the prototype (you can see it’s not in the pictures), I just added the footprint as a convenience for running the RTC. I just thumbed through section 24 of the datasheet, and as far as I can tell, the RTCC module only works with a 32.768khz sosc.

      You’re totally right though. Given the proximity of the pins, I could have put a footprint for a HS crystal in the same spot instead. I’ll file that away for future boards.

      • Markus Gritsch says:

        I see. I was looking at the schematics and also the assembled version from Seeed Studio seems to have one included. http://dangerousprototypes.com/2010/02/10/web-platform-pcb-in-red/

        Looking forward for a potentially web platform v2 [which may also use a dsPIC33FJ128GP804 with increased RAM size] :)

        I ordered the web platform not so much to use it as a web-server (for which the internal FRC is totally feasible), but more as a nice dsPIC33 development board, where a crystal osc would be very nice. Can’t wait for the chinese new-year-break to be over and finally get one from Seeed…

      • Markus Gritsch says:

        Unfortunately, PIC pin 30 (OSC1, RA2) is already connected to the Ethernet chip as ETH-INT.

      • Markus Gritsch says:

        What is the purpose of this ETH-INT connection? It is not specified in HardwareProfile.h, therefore I assume it is not used by the TCP/IP stack.

      • Ian says:

        The ETH-INT is the interrupt signal from the ENC28J60 to the PIC. The stack doesn’t use it.

      • Markus Gritsch says:

        Yes, I read about the ENC28J60 interrupt signal in its data sheet; wake-on-LAN and such things :) If its not used by the Web Platform, it would be possible to remove the connection and have the PIC pin 30 be connected to a quarz oscillator :)

  31. Markus Gritsch says:

    Another design question: Was there a special reason to connect pin 1 of the I/O1 connector to a non-PPS pin? IMO using PIC pin 35 (RA9) to drive LD1 is fine, but PIC pin 5 (RP25), which is currently unused, could have been used to have all eight connector pins connected to PPS pins. :)

    • Ian says:

      You’re right, that could have been a better connection. I hand-etched the initial prototypes for this design, so a lot of decisions were made to keep the board single-sided (with a few power jumpers) during prototyping. That heritage is reflected in the final design.

  32. Stephen K. says:

    I am looking for a platform to use for remote cameras and weather station equipment. Being new to PIC, etc., and wanting to learn more about it, will this work? I would like to be able to reach it thru my home ethernet, and this seems to fit that bill also.

  33. icejack says:

    Hye, i bought the assemble web server, bootloader is included :P nice , but when trying it i found the enc28j60 heating up a little bit, is it normal? am afraid to perform a 24h test without burning it

    • Ian says:

      The ENC28J60 can use up to 250mA of current, so it tends to dissipate a lot of heat. That said, it shouldn’t be too hot to touch.

  34. chris scanlon says:

    Are there already modules/kits available to expand the I/O to digital relays and inputs. I like the idea of web server with a reasonable amount of I/O to control all sorts of bits and pieces. The package looks really good. The real driver for me is I/O control of 240Vac lighting and power circuits but Web based.
    Any advice would be appreciated

  35. Andy says:

    Hi,
    I’m wondering where can I buy the UnAssembled version of the v1.1 web platform kit.
    I’m waiting for answers.. if anybody knows, or somebody from Dangerous Prototypes crew will see my message.
    Thanks a lot!

    • Ian says:

      Hi Andy,

      There’s none available from Seeed anymore. You could make the PCBs with our gerbers and use the mouser saved shopping cart to buy all the parts with a few clicks.

      • Andy says:

        Thanks for the answer.
        But probably in this case, I will buy it assembled from Seeed, other ways I wait too much for everything to be shipped plus probably the final price will be higher per one pice.
        Thanks again and have a nice day!

  36. Pawel says:

    Thumbs up for site format ready to send to ebook reader Not all articles are prone to that :D

  37. David Marriott says:

    Does this have bi-directional serial? I am looking for something to host a simple website with butttons to monitor the status of PICAXE inputs and control the PICAXE outputs…so it needs to read from the PICAXE as well as write to it….

    • Ian says:

      It has serial ports that can be assigned to the IO pins, but you would also need to write a firmware that handles the network side. There are some tutorials, but it’s not totally trivial.