MIAC as cental heating programmer

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

MIAC as cental heating programmer

Post by echase »

Could I use a MIAC for a central heating programmer? This is for a church and whilst the MIAC has facilities way beyond what we need can it do the following:-

1) Provide 3-4 mains capable one/off outputs to drive the boilers and zone valves?
2) Have a RTC that is accurate and has automatic BST adjustments?
3) Have battery backing for the RTC?
4) Can have its on/off times for each channel easily set by the buttons. E.g. it will not be me that usually changes the settings, so it needs to be at least as easy to change as a normal commercial central heating programmer.
5) Have a password protected interface so need to enter password before changing these times.
6) Have override buttons to say easily set an output on for one to 3 hours with each press of the button. Maybe add more buttons for this to the case and wire them across some inputs.

I would use a few inputs to read temperature sensors to provide thermostat and froststat functions.

Can you get a standard cheap box to put a MIAC in that would hide the mains voltage on the terminals from fingers.

Is it crystal or RC controlled? Do you publish the circuit as I may want to alter the analogue inputs to make them more sensitive?

On http://www.matrixmultimedia.com/miac.php you show a heating contoller. Is the software for this available as it will be similar to what I want?

What was the editon of EPE in which it was featured?

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: MIAC as cental heating programmer

Post by Sean »

In answer to your questions:

1. The MIAC has 4 mains rated, normally-open, relay outputs (Q1, Q2, Q3, Q4). The ratings are 250V, 8A.
The terminals provide direct access to the relay contanct, which have no internal protection, so must be supplied from a suitably protected and fused source.
Any work involving mains or other hazardous voltages must be carried out in accordance with local regulations and inspected by a qualified electrician. Please check with the relevant authority if you are unsure.

2. The MIAC does not have an RTC, but there is an example program that uses an internal timer interrupt to generate an accurate real-time clock function in software. We are also developing some add-on modules, one of which contains an RTC.

3. The RTC in the add-on has a coin-cell battery backup option. The software RTC option would require the whole MIAC to be battery backed with a rechargeable, sealed lead acid battery (as used in most domestic alarm systems). An external charging circuit would be required.

4/5/6. The operator interface would depend on the program written for the MIAC. The keypad layout has been designed to help develop menu based interface programs using a typical cursor key arrangement and coloured function keys. The 16 x 4 character display allows a large amount of data to be fed back to the operator.

All the inputs have analogue reading capabilities (8- or 10-bit sampling option) over the range 0V to 12V. Each input includes a 10K load resistor to 0V.

We do not supply external enclosures for the MIAC. There are many domestic and industrial enclosures available from electrical suppliers that would be suitable. The MIAC case can be either DIN rail mounted or bolted to a panel.
A common way the MIAC is used is to fix it through a panel with a cut-out that matches the top section of the MIAC case. This prevents any access to the wiring or terminals, but does not affect the keypad, display, leds, usb connector or reset button.

Here is a link to an example:

http://www.matrixmultimedia.com/product ... PHPSESSID=

MIACs are now crystal controlled.

We have not published the full schematic of the MIAC. The block diagrams in the User Guide should provide enough information for most applications. Any additional signal conditioning should be carried out external to the MIAC.

The heating system programs are available from this thread of the forum:

http://www.matrixmultimedia.com/mmforum ... =26&t=7735

The article appeared in the February 2011 edition of Elektor.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Ben's heating controller looks ideal for me but I am concerned by the PIC ROM size as when I did my solar controller, whose overall software complexity was similar, the code size was around 9k which is well beyond the MIAC's size. Why did you select such a small memory as pin compatible larger memory PICs are usually available for little extra cost? No doubt my code is inefficiently large but without skills in C or assembler programming it is difficult to make it smaller.
Last edited by echase on Tue May 10, 2011 8:13 pm, edited 1 time in total.

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: MIAC as cental heating programmer

Post by Sean »

The microcontroller in the MIAC has 24K bytes of program memory (12K instructions). A small amount is reserved for the bootloader, but the remainder is available for the application program.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Ah sorry, I had been mislead by your MIAC datasheet and user guide which incorrectly say

PICmicro 18F4455, 12K
ROM, 2 K RAM @48MHz

And the Flowcode MMI shows a 16 pin 4455 when in fact the 4455 has 40 pins. This led me to believe it’s less capable than it in fact is. But I now assume you have you left off the pins that are not available to the MIAC’s I/O.

There is though a 4550 for only another 20pence that superficially appears to be the same apart from an increase to 32K ROM so why not use that?

I got my code size wrong, it is in fact 22K so only just fits the 4455. How big is Ben’s code as I can’t load it as it seems to need Flowcode 4 or at least some sort of upgrade of my Flowcode 3 Pro. Is there any chance of a version of his code that works on my Flowcode and the verion of Flowcode 3 packaged with the MIAC?

