Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@
*.lai
*.la
*.a
.git
.pioenvs
.piolibdeps
.pio
.clang_complete
.gcc-flags.json
.DS_Store
Binary file added .pio/build/leonardo/.sconsign38.dblite
Binary file not shown.
Binary file added .pio/build/leonardo/firmware.elf
Binary file not shown.
798 changes: 798 additions & 0 deletions .pio/build/leonardo/firmware.hex

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .pio/build/leonardo/idedata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"env_name": "leonardo", "libsource_dirs": ["/Users/andrey/Documents/Arduino/DMXReceiver/lib", "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/libdeps/leonardo", "/Users/andrey/.platformio/lib", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries"], "defines": ["PLATFORMIO=50202", "ARDUINO_AVR_LEONARDO", "F_CPU=16000000L", "ARDUINO_ARCH_AVR", "ARDUINO=10808", "USB_VID=0x2341", "USB_PID=0x8036", "USB_PRODUCT=\"Arduino Leonardo\"", "USB_MANUFACTURER=\"Arduino\"", "__AVR_ATmega32U4__"], "includes": {"build": ["/Users/andrey/Documents/Arduino/DMXReceiver/include", "/Users/andrey/Documents/Arduino/DMXReceiver/dmx_receiver_mos_relay_public", "/Users/andrey/Documents/Arduino/DMXReceiver/dmx_receiver_mos_relay_public", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src", "/Users/andrey/Documents/Arduino/DMXReceiver/lib/utils", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/Wire/src", "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/libdeps/leonardo/CmdArduino", "/Users/andrey/.platformio/packages/framework-arduino-avr/cores/arduino", "/Users/andrey/.platformio/packages/framework-arduino-avr/variants/leonardo"], "compatlib": ["/Users/andrey/Documents/Arduino/DMXReceiver/lib/utils", "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/libdeps/leonardo/CmdArduino", "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/libdeps/leonardo/CmdArduino", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/Wire/src", "/Users/andrey/.platformio/lib/Adafruit BusIO", "/Users/andrey/.platformio/lib/Adafruit GFX Library", "/Users/andrey/.platformio/lib/Adafruit ILI9341", "/Users/andrey/.platformio/lib/Adafruit STMPE610", "/Users/andrey/.platformio/lib/Adafruit TouchScreen", "/Users/andrey/.platformio/lib/ArduinoOTA_ID6178/src", "/Users/andrey/.platformio/lib/GUIslice/src", "/Users/andrey/.platformio/lib/ILI9341_t3", "/Users/andrey/.platformio/lib/ILI9341_t3_ID540", "/Users/andrey/.platformio/lib/XPT2046_Touchscreen", "/Users/andrey/.platformio/lib/XPT2046_Touchscreen_ID542", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/HID/src", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/SPI/src", "/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src"], "toolchain": ["/Users/andrey/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include", "/Users/andrey/.platformio/packages/toolchain-atmelavr/lib/gcc/avr/7.3.0/include-fixed", "/Users/andrey/.platformio/packages/toolchain-atmelavr/avr/include"], "unity": ["/Users/andrey/.platformio/packages/tool-unity"]}, "cc_path": "/Users/andrey/.platformio/packages/toolchain-atmelavr/bin/avr-gcc", "cxx_path": "/Users/andrey/.platformio/packages/toolchain-atmelavr/bin/avr-g++", "gdb_path": "/Users/andrey/.platformio/packages/toolchain-atmelavr/bin/avr-gdb", "prog_path": "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/build/leonardo/firmware.elf", "svd_path": null, "compiler_type": "gcc", "targets": [{"name": "size", "title": "Program Size", "description": "Calculate program size", "group": "Platform"}, {"name": "upload", "title": "Upload", "description": null, "group": "Platform"}, {"name": "uploadeep", "title": "Upload EEPROM", "description": null, "group": "Platform"}, {"name": "fuses", "title": "Set Fuses", "description": null, "group": "Platform"}, {"name": "bootloader", "title": "Burn Bootloader", "description": null, "group": "Platform"}, {"name": "compiledb", "title": "Compilation Database", "description": "Generate compilation database `compile_commands.json`", "group": "Advanced"}, {"name": "clean", "title": "Clean", "group": "General"}, {"name": "cleanall", "title": "Clean All", "group": "General", "description": "Clean a build environment and installed library dependencies"}], "extra": {"flash_images": []}, "cc_flags": "-std=gnu11 -fno-fat-lto-objects -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega32u4", "cxx_flags": "-fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega32u4"}
1 change: 1 addition & 0 deletions .pio/build/project.checksum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ec2a8e409fdc9562855d596d20e824c36c5e6517
1 change: 1 addition & 0 deletions .pio/libdeps/leonardo/CmdArduino
Submodule CmdArduino added at 0c0258
88 changes: 88 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
//
// !!! WARNING !!! AUTO-GENERATED FILE!
// PLEASE DO NOT MODIFY IT AND USE "platformio.ini":
// https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
//
{
"configurations": [
{
"name": "PlatformIO",
"includePath": [
"/Users/andrey/Documents/Arduino/DMXReceiver/include",
"/Users/andrey/Documents/Arduino/DMXReceiver/dmx_receiver_mos_relay_public",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src",
"/Users/andrey/Documents/Arduino/DMXReceiver/lib/utils",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/Wire/src",
"/Users/andrey/Documents/Arduino/DMXReceiver/.pio/libdeps/leonardo/CmdArduino",
"/Users/andrey/.platformio/packages/framework-arduino-avr/cores/arduino",
"/Users/andrey/.platformio/packages/framework-arduino-avr/variants/leonardo",
"/Users/andrey/.platformio/lib/Adafruit BusIO",
"/Users/andrey/.platformio/lib/Adafruit GFX Library",
"/Users/andrey/.platformio/lib/Adafruit ILI9341",
"/Users/andrey/.platformio/lib/Adafruit STMPE610",
"/Users/andrey/.platformio/lib/Adafruit TouchScreen",
"/Users/andrey/.platformio/lib/ArduinoOTA_ID6178/src",
"/Users/andrey/.platformio/lib/GUIslice/src",
"/Users/andrey/.platformio/lib/ILI9341_t3",
"/Users/andrey/.platformio/lib/ILI9341_t3_ID540",
"/Users/andrey/.platformio/lib/XPT2046_Touchscreen",
"/Users/andrey/.platformio/lib/XPT2046_Touchscreen_ID542",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/HID/src",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/SPI/src",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src",
"/Users/andrey/.platformio/packages/tool-unity",
""
],
"browse": {
"limitSymbolsToIncludedHeaders": true,
"path": [
"/Users/andrey/Documents/Arduino/DMXReceiver/include",
"/Users/andrey/Documents/Arduino/DMXReceiver/dmx_receiver_mos_relay_public",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/EEPROM/src",
"/Users/andrey/Documents/Arduino/DMXReceiver/lib/utils",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/Wire/src",
"/Users/andrey/Documents/Arduino/DMXReceiver/.pio/libdeps/leonardo/CmdArduino",
"/Users/andrey/.platformio/packages/framework-arduino-avr/cores/arduino",
"/Users/andrey/.platformio/packages/framework-arduino-avr/variants/leonardo",
"/Users/andrey/.platformio/lib/Adafruit BusIO",
"/Users/andrey/.platformio/lib/Adafruit GFX Library",
"/Users/andrey/.platformio/lib/Adafruit ILI9341",
"/Users/andrey/.platformio/lib/Adafruit STMPE610",
"/Users/andrey/.platformio/lib/Adafruit TouchScreen",
"/Users/andrey/.platformio/lib/ArduinoOTA_ID6178/src",
"/Users/andrey/.platformio/lib/GUIslice/src",
"/Users/andrey/.platformio/lib/ILI9341_t3",
"/Users/andrey/.platformio/lib/ILI9341_t3_ID540",
"/Users/andrey/.platformio/lib/XPT2046_Touchscreen",
"/Users/andrey/.platformio/lib/XPT2046_Touchscreen_ID542",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/HID/src",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/SPI/src",
"/Users/andrey/.platformio/packages/framework-arduino-avr/libraries/SoftwareSerial/src",
"/Users/andrey/.platformio/packages/tool-unity",
""
]
},
"defines": [
"PLATFORMIO=50202",
"ARDUINO_AVR_LEONARDO",
"F_CPU=16000000L",
"ARDUINO_ARCH_AVR",
"ARDUINO=10808",
"USB_VID=0x2341",
"USB_PID=0x8036",
"USB_PRODUCT=\"Arduino Leonardo\"",
"USB_MANUFACTURER=\"Arduino\"",
"__AVR_ATmega32U4__",
""
],
"cStandard": "c11",
"cppStandard": "c++11",
"compilerPath": "/Users/andrey/.platformio/packages/toolchain-atmelavr/bin/avr-gcc",
"compilerArgs": [
"-mmcu=atmega32u4",
""
]
}
],
"version": 4
}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
]
}
44 changes: 44 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// AUTOMATICALLY GENERATED FILE. PLEASE DO NOT MODIFY IT MANUALLY
//
// PIO Unified Debugger
//
// Documentation: https://docs.platformio.org/page/plus/debugging.html
// Configuration: https://docs.platformio.org/page/projectconf/section_env_debug.html

