Using custom hardware?

Post Reply
kneelo
Posts: 5
Joined: 19 Feb 2017, 13:39
Location: Western Australia

Using custom hardware?

Post by kneelo »

I'm looking at using HAPCAN for a new house but it doesn't currently have all the hardware I would like. If I build my own node hardware will the programmer recognize it and let me program the nodes? Not having the source code for the programmer worries me a little...

I'm also curious if there is a plan for incorporating new data in the future... particularly power monitoring data.

The hardware I'm looking at making is a relay driver for external relays, a power monitor using current transformers and maybe a DMX controller module to interface with DMX lighting.
Bartek
Posts: 326
Joined: 14 Jul 2011, 19:36
Location: Wrocław
Contact:

Re: Using custom hardware?

Post by Bartek »

It depends how You build custom node. If You use Hapcan's UNIV 3 processor with HAPCAN bootloader it would be recognized by Hapcan programmer. You will be able to use all bootloader commands, change node number, group, module name, but programmer won't display node Control and configure window, becasue it is a custom hardware, so You have to configure it by Yourself (editing processor memory for example).

You may also want to check project Hapcanuino I have started two months ago. Basically it is a library that make Arduino boards compatible with Hapcan. One of the next milestone is to create configurable Hapcan programmer "2" software, that will allow to configure custom hardware in a simple way.
Jacek
Posts: 560
Joined: 17 Feb 2007, 18:00

Re: Using custom hardware?

Post by Jacek »

The programmer has been developed for over 10 years and its code is unbelievable messy. This is the only reason why it is not published. One day it will be recoded probably to C# and published.

I'm planing to create one of the modules you mentioned - relay driver. There is a very first schematic for that.
Untitled.png
There is no DMX driver, but you may be interested in DALI created by Jon (https://github.com/skagmo/hapcan-contri ... li-gateway)
Regards
Jacek
kneelo
Posts: 5
Joined: 19 Feb 2017, 13:39
Location: Western Australia

Re: Using custom hardware?

Post by kneelo »

Thanks... I had missed the arduino library but seeing development of that definitely make HAPCAN more attractive.

I wasn't going to worry about isolation of the relay output but seeing your solution using i2c you have me thinking I probably should. What i2c i/o chip are you using?
Jacek
Posts: 560
Joined: 17 Feb 2007, 18:00

Re: Using custom hardware?

Post by Jacek »

There is MCP23017 on schematic. I might also use the cheaper option of isolation with optocouplers.
Regards
Jacek
kneelo
Posts: 5
Joined: 19 Feb 2017, 13:39
Location: Western Australia

Re: Using custom hardware?

Post by kneelo »

Update on my progress on this.

I have built some switch hardware to suit the 3.1.3.x firmware using illuminated push button switches. It consists of one board with all the smarts that plugs into another board that has the switches soldered into it. Theres one switch board design for 1, 2 or 3 buttons and one for 4, 5 or 6 as I couldn't make it work all on one board. I 3D printed a test face plate but thinking the final product will be 12mm stainless plate.
IMG_20190611_194034.jpg
IMG_20190611_194050.jpg
IMG_20190611_194017.jpg
Currently part way through designing hardware for an energy monitor that has 5 current transformer channels and one voltage channel. It's loosely based on the open energy monitor hardware using YHDC SCT-013-00 plug in current transformers. I have no experience programming in assembly so programming will be a leaning curve.

Also part way through new hardware that incorporates the power module and termination function with a canbus repeater to allow more flexibility in network topology. It is based on the AMIS 42770 chip.

I'm hoping to get the PCB's fabbed in the next couple of weeks.
Alexvrs
Posts: 1
Joined: 03 Jun 2019, 22:57

Re: Using custom hardware?

Post by Alexvrs »

Jacek wrote:The programmer has been developed for over 10 years and its code is unbelievable messy. This is the only reason why it is not published. One day it will be recoded probably to C# and published.

Image

I'm planing to create one of the modules you mentioned - relay driver. There is a very first schematic for that.

Cześć Jacek, chciałem zapytać, obecny moduł UNIV 3.9.0.x wykorzystuje 10 wyjść z otwartymi kolektorami, 14 wyjść jest używanych w obwodzie w tym poście, czy można użyć wszystkich tych wyjść?

Czy jest do tego jakieś oprogramowanie wewnętrzne, czy będę musiał zmienić kod w asemblerze?

Jeśli tak, to jak można to dodać do programu do programowania modułów?

W EAGEL opracowałem PSB z obwodem 10-wyjściowym; w razie potrzeby jest on dołączony do tego komunikatu.

Dziękuję
Hardware_UNIV_3.9.1.x.zip
(63.71 KiB) Downloaded 329 times
Jacek
Posts: 560
Joined: 17 Feb 2007, 18:00

Re: Using custom hardware?

Post by Jacek »

Obecny moduł wykorzystuje 10 wyjść. Niestety jak zmieniasz hardware, to trzeba pod to zmienić oprogramowanie firmware (to w assemblerze). HAPCAN Programator nie obsłuży takiego urządzenia. Umożliwi ewentualnie jego programowanie poprzez zarządzanie jego pamięcią jak na rysunku poniżej.
Untitled.png
oraz sterowanie z okna monitora:
Untitled.png
Regards
Jacek
BuGless
Posts: 10
Joined: 27 Feb 2018, 11:28

Re: Using custom hardware?

Post by BuGless »

Jacek wrote: 19 Feb 2017, 18:28 The programmer has been developed for over 10 years and its code is unbelievable messy. This is the only reason why it is not published. One day it will be recoded probably to C# and published.
I've worked on a custom independent programmer for a while (working title for lack of a better term: hapcanmonitor). It now is working.
I'm opensourcing it, at the moment working out details on how.

The architecture basically is like this:
a. REST-based API (using JSON/HTML), which allows:
- Sending all hapcan commands.
- Querying status on all devices.
- Acting on events.
- Flashing devices.
- Random reading/writing memory.
b. The REST-based API is implemented in the SPike webserver. The architecture uses multithreading and promises.
c. The SPike webserver is written in Pike (http://pike.roxen.com).
d. Pike is written in C and runs on Linux, UNIX, Windows and MacOS.

It's running my house, as we speak.

P.S. I understand why the original programmer code is convoluted. Without using promises it would have been insanely complicated to get it right.
Post Reply