Moving to a hardware RTC would save some ROM space.

I'd be tempted to add a 4.8V NiCd battery between the 5V regulator and the PIC to provide backup of PIC and LCD but not the 12V I/O circuits, but this would invalidate the warrentee.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC as cental heating programmer

Post by Benj »

Hello,

The example program I posted is a fully functional central heating system control unit so yes it is fairly sizable.

I could probably generate a hex file for you to load into the device using the MIACprog tool but re-writing in v3 would take a lot of time which i'm afraid I do not have at the minute.

You could always load the file into the demo version of v4 and then see if you can convert the code over to v3 yourself.

The software based RTC does consume a timer but uses very little resources other then this. The timer is also used for switching zones on and off so it is not going to waste.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: MIAC as cental heating programmer

Post by Steve »

Or you could buy the upgrade to V4 and take advantage of the many improvements over V3. :)

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Might do that. Even better if I could buy a MAIC with v3 Pro to v4 Pro upgrade package at a good bundled price.

When is your RTC or data on it going to be available?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC as cental heating programmer

Post by Benj »

Hello,

The software RTC method is already in my MIAC underfloor heating control program. A hardware approach may possibly be available in Flowcode v5. Using a custom component should allow the a hardware RTC to be driven with C code. I may have a look into this at some point.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Could presumably read a standard RTC chip such as the DS 1702 but can the MIAC digital I/O lines run fast enough to emulate a I2C serial bus? I fear that 1 or 2 lines have to be bidirectional and presumably the MIAC can’t provide that. There are plenty of C code examples of RTC code on internet.

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: MIAC as cental heating programmer

Post by Steve »

The only external bus that is available to the MIAC is currently the CAN bus.

We are actually making a number of external add-on modules for the MIAC, and one of these will have an RTC capability. More information on this development will be released in the next month or two.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

I tried the demo version of v4 as you suggested, with Ben’s project. Just to check the code size I tried to compile to HEX. Lots of dots run across the compile screen but it does not compile. Is this a deliberate limitation in the demo version?

User avatar
Steve
Matrix Staff
Posts: 3422
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: MIAC as cental heating programmer

Post by Steve »

Yes - the demo is feature-limited which will affect the compilation process when disabled features are used.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

How fast are the I/Os on the MIAC? E.g. if I wanted to sample an analogue or digital signal very fast could I assume that the sampling speed could be the same as if I used a bare PIC? Or have you added signal conditioning circuits on the inputs that slow down the inputs a lot? I.e. if you have just added a resistor divider to change 12V to 5V on the inputs then that is fast. But any op amp, diode or capacitor on the inputs may slow them.

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: MIAC as cental heating programmer

Post by Sean »

There is a discussion of the MIAC input circuit in this thread:

http://www.matrixmultimedia.com/mmforum ... =28&t=8017

The inputs have been tested with a 12V, 10KHz square wave signal.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

I am going to look at this programmer again. In last year since the last post have there been any updates in:-

1) MIAC hardware
2) The underfloor programme beyond v1.1
3) Other people doing similar things
4) The RTC

I think one of my biggest concerns is that this needs to be usable by non techies. I looked at your standard underfloor user interface and it’s probably not simple enough for Jo Public to change on/off times, etc. like on a domestic CH programmer. But I can simplify it as we only need a couple of on offs each week for 2 zones and a one or two hour override function.

I’d want to add inside and outside temperature sensors to make a prediction of how far forward to bring the on time if it’s very cold inside or outside.

Are any of the add on expansion units available yet, especially the MI1493 or 3486? What are their costs?

I tried to add an expansion unit to a MIAC programme such as the underfloor system and got the error message "Failed to add component. You can only add this component to a MIAC SYSTEM”. Surely the underfloor controller is a MIAC SYSTEM? Or does the CAN component have to be set up to define the system? There do not appear to be many help files or tutorials on the more advanced bits of MIAC such as this.

As most RTCs like the Dallas DS1307 use an SPI or I2C interface can these be directly interfaced with your CAN connections on MIAC? E.g. http://www.futurlec.com/Mini_DS1307.shtml
I see the MIAC “processor” lists various interfaces like I2C Master as components. How are the physical connections for I2C made to the MIAC? Do I have to have a MI1493 or 3486 to do it?

Is the MIAC CE marked? Still think it’s incorrect quoting 12K ROM size on all your marketing info or is that the only space available once all the standard MIAC code is loaded?

Maybe I should have posted this under your underfloor programmer thread.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC as cental heating programmer

Post by Benj »

Hello,

Sorry for missing your message.

