This shows you the differences between two versions of the page.
pm:prj2021:abasoc:smarthome [2021/06/03 11:27] tudor.niculescu0610 [Rezultate Obținute] |
pm:prj2021:abasoc:smarthome [2021/06/03 11:58] (current) tudor.niculescu0610 |
||
---|---|---|---|
Line 6: | Line 6: | ||
====== Introducere ====== | ====== Introducere ====== | ||
Scopul proiectului este sa folosesc un arduino pentru a interfata cateva tipuri diferite de senzori cu RS485 - Modbus, pentru a putea fi folositi intr-un proiect de tipul SmartHome. | Scopul proiectului este sa folosesc un arduino pentru a interfata cateva tipuri diferite de senzori cu RS485 - Modbus, pentru a putea fi folositi intr-un proiect de tipul SmartHome. | ||
+ | |||
+ | ====== Schema Bloc ====== | ||
+ | {{ :pm:prj2021:abasoc:thniculescu_smarthome.jpg?600 |}} | ||
====== Hardware Design ====== | ====== Hardware Design ====== | ||
Line 14: | Line 17: | ||
* UART TTL to RS485 converter | * UART TTL to RS485 converter | ||
* USB to serial RS485 | * USB to serial RS485 | ||
- | ====== Schema Bloc ====== | + | |
- | {{ :pm:prj2021:abasoc:thniculescu_smarthome.jpg?700 |}} | + | {{ :pm:prj2021:abasoc:smarthomers485-schema-electrica.png?600 |}} |
====== Software Design ====== | ====== Software Design ====== | ||
Proiectul e format din 2 parti: | Proiectul e format din 2 parti: | ||
Line 30: | Line 34: | ||
Eroare checksum: | Eroare checksum: | ||
- | Traceback (most recent call last): | + | Traceback (most recent call last): |
- | File "./master-rs485.py", line 13, in <module> | + | File "./master-rs485.py", line 13, in <module> |
- | val = instrument.read_register(0, 0, 3) | + | val = instrument.read_register(0, 0, 3) |
- | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 258, in read_register | + | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 258, in read_register |
- | return self._genericCommand(functioncode, registeraddress, numberOfDecimals=numberOfDecimals, signed=signed) | + | return self._genericCommand(functioncode, registeraddress, numberOfDecimals=numberOfDecimals, signed=signed) |
- | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 697, in _genericCommand | + | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 697, in _genericCommand |
- | payloadFromSlave = self._performCommand(functioncode, payloadToSlave) | + | payloadFromSlave = self._performCommand(functioncode, payloadToSlave) |
- | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 798, in _performCommand | + | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 798, in _performCommand |
- | payloadFromSlave = _extractPayload(response, self.address, self.mode, functioncode) | + | payloadFromSlave = _extractPayload(response, self.address, self.mode, functioncode) |
- | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 1075, in _extractPayload | + | File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 1075, in _extractPayload |
- | raise ValueError(text) | + | raise ValueError(text) |
- | ValueError: Checksum error in rtu mode: '\x01\x83' instead of '\x00\x00' . The response is: '\x01\x83\x02\xc0\xf1\x01\x83' (plain response: '\x01\x83\x02\xc0\xf1\x01\x83') | + | ValueError: Checksum error in rtu mode: '\x01\x83' instead of '\x00\x00' . The response is: '\x01\x83\x02\xc0\xf1\x01\x83' (plain response: |
+ | '\x01\x83\x02\xc0\xf1\x01\x83') | ||
{{:pm:prj2021:abasoc:smarthomers485-poza.jpeg?400}} | {{:pm:prj2021:abasoc:smarthomers485-poza.jpeg?400}} | ||
+ | |||
+ | https://youtu.be/BwLi745r3rU | ||
====== Download ====== | ====== Download ====== |