Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Building the Ladybug LAN Controller (from design to final PCB)

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
The next kit I'd like to make will be the Ladybug LAN Controller. It's in the final design stages but since it's mostly on paper at the moment it can be changed at any time.
I'll post the schematic as it currently stands in the next day or two. The reason for this thread is to allow the community here at Electro Tech a chance to add their opinion and watch a project grow in to a final PCB. (I'll post everything but the PCB artwork)
Here's a description and a photo of a similar product, the kit version won't include a nice case like the one in the photo.

Ladybug description
  • ENC28J60 Ethernet controller
  • PIC18F4620 40pin DIP
  • LCD or Expansion connector 8 (RD0-7) +3 (RE0-2) +SPI+pwr
  • 4 pushbuttons
  • RS485 *may contain both DS275 or SN75176 sockets opinions?
  • 6 Relays (4 Normally open, 2 NC,NO)
  • 4 current limited 3-30VDC inputs, jumpers for contact closeure inputs
  • CLKOUT on ENC28J60 (it's programmable 25MHz/1,2,3,4,8) to 18F4620 CLKIN (or would it be better on a CCP or TMR1 input?)
  • LEDs (you want lots or the basics?)
  • Screw terminals
  • 8VAC/VDC to 18VAC/VDC power supply (just a 7805 and bridge)
All comments and feedback are appreciated.
The goal is a useful low cost controller, I'm not interested in adding more than 6 relays or 4 inputs to this design although keep in mind I've been tossing around an option to allow at build time the option of adding 1 Analog direct input to RAx for every relay omitted (hard wired jumper on the PCB)
Also things like a case would be of interest to me, DIN rail?
If you're looking for temperature control there is an RS485 thermostat in the works Cricket (very low power, I2C temperature, 16F917, 2 digit LCD glass, latching relay, switch mode power supply all to keep it very low power (read cool) so the temperature readings will be accurate)
**broken link removed**
No this picture is not the Ladybug but similar in concept...
 
Last edited:
Maybe add the option for Power Over Ethernet.
Is it going to be a 5V design for legacy compatibility or 3.3V to eliminate level conversion between the ENC28J60 and the PIC?
The option for adding external EEprom for larger Web pages would be good. I guess this could be done via the expansion connector.
 
I'll look in to how to add POE, I think it's just the unused pins go to the regulator, if it's too high voltage the 7805 is going to get toasty although I'll make sure there is space for a heat sink. Thanks kchriste.
Edit I did find this schematic, is that the idea? 48VDC would make the 7805 fry an egg.
**broken link removed**
Although it's from they same company that designed the flying voltage regulator...
**broken link removed**

Microchip make a 25xx1024 (128K) EEPROM that can be used instead, and you're right the expansion slot would allow for all sorts of upgrades. I was considering a SM type card but this thing is not meant to be a photo/music server :) and it would have increased the final cost too.
The PIC will be run at 5V so it's happy with the Inchworm ICD2, there will be a 74ACT125 as the level converter onboard.
Similar to this design.
 

Attachments

  • PIC18F4620-ENC28J60-1.5b.pdf
    333.9 KB · Views: 415
Last edited:
Edit I did find this schematic, is that the idea?
Yes...
Although it's from they same company that designed the flying voltage regulator.
HHmmmm Yes, best to double check it for sure. I guess you could put a diode in there for safety. Mind you, that regulator has really good airflow around it and won't burn the PCB when it's in thermal limiting. :D
Similar to this design.Attached Files
File Type: pdf PIC18F4620-ENC28J60-1.5b.pdf (333.9 KB, 0 views)
What is JP1 supposed to do? Is it a jumper or a connector? It also looks like S1 will reset the ENC28J60 but not the PIC. Was this intended?
Looks like a neat kit though!
 
Wow bill, your site is really taking off! Good job!

I would add lots of blinking LED's. This is absolutely true: People like blinky, lighty flashy things! You could use the LED's to indicate relay position, PIC busy, etc. You seem very creative (kudos to inchworm), so throw some LED's in there and make sure you have a couple different colors (except for UV, lol)!

NOTE: Your 7805 may exceed the maxium heat discharge rate of the heatsink. If so, add a peltier device on there, that should work very well. Find a nice small one, add a passive heatsink to it and mount a laptop fan on top of the whole jimmy. If that doesnt work, use the TO-3 package 7805 with a heatsink. Just my suggestion.
 
Last edited by a moderator:
The schematic was an old revision, here is version 2.0 from Jorge Amodio PIC10T design. The jumpers are gone in the 2.0 version.

Here is his version
http://www.ljcv.net/eip10/index.html

If I had to take a 48VDC power source I'd put a simple switcher in there and replace the 7805

LM2575 is my favorite but again the tried and true 7805 is pretty much user proof and can fly ;)

