For a couple weeks, I’ve been looking into improving the Fan Controller in my tank. The purpose of the Fan Controller is to – you guessed it – control the fans. The main drive motors I have can throw off a lot of heat, and having good airflow through the tank is critical in not burning them out. I picked up a few different fans, but the one’s I choose to use are 24V DC brushless fans rated at ~4800RPM/~120CFM. They are really nice, but also use a fair amount of power. To help cut down on power usage, and increase battery life, the Fan Controller is supposed to control the fan speed based on motor temperature. And since I also love collecting all sorts of data, the Fan Controller is designed to record the fan speed.
My initial approach was to use a simple MOSFET with an optoisolator to control the fans from an Arduino’s PWM signal. This is pretty straightforward, and works pretty well. However, when I eventually went to work on the code that reads the fan speed from the fan’s tachometer, I kept on getting some really crazy results whenever the PWM duly cycle was anything but 100%. I finally hooked up the scope to see what the TACH signal looked like and I found that the PWM signal was being superimposed on TACH signal for any duty cycle less then 100%. I have no idea why this happens, but obviously my approach wasn’t going to work.
My first thought was going to be to try to find some 4-wire brushless fans with dedicated PWM input. The ones that I found were $60/each. I’m pretty sure I’ve already invested like $100 in fans, so that was a non-starter.
After some despair, I finally came across a few good resources. The idea was rather then use PWM to control the fan directly, use a PWM signal to control an LM317 adjustable voltage regulator and control the fan speed by varying it’s voltage. Clever Girl!
I modified the circuits referenced by choosing a different OPAMP that can support railed to rail 30V, and adjusted the gain for 24V operation. Below is the completed circuit. The fan controller uses an ATTINY84, OPA251 and an LM317.
MinuteMan Fan Controller
I’m making progress on the next major subsystem for my tank project. Before Christmas, I had ordered the RobotEQ VDC2450 DC Motor Controller. It finally came in last week, and I can say I am really pleased: this thing is a beast. The VDC2450 supports two channels up to 150A each (!!!!!). It also features RC, Serial, Digital, and Analog inputs. It has all types of built-in monitoring (all accessible via the serial interface), and a whole mess of other insane features.
I decided to splurge on this controller ($545 + Shipping) because I would like to be able to reuse this in future projects. Also, its way more capable then what is probably necessary for the tank, so I shouldn’t have to worry about burning it up (I might add some additional fans near the control board just to get some air moving across the heatsinks). The only gotcha so far is that the serial interface is RS232 only, so I ordered some MAX3232s to be able to interface with the Arduino.
Progress on the main control panel for my tank. Showing the RobotEQ Dual Channel ESC.
In this picture, you can see the main power distribution components in addition to the VDC2450. The main breaker is 100A and feeds a MAXI style fuse block I picked up off Amazon.
Also in the works as part of the control panel is the “power supply” that I’ve been working on. It’s really a hybrid power supply/power distribution board. It features a 5V DC-DC switching regulator to power the 5V systems on the tank. It also has fused and switched 24V outputs to power other tank subsystems (e.g. Fan Controller, eMarker Solenoid, etc.). One of the main reasons building this board was to add a few safety features. The VDC2450 will be powered through this board, in order to allow the controller to be “turned off” without disconnecting it from the main power. The eMarker Solenoid will be powered similarly to allow the eMarker to be disarmed.
The 5V buck regulator should be able to drive ~3A or so, which should be more then enough.
Eagle Layout for Power Supply
A few weeks ago, my Shapeoko hardware kit that I ordered from the fine folks at Instructables arrived. My life has been a bit crazy lately, but I’ve managed to make pretty significant progress on getting this bad-larry up and running. I ordered the stepper motors from SparkFun. I need a few more major components, including a CNC controller. I’m pretty sure that I am going to go with the TinyG. I’ll also need a 24V power supply, and a spindle of course. I’d also like to get an enclosure to mount all the electronics in, and a big red E-Stop switch just to make everything look extra badass.
When I get around to it, I intend on making some replacement belt anchors. The default design is pretty weak.
Because why not. Actually, a few months ago as part of my long running project to build a 1/6th scale M1A2 Abrams paintball-shoorting tank, I was looking into how to make an Arduino read data from an RC aircraft receiver (namely the Spektrum AR6210). I came across this fantastic series of posts over at RCArduino. I tested it out with my Arduino Mega, and it worked great.
At the time, I was also working on an ESC based of the Open Source Motor Controller using the HIP4081A H-bridge driver. The thing I don’t like about the OSMC is that it requires a separate board to convert RC/Serial/whatever into the commands to control the HIP4081. The goal of my ESC was to eliminate the need for the second board. This is where I came up with the idea of using an ATTiny micro to read RC signals from the AR6210 and drive the HIP4081A. The ATTiny was perfect because I was trying to keep the ESC as small as possible.
However, I eventually decided to table the idea of building an ESC (thermal management is tough), though I do have a working prototype (perhaps a topic for a future post). That said, I thought the little bit of code ATTiny code that reads the RC channels was pretty clever. Not to mention the OCD part of brain kicked that wants to create “modules”, “buckets” and “subsystems” for everything. After a little rework of the RC->HIP4081A code, I came up with a RC->Serial interface that should be usable by anyone looking to interface and RC receiver with any Arduino or other TTL serial thing-a-jig. The best part: you only need 1 pin on your Arduino. The also best part: it’s open source. Hooray!
About the TinyRC:
- 1.1 inches x 1.1 inches (with 4 mount holes)
- ATTiny84 Microcontroller (8Mhz)
- 6 pin ISP programming header
- Power Indicator LED
- Can Power Receiver
I did a quick calculation for price on this. The board can be ordered from BatchPCB for about $2.50. The parts from DigiKey will run you about $3.45. So thats about $5.95 in material costs. The AVR programmer will cost you about $15. This its entirely optional though if you have an extra Arduino to use as an programmer. A cable to connect from the TinyRC to receiver would probably be another $5.
TLDR: The Eagle files, code, and instructions are up on GitHub.