| Electronics > Projects, Designs, and Technical Stuff |
| General ESP32 and CAN based circuit for Escape Rooms |
| (1/1) |
| dayfall:
Background: One project I had recently was to build a timer for an escape room. It needed a controller for the operators and a display box for the players. It also needed to hookup to the "win condition" relay and to play sounds for either a loss or win condition. Both the controller and display would keep up with the time remaining and would report it to the other device over RS232. That way the operators would know what was on the remote display. Also, this had an added benefit that if either device had a temporary failure, it would re-sync after rebooting. My next project required three devices to be connected to the same communication bus. I decided to go with RS485 this time. I kept much of the same program libraries I had made and basically designed the same devices again. I now have a need to connect many more devices together and I want to have PCBs made to make the whole system more robust. I also need to create a standardized (to me) system so that everything is easier to debug or replace. The Project: A first consideration is which communication protocol to use. RS485 is simple enough, but it is difficult to have multiple masters. Previously I have simply ignored collisions. Status was continuously sent multiple times a second. Not pretty but it worked. RS485 can be added to any micro with a few parts. CAN is also attractive, but it is a bit more difficult to add to smaller micros. My plan therefore is to use both. I plan on having somthing like the "ROBot Independent Network" http://www.bdmicro.com/code/robin/ for the RS485 channel. I might add a sense line to detect if another master is using the bus. I will use an ESP32 because it has a built in CAN controller. The other consideration is power. I have been using 12V over a 4 conductor cable, however I feel that a higher voltage is needed. That way I can step down to a regulated 12V or a high current 5V. I figure 19V to 24V is easiest. That allows me to use laptop power supplies and is within the voltage range of my buck converters. I also want a way of connecting the modules that is foolproof. RJ45 seems to be robust enough, cheap, and has enough connectors. I might go with something similar to Power Over Ethernet. Mode B I believe. That is, one pair is positive and another pair is ground. This should make it safe if an Ethernet device was plunged into my network. To start things off, I have designed a PC to CAN/RS485 bridge. I am not an EE nor do I have much experience with PCB design tools. (KiCAD is great so far) One specific question I have, is it ok for me to have the diodes and capacitors driven directly from the TXD and RXD lines. I did that to keep the jack's LEDs on longer. But, do I need another set of buffers or will the micro have no trouble driving both the capacitors and the CAN driver. |
| Navigation |
| Message Index |