totalreverse / ttyT1941

Simple demonstrator to show how to control a Tacx T1941 motor brake via a serial connection
GNU General Public License v3.0
16 stars 3 forks source link

T1601 eddy break communication via RPI #12

Open lukaskom1 opened 4 years ago

lukaskom1 commented 4 years ago

Hi i try to connect to the T1601 by the RPi 2 B. I use USB0 and AMA0 i the same effect. With 2.2Kohm termination and without the GND i have print as below

`bytearray(b'\x02\x00\x00\x00') checksum calc:a843 and buf:a843 t1601

b'\x010200000043A8\x17' R:01 30 32 30 30 30 30 30 30 34 33 41 38 17 D:02 00 00 00 bytearray(b'\x02\x00\x00\x00') `

Please help mi with decoding problem

lukaskom1 commented 4 years ago

After rotate the wheel in trainer i recive as below:

OVERRUN: reduce commands per second! no valid frame b'\x01\x000 000 \xd3\xf1[82 .578&0&]\xe1\x00' R:01 00 30 20 20 20 30 30 30 20 20 d3 f1 5b 38 32 20 20 20 2e 35 37 38 26 30 26 5d e1 00 D: bytearray(b'') OVERRUN: reduce commands per second! no valid frame b'\x010 0000 \xd3\xf1\x128250 \x0c&8257 \x18\xf0\x00' R:01 30 20 20 20 30 30 30 30 20 d3 f1 12 38 32 35 30 20 0c 26 38 32 35 37 20 18 f0 00 D: bytearray(b'') OVERRUN: reduce commands per second! no valid frame b'\x82\x82\x82\x02\x00\x00\x00*\x19\xd1]H\xc0\x80\xd4\xc1' R:82 82 82 02 00 00 00 2a 19 d1 5d 48 c0 80 d4 c1 D: bytearray(b'') no valid frame b'\x00\x00\x82\x82\x82\x82\x00\x00\xd3\xf1\x1202506\x0e 088]\xff\x00' R:00 00 82 82 82 82 00 00 d3 f1 12 30 32 35 30 36 0e 20 20 20 30 38 38 5d ff 00 D:

totalreverse commented 4 years ago

Unfortunately, the way to control a T1901/T1601 eddy current brake is completely different.

What you see is the 'noise" from the wheel signal, because the T1901/T1601 wheel signal is connected to the blue wire. The T1941 motor brake uses this wire to send the Tx serial data.

# socket (female side) how you see it, when looking on the brake-power-back (same for head unit)
#
#    __|^^^|__
#  _|         |_  original|
#  |           |  cable   | T1941: motor brake                (T1601/T1901 eddy current brake)
#  |           |  color   |
#  |6 5 4 3 2 1|  ----------------------------------------------------------------------------
#   | | | | | |__ white   | T1941: not used                   (T1901: CAD sensor)
#   | | | | |____ black   | T1941  GND                        (T1901: also GND)
#   | | | |______ red     | T1941: Brake-Rx, Host-Tx (3.3V !) (T1901: magnetic field 'PWM' switch)
#   | | |________ green   | T1941: not used                   (T1901: powerline sinus +/- 20V)
#   | |__________ yellow  | T1941: ~6V                        (T1901: >12V) (maybe to power stand-alone head units?)
#   |____________ blue    | T1941: Brake-Tx, Host-Rx (3.3v !) (T1901: wheel signal)

To control the eddy current brake you have to switch the magnetic field (red wire) in sync with the (analog) powerline signal (green wire).

lukaskom1 commented 4 years ago

Thank you for your answer. its a pity but you have any idea how to measure the power by the rpi from the eddy brake? i should make analyze the signal (make some of oscilloscope i RPI) ?

lukaskom1 commented 4 years ago

OR Maybe you have a knowledge about the possibility to connect Cycleforce Basic stand-alone unit(t1652) by pins shown on the below picture.

t1652

totalreverse commented 4 years ago

The simplest way to connect the T1601 (and T1901) eddy current brakes to a computer is to look for a used head unit (T1902, T1942). The solid green T1902 is the "official" head unit, but the T1942 should work with my experimental ezTraCon firmware. I

The ezTraCon firmware has a driver for the eddy current brakes for the ezusb (8051 cpu). With some effort, it should be possible to port it to another micro controller. To sync the magnetic field modulation one can use an ADC that samples the +/- 20V powerline signal to detect the zero crossings.