The Floppy Ant Controller (abbreviated FAC ) is a control board designed for controlling small combat robots. It integrates DC motor drivers and servo and ESC control, with expansion ports for analog and digital readouts. The need for this control board arose after the first experience of building a combat robot during the Sovramonte Innovation Fair, in which a Mini RoboWar with 300g robots took place. After the first shot, my team’s robot had some problems with the electronics of the wheels, so to solve the problem I created this multifunction board, hoping that it could then be useful not only to my team but also to other robot manufacturers.
This is a completely Open-Source project and all the files can be found on this GitHub page.
Specifications (version 1.2)As a brain I opted for an STM32F070CBT6, which provides many timers for the generation of PWM signals, 128Kbytes of FLASH and, most importantly, integrates a USB module for direct communication with the PC.
Its small size, just 23*33mm, and a weight of just 9g makes it perfect for integration into150g combat robots.
The USB-C port allows even less experienced people to update the firmware, so as to always have the latest version. Furthermore, it is possible to connect the FAC to the PC and using the dedicated tool or a simple serial monitor, some settings can be modified and then saved in EEPROM.
With three DRV8838 drivers for very small DC motors, it is possible to control loads with a maximum voltage of 12V, up to a current of 2A. Excellent for managing N20 motors usually used for robot wheels.
FunctionalityReceiver and radio systemThe Floppy Ant Controller was designed to be used with FS2A receivers, both the version that supports only PWM outputs and the PPM version. With the second, you can manage up to 8 channels.
The choice of this type of receiver is given by the fact that a Fly Sky i6 or i4 radio control has become very cheap (€35/50), therefore excellent for those who want to start with this hobby. These radio systems are based on the 2.4GHz ADHDS protocol, perfectly compatible with the FS2A which are also very economical and have very small dimensions, therefore perfect for this application.
The firmware written by me manages both modulations (PPM and PWM). If it is used in PWM mode the channels are limited to 4, if in PPM mode it reaches up to 8. Nothing prevents adding support for other widely used protocols such as ExpressLRS or others to the code.
Channel mix and protections integrated into the boardThe FAC having a brain (an STM32 microcontroller) allows it to carry out calculations of the mix of channels received from the radio system, and other arbitrary operations such as reading the battery voltage.
Every operation and calculation can be integrated into the FAC code, so you can customize its behavior according to your needs.
Tank mixFor wheel management, Tank mix has been added to the code. As the name suggests, the card manages the speed of two DC motors with the same logic as the tracks of a tank.
The function that manages the mixing of the wheel motors only requires speed and direction ( steering) as input.With these two pieces of information it calculates the speed of each individual wheel, by doing so the direction of the wheel and the duty cycle of the signal, i.e. the speed, are then correctly set.
If this functionality is not needed, you can always disable it from the settings.
Low battery protectionThe board has integrated a battery voltage readout. The firmware integrates two protections that are activated at two different battery levels (settable):
- The first is the one that is activated at a usually higher voltage level and after 10 (continuous) seconds that the battery voltage is below this threshold, the speed of the weapon is limited so as to allow you to finish the battle with the The weapon is still functioning and warns us that the battery is about to run out of charge.
- The second also trips after 10 continuous seconds that the battery voltage is below a certain threshold. This time, the threshold is very low and completely disables the robot, this is done to avoid irreparably damaging the battery.
For safety reasons, the FAC has the robot arming function. This feature turns off all systems when the card boots. So both the drivers for the DC motors and the servo motor outputs are deactivated.
There are two ways to activate the robot, either you assign a receiver channel as arming, or if you don’t have one available the board automatically arms only when the remote control sticks are at the default position, therefore when the robot would be stationary and with the weapon deactivated.
FAC Settings ToolThe Floppy Ant Controller allows you to change some of its settings without having to change a line of code. This is possible thanks to the presence of the USB port which, once connected to the PC or smartphone, can send commands that correspond to settings.
An example of command is: TH2CH>2, which means “set channel 2 of the receiver as accelerator (throttle)”, below is a list of the available commands:
We can send these commands in two ways:
- Using a simple terminal such as the Arduino IDE or Termite , otherwise using a phone app such as Serial USB Terminal which allows you to save default commands
- Or through the dedicated tool created by me: FAC Settings Tool (available compiled only for windows, there is the python program)
For beginners, I recommend using the FAC Settings Tools, which provides a simple and intuitive graphical interface to change all the settings.
To use it, simply connect the card to the PC, then:
- Select the correct port and click Connect
- After the card is connected, the settings are automatically loaded
- You make changes according to your needs
- If the function is not clear, a short description appears on some lines, stopping above the name
- Once you have finished editing, just press the Save on FAC button and wait for the saving to complete
- After that you can disconnect the card from the PC
If necessary, you can export and import the current settings into a .CSV file, so you can share and save the changes on your PC.
ConclusionsThis version of the Floppy Ant Controller has many things to improve such as the addition of EEPROM memory and to fix some errors made during the drafting of the schematic.However, it remains an excellent card despite being a first version that is still a bit “raw”, it was excellent for the first tests for the creation of a more complete card in the future and with all the features listed in this article.
Without the help of PCBWay who kindly offered the PCBs and a super fast and efficient service, the time for making these boards would have been longer, so thank you!
The service they offer is, as always, very good, the boards turned out very well. In addition, when you load the files into the cart, their engineers immediately check for errors or problems that could affect the success of the production. This service helps makers like me to save money as they ask you to solve the problem even before proceeding with the payment.
As you can see the PCBs are very good, I had to choose the blue soldermusk because other colours such as black did not support the 0.2mm solderbridge size, but luckily they wrote to me to notify me of the 'problem' so I could choose another colour that supported this spacing.
I have already fixed some of the errors found during tests on this version, plus useful components have been added to increase the reliability of the card and make it more optimized.
I hope this article has been useful to you, or has been an inspiration for your projects. Thanks and see you next time!
Comments