Hello all!
I’ve been going back and forth banging my head against the wall trying to figure out what the issue is. Hopefully someone can help.
I have 2 servos powered by a iMah Ryme B39 6volt 2amp
I have 2 subsequences loaded on maestro servo controller
and an Arduino that is triggering each sequence with 2 separate button presses- button 1 triggers sequence 0 and button 2 triggers sequence1
Everything works as it should when the maestro is connected via usb to the computer. However, once I unplug from the computer and run off the battery it starts to work incorrectly. When I press button2 sequence 0 triggers, as opposed to trigger 1. So basically no matter which button I press only sequence 0 runs. Both sequences use the same servos with different frames.
I am getting a red flashing on the maestro led when I press both buttons and the usb is not plugged in. But when it’s plugged into the computer I do not get the flashing. It is set to run on startup and the weird thing is it still works as intended even when it’s not connected to the maestro control center (but still physically connected to the computer). But if I try to plug the USB into a different power source it does not work, it only works connected to the computer.
My instinct says it has to be an issue in the wiring. I’m using 2 SPST normally open push buttons and a 10k pull down resistor going to Arduino ground for both(maestro is also connected to ground). and the other end going into the Arduino Vin on both. Please someone help me!
Typically, to use a button with an Arduino, you would connect one side of the button to GND and the other side to the GPIO pin you’re using to read the button input. Then, you can use an internal pull-up on the Arduino by calling pinMode(buttonPin, INPUT_PULLUP); in your setup() function (you should not be connecting them to VIN). This way, the input should read low when the button is pressed, and high otherwise, so you will need to adjust your IF statements accordingly. Additionally, please note that you will need a separate pinMode() declaration for each of your inputs (it looks like you only have one right now).
If that continues to give you trouble, could you post pictures of your setup that show all of your connections? Also, could you post more details about the servos you’re using and how you’re powering the Maestro when it is not connected via USB?
White is going from Arduino TX to Maestro RX
Black connecting Arduino and Maestro Ground
Green to ground and yellow and orange to pins 2 & 3
I’m using Tower Power SG-5010 but I was using Miuzei micro servo MS18 with the same results. I’m powering everything (except the Arduino) with the iMah Ryme B39 Rechargeable Battery pasck 6 volt 2000mAh
I tried replicating your setup here and everything seemed to work fine. Do you still get some flashing behavior on the Maestro’s indicator LEDs when you try to run it powered from your battery? If so, could you describe the flashing behavior in more detail? Just to clarify, if you connect the Maestro to your PC via USB and run the program on your Arduino, does it work as expected?
Also, it looks like you might be using an Arduino Uno; is that the case? If so, it’s a little unusual to use pins 0 and 1 for software serial, since those pins are the same pins the Uno uses for hardware serial (and they could have some unpredictable activity when programming or booting up). I would generally recommend avoiding those pins for anything other than hardware serial, so you might consider switching those to some other pins like 10 and 11 (although I don’t think it will fix your problem).
Yes, when it is solely running off the battery I get 4 red flashes every time either button is pressed. And yes everything works as expected when plugged into the PC and no red led.
I did try to switch to 10 and 11 but still got the same result.
Just to clarify the only connections to arduino should be ground and arduino tx connected to maestro rx correct?
Yes, for the code you’re running (which isn’t expecting any information back from the Maestro), you should only need to connect the Arduino’s TX pin to the Maestro’s RX pin and a common ground.
When you power the Maestro from only the battery, are you doing so by installing the VSRV=VIN jumper near the BAT pins?
You can find an explanation of the LED behavior in the “Indicator LEDs” section of the Maestro user’s guide. From your description, it sounds like you are probably running into a power issue that’s causing the Maestro to brown-out and reset. Could you try making sure your battery is fully charged and seeing if that makes any difference? Ideally, if you have access to an oscilloscope, you could take a look at the battery voltage and get a better understanding of the problem. Are your servos under any load? If so, I recommend removing that for now. You can also try disconnecting your servos entirely (since they are drawing a large majority of the current compared to the Maestro) and seeing if it still happens.
Okay I see what I was doing wrong. I didn’t realize that the blue jumper needs to connect VSRV = VIN. Somehow I must’ve missed that. Connecting them seems to have solved the problem