I did consider using a 5V wall adapter and skip the 7805 but this is probably not ideal for everyone and would make running it off a 12V battery not easy.

Yes I like LEDs too.
Lets see, 6 + 4 + 2 + 1 (rly, inp, net, pwr) should be plenty of blinking & flashing.
 

Attachments

  • pic10t-2.0.pdf
    256.2 KB · Views: 361
Last edited:
The actual IEEE 802.3af standard for PoE is quite involved in how a powered device needs to 'behave' in order for the PSE to provide it with power. You can't just hang a regulator on the unused pairs because a 802.3af compliant PSE will test the line to establish if there is a powered device on the end and not just a short (fault).

I beleive the PSE initialy applies a low voltage (10V<) and looks for a signature resistance of 25K, if it doesn't see this then it won't apply power. The PSU in the powered device also needs to turn on when the voltage is >35v and turn off when it is below this, ensuring it doesn't draw more than about 1.5mA in this state.

These figures may not be quite right as this is off my head but it's all detailed in the IEEE spec's
 
Last edited:
Ahh thanks geko, sometimes what appears simple... I thought it would be neat but anything higher than 15V is going to get that 7805 hot even with a heaksink.

Robot builder 101 the peltier would use more current and generate more heat than a large heatsink. They don't create cold, they pull heat away (and get really hot doing it usually requiring a cooling fan)

PS Pete I like your thermostat controller on your site, the LCARS look too.

The Ladybug & Cricket will be designed to be connected to each other much like an RSC thermostat
**broken link removed**
 
Last edited:
You could still provide power over the LAN cable using a mid-span injector like the one made by the company you linked to in an earlier post.

A few years back (before 802.3af) we had some SMC Wireless LAN access points and these came with a mid-span injector which was exactly like that. If I recall it just stuck 12V DC in to 4+5 & 7+8. It was only good for about 25metres. On a 100metre run it hadn't got enough juice left to run the AP and it actually said so in the spec':mad:

If you do make provison for it you just need to make it clear so as to avoid confusion with people who might assume that as it's powered over the LAN cable it can be connected to a 802.3af compliant PSE.
 
LOL! Put a stirling engine on the heatsink of the 7805 and let me know how that turns out! :)

Looking good

The fan on the heatsink of the peltier cooler should help alot, if you dont want a peltier, I would look around for a 9v wall-mart, and then put that 7805 on there. Worth a try.
 
Robot builder 101; thanks but Peltier coolers are extremely inefficient, expensive, bulky and are best suited for cooling CPUs and submarines. Can you name a single consumer product that uses them (aside from PCs)

geko; That's a nice regulator but I may simply make space for a 1N4001 diode on the PCB to the standard regulator to allow for a mid-span injector like you described.
 
Update, the Ladybug prototype works well. I've got to find a decent supplier of Pulse Ethernet jacks with magnetics (digikey is too expensive)
The schematic has been getting updated as is the prototype.

Changes:
  1. removed ENC28J60 hardware reset from 18F4620 (it's easy to do in software)
  2. I left the INT available (it's not used in the Microchip stack but is nice)
  3. main crystal on 18F4620 is now 9.8304MHz*
  4. EREVID program (you can see the revision with the ICD2 debugger)**
  5. The ULN2803 will probably be replaced by 2N2222A transistors***
  6. minor pin relocations
* 9830400MHz works great with a RTCC (Timer3 /65536 = 150 jiffys per second) and works great with the serial port 0% error on most baud rates, it also runs the PIC at 39.3MHz (just a hair under the 40MHz rating). Of course you don't have to use 9.8304MHz (it's a standard frequency though).
** You need to know the ENC28J60 revision before you solder in the RBIAS resistor.
*** I like the ULN2803, but I want the relays to be optional and PORTA0-5 can be used as a relay replacement (analog or digital inputs)
Other changes will be you can also replace the optos with wire jumpers to the terminal connector.

PS would you like the Ethernet LEDs in the jack or on the PCB?
Here's todays schematic in PDF format:)
 

Attachments

  • LadyBug _ LadyBug PRO ENC28J60 .pdf
    46.8 KB · Views: 436
It will be larger than the past kits, the relays and screw terminal will take some space. What did you have in mind with an 18pin DIP socket?
Here's a photo of an AVR version somewhat similar in design. I'm aiming for a Hammond 1591T size PCB.
**broken link removed**
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top