|May 30, 2013, 06:20 AM|
Joined May 2013
Martinez board / Open source brushless gimbal HELP THREAD
Hi folks, since people are starting to flood the Open Source Brushless Gimbal thread with questions that have been answered in it noumerous times, I feel setting up a thread with solutions is necessary.
You can safely connect 2S, 3S and 4S batteries to the board.
Hardware: When you connect your board (on WINDOWS) the OS will automatically install a FTDI-UART device which is using a COM port. Make sure this COM port has a port number lower than 10, because otherwise the tweaking tool may not be able to access it.
Check your IMU (small gyro board) for proper orientation. If the software version on the controller board is lower than V49A_r161, the components (chips) on it must face DOWN. On the board there are two small icons indicating the X and Y axises. On firmware (FW) releases before V49A_r161 X MUST FACE FOWARD.
Edit: As of V49A_r161 the devs have solidly implemented the ability to define the IMU/sensor board orientation in the controller software according to several user reports.
Remember, this is open source alpha software, people developing it are folks like you and me who do this for fun and passion, putting their unpaid spare time in it. So dont complain!
You need the Arduino software to write the FW to the EEPROM of the board:
If the versions of the firmware have major changes you might want to consider performing an EEPROM Clear (erasing the EEPROM before writing the new FW version).
To find new firmware versions, go here:
To see the changes from the previous version, click on the Filename or "Summary & Labels" next to the release.
The full release changelog can be found here: https://code.google.com/p/brushless-gimbal/source/list
After downloading and extracting the firmware, you get a folder something like this; BruGi_049A_r45 containing a folder "_BruGi" (BRUshless GImbal).
This contains a load of files, most importantly an ino file which is a "sketch" for the arduino software.
Open the ino file from arduino, select the right type of board and the proper COM port from the Tools menu. You can get a hint which board type it might be by checking the CPU on the board. Mine says MEGA328P, so I just used the "Arduino Pro or Pro mini, (5V, 16 MHz) w/ ATmega328)".
If you receive errors when compiling and sending the sketch, you have most likely
a) picked the wrong board
b) picked the wrong COM port
c) have a corrupted firmware download (has happened a few times it seems).
d) Arduino says avrdude: stk500_getsync (): not in sync: resp = 0x00
this does not mean that you have broken device. It's most likely a driver problem with the FTDI device (arduino usb interface) driver.
Windows will per default install the newest driver (2.8.28), which doesnt seem to work for everybody.
The driver needs to be changed manually for both the USB device and the FTDI (can be seen under device properties), the 2.8.24 version can be downloaded here.
Here is an excellent post by jy0933 describing the procedure in minute detail.
Or try using Windows XP if you still have a machine running it.
Ok, now, having flashed the new firmware, it's time for tweaking.
Many people have asked "Where is the BLTool.EXE?" for versions >V48?
Inside the (example) BruGi_049A_r45 folder, inside its GUI folder there is a file ending in *.TCL (example: bl-tool2_049.tcl). TCL is an interpreter language meaning you can use a program to "execute" said file.
A good one on Windows is ActiveTCL: http://www.activestate.com/activetcl/downloads
After installing activeTCL, just double click on the *.tcl file and the Tool will open.
Tweaking the gimbal. PID TUNING
There are tons of different boards, gimbals, motors and cameras out there. Infinite combinations. Yours is but one.
There are countless different setups for different motors and different cameras and different gimbal dimensions, YOU CAN NOT EXPECT NEW FIRMWARE TO WORK ON YOUR GIMBAL/CAMERA COMBO RIGHT AFTER FLASHING. EVAR!
(Unless you are flashing a specific manufacturer supplied firmware with specific PID values included in the firmware file, but that's not what we're talking about here.)
Having said that, what you should do is EEPROM CLEAR, then flash new firmware and start tweaking.
1. The IMU (small gyro board) must be mounted correctly on the tray with the camera, the camera must be in the tray of the gimbal.
The camera tray must be hanging freely and able to move the camera. DO NOT HAVE THE CAMERA TRAY SITTING ON A DESK AND EXPECT IT TO LEVEL. That does not make any sense for what you're trying to achieve anyway, now does it!?
2. Connect the board to a 2S, 3S or 4S battery. Note: Some people have experienced the need for different PID values with different battery types (as in: PIDs using a 3S battery differ from PIDs using a 4S battery with the same controller board).
3. Connect to USB
4. Connect the Tweaking tool (TCL file or executable)
5. Tweak away as follows:
Focus on Roll first, then pitch (or vice versa, just ONE AT A TIME!)
Set maxPWM and PID all to zero on both Pitch and Roll.
Starting with roll, increase your maxPWM to the point where the roll arm starts moving, then lower it a bit. Then increase P and I gradually until you get some oscillation in the arm. Now increase D (and lower/raise P, and I) to dampen the oscillation.
Repeat the procedure for pitch.
If you find the values get lost after you disconnect USB, remember to click SAVE TO FLASH.
On older versions of the GUI software you had to click SAVE to submit the changed values to "RAM" (actually being applied for active use that moment), then when happy with them click "SAVE TO FLASH" to write them to EEPROM so they'll survive the power cycle.
On newer versions, when manually entering values numerically, you still have to SAVE to apply while they are being auto-applied when using the sliders.
End of Addition. Old text below, with some identical info...
A good procedure is said to start by setting PWM to zero and then increase it on the first axis to work on. Increase PWM to a value that your motors have just enough power to move your camera. Then increase P until there is slight vibration/oscillation and then try to remove it by playing with I and D (and P).
NOTE: Values from V48 and lower will not work on V49! There has been a change in the way to read the gyro data, so new settings are needed!
Also do not use your fingers to offset the camera and have it rebalance to check your levelling, move the setup to check if the cam stays in balance.
If you have any solutions to old or new problems, please feel free to add them stating what FW they apply to! Thanks!
Remote control Pitch
As more and more vendors are selling Martinez based boards "ready to fly" more and more people are wondering why they cannot pitch down more than ca. 30° when remotely controlling pitch.
This is because the standard RC pitch limits on the firmware are defaulted to -30/30 degrees.
All you have to do to fix this (or rather, set new values, as it's not broken) is to use the GUI/TCL-Tool as explained above and change the RC-Min and RC-Max values.
Note that the pitch neutral/level is the average value of RC-Min and RC-Max, NOT ZERO. So if you set RC-Min (pitch down) to -90° and RC-Max to 30°, RC-pitch neutral will be -30°. This would have to be compensated by the offset value to achieve 0° at level, 30° for full pitch up and 90° for full pitch down.
Ok, so you have done everything right so far, and you can somehow get one axis to work but not the other, no matter what you try?
Check your wiring and solder points. Many of the gimbals are from "the workbench of the world" and detailed quality is sometimes not where we'd like it to be.
A hot spot here is the connection of the wires to the IMU. Because of the setup, a lot of bending can happen here and if the solder points are not good, fraying (and then shorting) can occur. I had this happen to myself, and after 2 weeks of trying to get the gimbal to work I happened to find frayed cabling and once i replaced the IMU, everything worked fine after like 5 minutes of tweaking.
Grab a multimeter and crossexamine the connections to be sure.
If you ever experience the IMU (usually green) or cotroller board (usually blue) LEDs turning off or changing intensity, this strongly points to a wiring/soldering/electrical issue with your board(s). The board has resistors for voltage regulation (both the controller and the IMU need constant 5V), so the LEDs should always stay on and bright (not the Rx/Tx [red/yellow] ones of course).
Below are the reference board/component layout schematics by martinez found here (german forum).
Thanks mark_q for the wiring pic.
|May 30, 2013, 02:02 PM|
United States, NY, Rochester
Joined Jul 2012
Just a quick note that I have to give you Kudo's for this. Hope it works out as a sudo-wiki.
Adding to this...
When you post for help...PLEASE include...
Open Source Board Version
Open Source Firmware Version Number (Very Important as currently the only thing even close in them is the ver number itself.)
Battery Type (Yes, 3S and 4S can make a difference in power.)
Current Settings (If needed)
All in all, remember, frustration is only part of the fun. Take pride in that you are working at the bleeding edge technology. (And helping to one day have other line their pockets with cash from all your hard testing.)
|May 31, 2013, 04:12 AM|
United States, NV, Las Vegas
Joined Apr 2013
has anyone figured out how to offset the brushless gimbals.. meaning.
once the gimbal is powered and up and running the roll is off about maybe 5 degrees so its not exactly level. but it works perfectly fine and maintains it without moving at all
|May 31, 2013, 02:54 PM|
Joined May 2013
You can edit an offset into the Firmware files, but that way it is fixed plus you need to reflash (with the offset).
@muchacho92: Depending on what version you are on, you need to tweak your PIDs. Also check your copter for vibrations. Strong vibrations on the IMU could throw off the reading.
|May 31, 2013, 02:57 PM|
I want to be able to tilt my gopro with a slider on my transmitter, but I think I have a faulty martinez controller board.
I have connected a signal cable from my receiver (futaba) to the A1 pin (which should be RC pitch control), but when I move the slider the gimbal rolls instead of pitches... I tried connecting the signal cable to A2, but that doesn't do anything...
What am I doing wrong? Can you please send me a picture of the setup for controlling the pitch control?
thanks very much.
|May 31, 2013, 03:17 PM|
United States, OR, Damascus
Joined Feb 2013
my bL tool opens and is on com2 it reads it but all the adjustments stay gray I cant figure out why?
team rebel beholder
firmware flashed to 049
|May 31, 2013, 06:09 PM|
Joined May 2013
//RC Pins #define RC_PIN_ROLL A1 #define RC_PIN_PITCH A2
@Wheems: Which V49A_rXX tool version are you using? I've had trouble connecting peoperly with the r40 tool, but the r34 tool works well and talks to firmware versions r40 and r45 properly as well.
PLEASE PEOPLE PROVIDE YOUR FIRMWARE VERSIONS! Be as specific as possible or the possible solutions multiply by powers.
|May 31, 2013, 10:22 PM|
United States, MI, Haslett
Joined Mar 2010
I am really confused about how to use the active state tcldevkit. It put a ton of crap on my computer and I have no idea what of the many applications it put on my computer to use to open the bltool2 049. Also this is a 21 day trial do we always need this now to open the GUI for version 49. I guess I need a step by step instruction. I have tried opening the bltool2 049 with the tclapp and it did nothing.
|Jun 01, 2013, 04:11 AM|
thanks for your response!
Problem now is that I can't get to connect to the GUI, it always gets stuck on reading values...
If I try to upload the 49r40 firmware with arduino it says avrdude: stk500_getsync(): not in sync: resp=0x00
I have the atmega328 5v, 16mhz arduino pro board selected and I am on com port 2 using windows 8
Is there a way to check the current firmware on the board? I don't know because I got it with a brushless gimbal...
|Jun 01, 2013, 09:06 AM|
Joined May 2013
You will need to replace them using the 2.8.24 drivers.
The older drivers can be found here: http://www.ftdichip.com/Drivers/VCP.htm
You need to manually "update" the drivers for both device and COM port to this version, unzip it and then select "pick driver from a list" to avoid windows automatically selecting the .28 again.
The only way to check the firmware is to connect. You have likely not ever connected yet.
|Jun 01, 2013, 09:21 AM|
Joined May 2013
The devs dont bother to compile a tool, because it's more work with no gain. It's open source. If you dont want to research, learn and tinker, you pay a much higher price and get a manual. It's not that hard, I only bought my first quadcopter 3 weeks ago.
|Jun 02, 2013, 01:10 AM|
EDIT: Fixed, I tried it on another computer and its fine?
Awesome work being done here!
Can someone please help me?
I am getting a complie error before trying to load the file into my board. (see attached)
Here is where I am at...
- I have opened the 49 BruGi.ino file in Arduino 1.0.5
- The computer is happy with the board on COM 9 (XP)
- I have selected the right board (Arduino Pro or Pro Mini (5V 16MHz) W/ATmega 328
- I have down loaded the file again just incase..
I also have the GUI working great just says I have old firmware
I'm not shre why Arduino.h is missing? Do I need to find it somewhere else?
I have played with Arduio software a little in the past but never come up with an error like this before?
Thanks in advance. Cheers!
|Jun 02, 2013, 01:40 AM|
I've been working with this Martinez board for 3 days now and I can't figure out my problem. I'm currently running BruGi_049A_r45 firmware on my board. I have THIS gimbal running the two iPower GMB2208 brushless motors. Running the board with it's own 3s battery. When I connect the roll axis motor to the Martinez board, everything works perfectly like it should. When I go to connect the pitch axis motor, my gimbal starts vibrating and it makes the whole gimbal unresponsive. If I unplug the pitch axis motor, the gimbal returns to normal and my roll axis motor works perfectly. I'm wondering if my motor for the pitch axis is bad or am I doing something wrong. I've tried tons of different settings in the GUI, but nothing fixes the pitch axis. Any help is appreciated.
|Jun 02, 2013, 03:01 AM|
Joined Apr 2013
The gimbal is still flippen when it goes in the air. I use it with a 3s battery and firmware version 049. Is it maybe possible that i can reduce the strange movements when it flies with tuning or is this a vibration issue?
|Category||Thread||Thread Starter||Forum||Replies||Last Post|
|Discussion||Open Source Brushless Gimbal||edge0xc||Multirotor Electronics||3071||Feb 24, 2015 02:16 PM|
|Idea||Open Source Gopro Brushless Gimbal||icais||Multirotor Talk||16||Mar 28, 2014 01:07 PM|
|Discussion||Next Gen Open Source Direct Drive Gimbal Control Board||Tom Frisch||Multirotor Talk||2||May 16, 2013 03:27 PM|
|Sold||open source brushless gimbal controller||jy0933||Aircraft - Electric - Multirotor (FS/W)||57||Mar 26, 2013 08:02 PM|
|Sold||[closed] open source brushless gimbal controller||jy0933||Aircraft - Electric - Multirotor (FS/W)||16||Feb 26, 2013 10:19 AM|