No updates to the MIAC or the RTC code though there are a few examples of similar things on the forums and in our articles section.

I have updated the heating program I'm using at my home just to remove a few bugs and tweaked a few settings really. I can share this later on today when I go home. No real UI changes but the end program is fairly straight forward to use when it's on the MIAC. I think I may just write a little user manual when I move house on how to use and how to replace any parts that may wear out such as the pump. (MIAC been installed as my underfloor controller nearly 2 years now with DC valves and mains switching on and off multiple times every day, no problems at all to report).

Add-on expansion's are being manufactured and nearly ready, hopefully release them around June/July time.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

echase wrote:
I tried to add an expansion unit to a MIAC programme such as the underfloor system and got the error message "Failed to add component. You can only add this component to a MIAC SYSTEM”. Surely the underfloor controller is a MIAC SYSTEM? Or does the CAN component have to be set up to define the system?

I see the MIAC “processor” lists various interfaces like I2C Master as components. How are the physical connections for I2C made to the MIAC? Do I have to have a MI1493 or 3486 to do it?
Thanks for the answers. Can you also answer above?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC as cental heating programmer

Post by Benj »

Hello,

For the MIAC add-ons to work I think you must select the MIAC System as your target in the project options rather then just the MIAC.

The MIAC System target is included with release update v5.2 which is hopefully on the way in the next few days.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Benj wrote: Add-on expansion's are being manufactured and nearly ready, hopefully release them around June/July time.
Any update on this? I need something that will get a RTC connected

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC as cental heating programmer

Post by Benj »

Hello,

Yes I think we are still well on target for the start of July release of these MIAC add-on products.

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Benj wrote:Hello,

For the MIAC add-ons to work I think you must select the MIAC System as your target in the project options rather then just the MIAC.

The MIAC System target is included with release update v5.2 which is hopefully on the way in the next few days.
I have set up a simple RTC using the Flowcode Advanced Add on Module component.

1) Is the RTC chip actually in this module or do I have to buy an external DS1307 type RTC and connect it to the I2C port on the Module.

2) How do I find out what the commands such as RTC_Read_time do as not in Help file. For instance is the data returned as byte or integer and how to convert to hr:min:sec?

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: MIAC as cental heating programmer

Post by medelec35 »

Hi echase,
I can answer those questions
The MIAC Advanced Expansion does have RTC, DAC PWM, ADC etc all built in.
To retrieve the time you would use a separate byte for hours, minutes and seconds.
Then in the expression window of the component you have a value of 0 to retrieve hours (24HR format).
1 to retrieve minutes & 2 to retrieve seconds.
Similar with the date:
0 to retrieve day (1 to 31). 1 to retrieve month and 2 to retrieve year.

For example: To retrieve the time in hours, you could place a byte called hours in the Return Value window
and type 0 in expression window.

There will be demo files available demonstration functions of MIAC expansion modules (I would guess when the modules go on sale)?
Including RTC functions. E.g setting and retrieving time and date.

Hope that helps


Martin
Martin

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Tried to add the RTC module to Ben’s underfloor programmer. Some problems:

1) Does RTC increment time under simulation? Mine does not.

2) What is format of years? Years in bytes since 1990?

3) In the “Variables” box under simulation only shows about 30 variables and not the ones I really want like minutes and seconds. How to get it to display these?

4) Mousing over the MIAC LCD window (without clicking) under simulation can cause the numbers to change. Why?

echase
Posts: 429
Joined: Mon Jun 11, 2007 11:55 am
Has thanked: 49 times
Contact:

Re: MIAC as cental heating programmer

Post by echase »

Apologies for last post, I later found the MIAC Add-on Help file and it answered some of previous queries.

It says the component does not simulate. That seems to include even loading the RTC with a time and reading it straight back again; it always reads as 00:00:00.

Leaves though some queries:-

1) What is format of years? Years in bytes since 1990?

2) Mousing over the MIAC LCD window (without clicking) under simulation can cause the LCD numbers to change. Why?

3) Please can you explain the purpose of the full stop and MOD (looks like “do this till counted up to this number”) in the following syntax from Ben’s underfloor programme?

mode = (mode + 1) MOD 3

mins = Min_Match.minute

Min_Match.Return = 1

print_time.hide = 4

4) If I want this expression to be true
IF C<A or B
if byte C is less than byte A or byte B do I use OR or || ?

5) When complied I get 37 errors like
MIAC_v1.0.c(516): Illegal redefinition of symbol: CAN_CHIPSEL
MIAC_v1.0.c(544): Illegal redefinition of symbol: TXB1DB7_VAL

Looks like some CAN function is not initializing even though I did use the CAN Init function but none of the CAN send/TX/Rx ones.

Post Reply