Turning a TZ85A into a Sensored controller Goto page 1, 2Next
Author
Thread
chunkulator
Joined: 27 Jul 2016
Posts: 219
Turning a TZ85A into a Sensored controller
There's a lot to like about Sensored brushless motors. I just bought a couple of cheap ones on eBay designed for electric skateboards. However, the key challenge is finding an ESC that won't break the bank. None of the cheap car ESCs I tried from HK have the ability to change the direction of commutation and even when I hacked into the sensor cable and swapped matching hall phases and winding phases I couldn't get them to run efficiently flat out. If I want a good ESC for them it looks like the VESC at $185 is the best option, so getting up to $400 per bot.
But I got to thinking: how hard would it be to make a TZ85A into a Sensored brushless controller? All you need is three available input pins, preferably capable of some kind of input timing capture or interrupt-triggering functionality. There are about 80 pins on the AVR in there. Once you have timing input, the firmware will be significantly simpler than what you need for sensorless. If this were possible you could have a robot oriented Sensored ESC for $65.
Tue Mar 14, 2017 8:08 am
miles&Jules Experienced Roboteer
Joined: 19 May 2010
Posts: 3973
Location: ipswich QLD
A tz85 with simon k is pretty responsive - watch videos of decimator at 2015 nats - drives epic👍
I am running sensorless SimonK on TZ85A in The Slaying Mantis too. It works well enough for high kV motors and lots of gearing. I'm about to try with low kV motors and very small amounts of gearing, which is where I think Sensored is probably going be useful.
Tue Mar 14, 2017 3:57 pm
chunkulator
Joined: 27 Jul 2016
Posts: 219
Thinking about how I can improve my bots after Vivid I am more convinced than ever that sensored is the way to go and I'm looking for ways I can do that without forking out $200/channel for VESCs. While I might be able to do that for one bot, on the walker I am thinking of building (which will have 8 motors in it operating as huge servos) VESCs will be prohibitively expensive.
So I started looking seriously at hacking TZ85As to run sensored today. The first issue is where to connect in the sensors. There are a number of pins spare on the ATmega8A micro that's in there, but I don't want to be soldering tiny fragile wires directly onto the tiny pins of the micro in a bot that's getting smacked around the arena. That doesn't seem like a robust enough solution. Fortunately the 6 signals that are used to flash software onto the device all come out to decent sized pads that are presumably used in a Bed-Of-Nails programming fixture at the factory and three of these can be used as inputs when you are not programming the device. I was able to get a sensor connector onto these in what I hope will be a fairly robust manner. The cool thing about this solution is that I can also connect my hacked-in sensor port to the AVR programmer to reprogram the device.
Here's where I ended up:
I started writing code this arvo and I have some basic PWM working. More news here as I progress.
Last edited by chunkulator on Sun Jun 18, 2017 8:43 pm; edited 1 time in total
Sun Jun 18, 2017 6:32 pm
chunkulator
Joined: 27 Jul 2016
Posts: 219
It works!
I have PWM speed-controlled smooth sensored commutation! Now I just need to make it respond to the PWM signal from the RX.
Sun Jun 18, 2017 8:38 pm
pilleya
Joined: 31 Mar 2016
Posts: 91
Location: Sydney
Awesome, I bet Steve will be very interested in this if you can get this working IIRC Team Deathroll ended up having to spend a lot for sensored controllers to run the hub motors.
Sun Jun 18, 2017 8:51 pm
Glen Experienced Roboteer
Joined: 16 Jun 2004
Posts: 9481
Location: Where you least expect
Problem with deathroll was a controller to handle the voltage not so much the sensored side of things, they still run well unsensored with the VESCs. I think TZ only go to 28v ish.
1 - At the time the range of sensored motors was very limited and expensive.
2 - VESC offers a 12S solution for a comparable price
3 - I am not convinced sensored is a good idea. The additional failure points + special ESCs + limited range of motors to me was really a deal breaker I sorta got stuff working but wasn't convinced this would be a good idea in a combat scenario. Things have changed a bit (its been 3-4yrs since I looked at this) but I haven't redone my investigation. _________________ Steven Martin
Twisted Constructions
http://www.botbitz.com
Sun Jun 18, 2017 10:03 pm
chunkulator
Joined: 27 Jul 2016
Posts: 219
Thanks for the pointer Steve. Those look like a good option for up to 4s. Of course I can run my sensored brushless longboard motors on 6s with a hacked TZ85A. In the fullness of time I also want to use the position from the hall sensors (with an end stop microswitch) to drive the limbs of my walker to a known location. I'll need to be able to run serial or I2C from the master brain for this. TZ85A will have to be serial. Any idea whether those other units have the i2C pins available?
The redux is that even though it says on the tin 4s you can run it on 6s no problem. I'm definitely gonna get me some of those. Heaps easier than hacking sensor inputs into a TZ85A and I'll be able to reuse all of the custom firmware I already wrote.
Usually on these controllers the limiting voltage is the rating on the FETs which is 30V. They derate them as the BEC can't put out the current specced at higher voltages which is a big issue for planes and cars using servos.
Ordered me one of these last night. Unfortunately HK only had one in the Aussie warehouse. Hopefully they are coming back soon!
Tue Jun 20, 2017 6:43 am
Nick Experienced Roboteer
Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW
Does the BEC on the average Hobbyking ESC also power the internal logic? The ones I have looked at usually have a 7800 series regulator so maybe replacing that with a pin compatible switching regulator can turn more 4S controllers into 6S versions. _________________ Australian 2015 Featherweight champion
UK 2016 Gladiator champion
Tue Jun 20, 2017 8:58 am
chunkulator
Joined: 27 Jul 2016
Posts: 219
In the teardown linked above they found that there is a switching regulator which brings the battery voltage down to 9V or so. This 9V is used as the gate drive voltage for the FETs and is then passed through a 7805 to run the internal logic. The 6V BEC is a separate switching regulator on this board.
I'm not sure whether this is a "typical" arrangement. The teardown writeup implies that it is not.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum