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.

Revised PIC project Ladybug Pro Comments?

Status
Not open for further replies.
This is the new Ladybug Pro controller. It's not a finished schematic but 98% complete. I'm looking for comments and errors in the design.

It was designed primarily as a HVAC master controller similar to the base unit on the RCS thermostats. **broken link removed**

The main unit(s) (temperature sender) would be any version of the Cricket thermostat using RS485 would also allow for easy zoning.

It could also do things similar to a baby JDS Stargate, ELK Magic or Ocelot. IMHO.

The Ladybug Pro has:
  • Real time clock with supercap backup
  • 256K EEPROM
  • RS232 via PIC USART
  • RS485 via external UART
  • Eight Relays; six have clamping diodes (I may add four more for the NC/NO relays)
  • iButton / 1-wire support
  • 1 analogue or digital input
  • 3 digital inputs
  • support for ICD2 / ICP (Might make a nice development board)
  • 16F876A or 18F2525 CPU
Feedback always welcome.
 

Attachments

  • Ladybug Pro Beta.png
    Ladybug Pro Beta.png
    76.3 KB · Views: 401
Could you describe the intended function please? It seems you use another device or controller to display data on an LCD and to perhaps setup or edit the 'zone' temperature set points.

Does this unit monitor up to eight 'zone' temperature sensors and simply drive relays at the correct setpoints?
 
why use the ds1305 if you aren't using int0 or int1? the ds1302 is smaller (cheaper?) though it has less nvram.
 
Mike said:
Could you describe the intended function please? It seems you use another device or controller to display data on an LCD and to perhaps setup or edit the 'zone' temperature set points.

Does this unit monitor up to eight 'zone' temperature sensors and simply drive relays at the correct setpoints?
Its intended function was to connect to a multistage Heater / Air Conditioner. RS485 sensors (like the Cricket or the unreleased very simple Moth).
**broken link removed**

Although it has only eight relays more (a typical single stage HVAC will use three Heat/Cool/Fan) you can use the remaining relays to control dampers. As an added bonus the new Cricket pro supports a single relay (more can be added with the EXP connector) You could control heated floors or vents with the single local relay. A high-end Aprilaire 8870 for example has 6 relays and an RS422 port. **broken link removed**

Ideally, one or more Ladybugs can control many (32 or more) Crickets at a distance up to 4000' or other RS485 devices; while the RS232 port be controlled by a small HA server or Ethernet to RS232 bridge.

Of course you can program it to be much more (or less) than that.

With the right software (I'd like to keep it as open as possible) you could easily emulate something similar to an ELK Magic MM443 **broken link removed**

How about an ADI Ocelot
http://www.appdig.com/adicon_new/ocelot.htm

Or link it up to a small linux box (I use this for my web server/router etc..)
http://www.clarkconnect.com/
and make a really-really powerful version of a JDS Stargate-IP
http://www.jdstechnologies.com/


It can also act as a RS485 to RS232 bridge. Or 1-Wire bridge (1-wire stuff is amazing) Or even just a simple relay board.

As a bonus the Cricket (Thermostat) & Ladybug (Controller / Relays) are ICD2 (Inchworm) ready.
I'm working on PCB layouts for a 16F876A Inchworm, Cricket & Ladybug.
 

Attachments

  • 30952side2big.jpg
    30952side2big.jpg
    98.8 KB · Views: 4,134
Last edited:
Mike said:
Bill,

Thanks for taking time for a much better description. It looks like a very nice design.

Mike
Thanks Mike, I've been debating if I should add a connector so you could omit the MAX3110 UART and add a PIC ENC28J60 Ethernet instead. Might make for a pretty neat development board.

I've also been tossing the idea around of using TIMER1 and a 32KHz crystal for the RTC functions instead of the DS1305.
It means using a 40pin 16F877A or 18Fxxxx as I could use the extra I/O. It would also mean enough I/O for an couple of extra features...
 

Attachments

  • ENC28J60 SPI.png
    ENC28J60 SPI.png
    7.3 KB · Views: 263
Last edited:
William At MyBlueRoom said:
What sort of problem? As far as I can tell it's very similar to the ELK-MM443 A/D input (although the ELK has 4 A/D inputs). The ELK uses a PIC16C76 CPU @ 4MHz
https://groups.google.com/group/...

Well on the "pulldown" setting, it'll divide the 15V into 5V nicely and default to 0V, but in the "pullup" setting, you'll end up with an input voltage range of -10V to 5V, and any logic level signals you dump into there are going to be mapped into the 3V to 5V region which won't be read properly unless you use the ADC which isn't exactly clean.

I'd probably put a 10K or so resistor between J1 and the connection to VCC so that it doesn't act like a voltage divider in "pullup" mode
 
William At MyBlueRoom said:
I've also been tossing the idea around of using TIMER1 and a 32KHz crystal for the RTC functions instead of the DS1305.
It means using a 40pin 16F877A or 18Fxxxx as I could use the extra I/O. It would also mean enough I/O for an couple of extra features...
You probably don't need to go to a 40 pin chip. Here's a couple "frugal" suggestions to reduce your current pin count requirements (grin);

(1) Replace your 8 pin ULN2803 with one or more 3-pin serial-to-parallel 8 bit MIC5841 relay driver chips. They include snubbing diodes just like the '2803 and that 3 pin interface provides cascadable 8, 16, 24, or more relay outputs (using 1, 2, 3, or more chips, respectively). OR Use Coto 9001 series relays in a small 4 pin SIP package (0.76"L x 0.2"W) with 5v/10ma coils, or something similar, and you can use really cheap 3 pin 74HC595 chips for drivers.

(2) Consider using a "standard" 20-MHz crystal for the RTC and implement a pseudo oscillator trimmer capacitor in your RTC ISR for accuracy to within approximately 200 nsecs per second or 6.3 seconds per year, not including temperature drift or crystal aging. This software "oscillator trimmer" function uses 8 words of memory in your ISR.

Regards, Mike
 
I'll look again at the MIC5841.

I want at least a short amout of "battery" backup on the RTC. I was thinking of using the transistor / LED in the original Ladybug on my site.

The cost of the 16F877A version, sans DS1305 & MIC5841 (the ULN2803 is so cheap) makes it hard to keep the 16F876A version if I want to add an expansion connector. I hate to use glue logic if I can avoid it, I'd rather use a bigger PIC... Hmmm maybe a dual USART PIC? with SPI....
 
An RTC with battery backup is a valid point.

Why do you need multiple UARTs? Isn't the noise resistant long distance RS-485 interface with a 'master' / 'slave' protocol pretty expandable? RJ14 or RJ45 modular connectors with "power" and RS-485 signals provides a relatively simple mechanism for connecting 'slave' boards.

Speaking of multiple serial connections... I was thinking about using something like the drawing below for managed multiple short distance TTL level serial I/O. The 'master' manages port selection and serial traffic so that only one 'slave' is ever answering a message initiated by the 'master'. The TX line on the slaves would probably need a 2N7000 open-drain driver with a single 2N7000 on the 'master' PIC RX line. As I mentioned before, using RJ14/RJ45 connectors would allow the 'slaves' to be powered from the 'master' controller.

Mike
 

Attachments

  • RS232 - slot addressed.JPG
    RS232 - slot addressed.JPG
    58.1 KB · Views: 414
Last edited:
Speaking of 'glue' logic. Don't discount those Coto relays as you can drive them directly from a PIC port or an inexpensive 74HC595. Not to mention they use very little board space.

Remember too that you have a very powerful RS485 interface. Why not use it to advantage to offload some functions. The little relay controller below could easily be connected to an 8 pin RS485 chip.

Mike
 

Attachments

  • Serial Relay Controller.jpg
    Serial Relay Controller.jpg
    90.5 KB · Views: 465
As usual Mike your designs are compelling. I have a come up with a design that might just do the trick.
I've moved the RS485 to the internal USART.
I've removed the DS1305 from the design. (If you need a battery backed up clock a DS1904 iButton can be hooked up to the 1-wire port, OR you can use a Cricket Pro with clock EXPansion, OR Ethernet, OR Serial etc...)
And the MAX3110E is an option so you can choose between RS232 or Ethernet using a ENC28J60. Here's an example with schematic of the ENC28J60 (It has 5v tolerent I/O too)
https://www.olimex.com/dev/enc28j60-h.html
 

Attachments

  • Ladybug EXP.png
    Ladybug EXP.png
    14.3 KB · Views: 541
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top