Pretty closely to CAN2.0A.
Those four fields are used the same way. Velbus packs it’s ID and priority bits onto the same 11-bit identifier. Smaller 8-bit Velbus address appears shifted but is completely compatible.
You do need to do the proper CAN CRC (hardware controllers will do this for you and you effectively never see the CRC at all). And your DO need to do the ACK when receiving (a hardware controller will do this for you also).
Watch out for bit rate timing… if you are too far off then you may just occasionally drop bits only when you have several successive 1s or 0s which can make it hard to see what is going on.
I have managed to get several CANBUS controllers talking to Velbus fairly easily :-
- cheap MCP2515 SPI-bus modules
- ESP32 WROOM, DEVkit4, S2, and S3.
- STM32 F103 and F072 (the F072 can even do USB device at the same time)
- A custom pure-software implementation on 8-bit Arduinos. (Not complete but working OK).
The MCP2515 boards with an Arduino are a very easy way to start and get your head around everything. Try starting with listen-only attached to a working velbus test-rig with eg. just a pushbutton and a relay or dimmer.
I had a little bit of trouble with common ESP32 WROOM modules because they only just support the low baud rate but folks on here helped me out. The S2 and S3 versions were fine though.
My software version on Arduino does not passive sync on bit/frame starts when it is not sending or receiving on a busy bus. ie. it starts its bit timing arbitrarily when you TX rather than syncing with whatever arbitration frames are starting at the same time. I think that is just an inevitable software limitation that older Velbus nodes probably have too. It should not matter unless the bus is very busy in which case the only consequence is that a higher priority transmit cannot so easily override a lower priority one starting at the same time. You can still mostly detect busy-collisions and back down though.
As mentioned above, Velbus receivers DO use the ACK field so if your receiver is the only device on the bus and you do not send an ACK the Velbus transmitter will retry some dozens of times. Just watch out for that one if you try to run your receiver in listen-only mode and there are no other receiving devices to send the ACK.
Other than that it’s just a matter of adjusting the bit timing a little since 16K6 is not a standard CAN bit rate. Datasheets for the various controllers will have info on this but they all seem to be pretty similar. Most software libraries use tables for this so you can just add another entry to the table.
There is lots of CAN info on the net but the original Bosch Protocol Standard is a very clear and useful reference and is readily available from NXP(ex Freescale), just google for BCANPSV2.PDF. That doc fairly easy to read side-by-side with a datasheet for your choice of controller.
You can not only transmit and receive Velbus but of course once on the bus it is also very easy to use the connection between your own nodes to send your own custom data that velbus will ignore… so I can use the Velbus cable to send my own data all over my house
What I have NOT tried to do (but user matthijsfh on here has done, with STM32) is to emulate an existing Velbus device. So my attempts are not recognised and programmed by VelbusLink, I just set them up hardcoded in my firmware.