Hello, today i wanted share some detailed overview of modules, how they built and more importantly how they communicate with main controller, it's significant as standarized communication interface is something which make possible to easily extend capabilities through adding new module, so I put some thoughts behind design of modules interface.
So on controller there are 3 modules ports:
- Port red
- Port green
- Port blue
Each port consist of 3 pins:
- COMMON: configurable 3,3V input or output (additionally as 1-wire in case of port red)
- 12V supply(currently always on, but in future I plan to add "power drive" feature)
For driving Sensor modules following configuration of port will be used:
Com pin direction set to input, when sensor is not detecting anything it should give 3,3V after signal is detected it should pull COM pin to GND potential.
Supply for sensor is provided by two remaining ping - 12V and GND.
For driving Action modules
Com port set to output, when "action" is to be triggered, com port will go to High state out-putting 3.3V, but also reversed logic could be used here with no problems as default state can be configured as "HIGH" state.
For driving Motorised modules:
Currently I've implemented 1-wire communication(Over uart, so port red have additionally uart to 1-wire interface circuit) for bi-directional communication over single pin with motorised modules, thought behind it was that 1-wire interface can serve multiple slaves, so using one port there will be be possible to communicate with multiple nodes, this could be useful for example for some multi axis sliders, but now I come to conclusions that maybe i over-killed it a bit and think about changing this approach to "servo-like" interface, so first I want to try driving motorised module using soft-pwm this will not have possibility of driving mutliple nodes with one port, but then not only port red will be capable to drive motorised module, but each of port, so still it should be fine, anyway I will keep uart/1-wire interface circuit on port red, as this can be useful in future, and interface circuit in quite simple.
Ports function are configurable from app, function refer to COMMON pin function:
(just note that "Com" is communication function of port, it's different thing from "Common" port)
Reasoning behind naming port's with color's was that it's easy to distinguish quickly in program editor which port is being used.
So what's under the hood of currently implemented module