{
"version": "0.2.0",
"configurations": [
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug",
"executable": "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/build/leonardo/firmware.elf",
"projectEnvName": "leonardo",
"toolchainBinDir": "/Users/andrey/.platformio/packages/toolchain-atmelavr/bin",
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": {
"type": "PlatformIO",
"task": "Pre-Debug"
}
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (skip Pre-Debug)",
"executable": "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/build/leonardo/firmware.elf",
"projectEnvName": "leonardo",
"toolchainBinDir": "/Users/andrey/.platformio/packages/toolchain-atmelavr/bin",
"internalConsoleOptions": "openOnSessionStart"
},
{
"type": "platformio-debug",
"request": "launch",
"name": "PIO Debug (without uploading)",
"executable": "/Users/andrey/Documents/Arduino/DMXReceiver/.pio/build/leonardo/firmware.elf",
"projectEnvName": "leonardo",
"toolchainBinDir": "/Users/andrey/.platformio/packages/toolchain-atmelavr/bin",
"internalConsoleOptions": "openOnSessionStart",
"loadMode": "manual"
}
]
}
51 changes: 45 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,67 @@
DMXReceiver
# DMXReceiver

Techinal Specifications
Nominal Input Voltage (DC) 9 to 24 Vdc
Nominal Input Voltage (DC) 9 to 24 Vdc (24V is to much for Relays board)
Input Current 10 A Max
Output Current 2.5A Max/Ch
Number of DMX Channels 4
Addressing DMX Range 1 to 509

