The original Tacx Flow turbo trainer uses an electromagnetic braking unit to control resistance applied to the rear wheel. The computer supplied with the trainer has no computer interface or wireless capability. My aim is to use an arduino to control the braking unit and interface this with a wireless module to support the sending and receiving of Ant+ data.
Details
Actually I have very nearly completed this project, I will add further details and update this as time allows.
The rear wheel resistance unit connects to the handlebar computer via a 6pin rj12 cable. The pins are connected as follows:
1 Cadence signal to computer (one pulse per crank revolution), 3.3V pulses. 2 GND/Common. 3 PWM control signal to brake (2.6V pulses). 4 AC power / synchronization signal to computer, ~23V AC signal which appears the +ve part is clipped at ~19.5V (see picture). 5 +18V (~1.5V variation sawtooth profile). 6 Speed signal to computer (4 pulses per brake axle revolution) 3.3V pulses.
I have never used the cadence pickup on the trainer, so I intend to ignore this.
The speed signal on pin 6 is required to be pulled high, with the trainer pulling it low for incoming pulses. I had a lot of problems calculating speed consistently early on as it appeared the result fluctuated randomly no matter how I changed the calculation. The cause was the relatively slow rise/fall time of the speed pulses, passing the signal through a schmitt trigger worked perfectly, averaging the last 3 speed readings gave a nice steady speed reading.
Resistance is created by the interaction between a set of permanent magnets and a set of electromagnets, either reinforcing or negating the permanent magnets field. To control the trainer resistance a pwm output synchronised to the AC signal on pin 4 needs to generated. Producing a pulse during the +ve part of the sync signal will reduce the resistance of the electromagnetic brake. During the -ve part of the wave will increase resistance. This is a 50Hz wave, being in the UK this is our mains frequency, I presume that in other parts of the world this is likely to be 60Hz.
My aim was to have the arduino generate an interrupt on the falling edge of the sync signal, as this is relatively slow, it should be possible to time a pulse during the first half or second have of the next wave. The length of this pulse effects how much resistance is generated. The arduino timers seem like a nice fit for this.
The project works, I have not worked in this in 3 or 4 years. I have uploaded all files needed to build it. I don't get on here often, but drop me a msg if there are any questions.
I hadn't logged in to this in a while to see these posts. I completed it enough for it to work for me at the time. I'll dig out the pcb schematic and code to post up soon for anyone that wants to improve on it.
Any further development on this? I have the same old tacx flow and was looking to get more than cadence and speed (i.e. power/control) with zwift..... is it possible?
The project works, I have not worked in this in 3 or 4 years. I have uploaded all files needed to build it. I don't get on here often, but drop me a msg if there are any questions.
The project works, I have not worked in this in 3 or 4 years. I have uploaded all files needed to build it. I don't get on here often, but drop me a msg if there are any questions.