Setting Address
# Advanced features - Smart mode (Activated by turning Switch#10 on):

Guidance to use

1. Turn Switch #10 on (SmartMode on now), Switch#5-#8 on (default delay), rest switches off and restart board
2. Put board in Learning mode by turning Switch #9 on
3. Turn off all DMX light
4. Turn on Switch#1 on and then use all lights, which you want to associate with Relay#1
5. Turn off Switch#1 and all DMX lights
6. Repeat learning for channels 2-4 (with appropriate switches 2-4)
7. Turn off Switch#9 (Learning mode off, all changes will be written to EEPROM)
8. Ajust default delay by switches 1-8 and restart board (delay in tens of seconds. If 0: it will be no delay)

* When Switch#9 off - Switches 1-8 will define delay, between all DMX channels, associated with Relay turned to off and Relay turned off (in 10th seconds)
* Relay turnes on immediatelly when at least, 1 associated DMX channel in use
* You can ajust individual delay for every channel at step 4, using switches 5-8 (in tens of seconds). Value 15 (on-on-on-on) is reserved for default delay (defined at step 8).

[SmartMode designed to use togetger with LightHub Smarthome controller](https://github.com/anklimov/lighthub)
Recommeded for control AC power of LED transformers

* in SmartMode possible to use CLI interface on USB Serial port to control association table, save it to NVRAM and load fron NVRAM (USE 9600,N,8,1 Serial line parameters)

* Use these commands: 'help' - this text
* 'relay #' - set relay # setup for (1-4)\n
* 'set <DMX channel #> [<delay in 10s>]' - associate relay with channel
* 'del <DMX channel #>' - de-associate relay with channel
* 'print' - print association table
* 'save' - save current config in NVRAM
* 'load' - load config from NVRAM
* 'kill' - test watchdog (there are no WDT yet)
* 'clear' - clear association table in RAM
* 'reboot' - reboot controller (disabled now)

* When Switch #10 turned off - the board will working as normal DMX relay

* Setting Address

The DMX address is set using the first 9 switches of the DMX address switch.
The address is set as a binary number (with switch 1 the LSB). As the unit is a 4 channel receiver, it will respond
to data in the set address, and the following 3 addresses in the DMX data stream.

Using With DMX Input
* Using With DMX Input

In order to use the TinkerKit DMX to PWM Converter with a DMX feed, simply set the desired address and connect the
DMX feed to the DMX input. Remember to terminate the DMX feed at the end of the chain with a 120Ω resistor between
the DMX + and - lines.

Test Mode
* Test Mode

The TinkerKit set each individual output up to full brightness. This test mode is entered by setting the DMX address
to 0 (all switches down). While in this mode, any incoming DMX data is ignored. Once the address is changed
from 0, pressing the RESET button will return the device to normal operation.

The firmware allows you to use the DMX receiver module using a mosfet output or a relay one.
* The firmware allows you to use the DMX receiver module using a mosfet output or a relay one.
The output mode can be selected changing the value of the define OUTPUT_MODE in this way:
MOSFET for mosfet output
RELAY for relay output.

Loading