DSBaily
USA
Asked
Resolved by DJ Sures!
I am building, built, a platform to move my Inmoov robot, Bourne, around. Im using hoverboard motors. I have found that the brushless motor controller doesnt do all that I need.
- Contolled pwm output, limit speed. max 1.5 volts, maybe less
- Direction change, works great.
- Brake, I dont use but my board is +2.5-5 volts.
- Joystick contolled so it's not just forward, left,right but also 45" Forfard and L/R
- Doesnt play well with Tracking, needs to
- needs to work with Leanardo, without ez-b 4. using LattePanda.
- Needs to work with navagtion and or SLAM
Some of this is in V2 , not all. What am I doing wrong?
Related Hardware LattePanda
Related Control
Brushless Motor Movement Panel
1. Contolled pwm output, limit speed. max 1.5 volts, maybe less I'm not 100% certain what that means, but I'll try a guess. The PWM output of microcontrollers varies between 0 and their VCC input voltage. So, if a micro runs on 3.3v, then 100% of PWM will be 3.3v. And 50% will be 1.65v. So you'll need to limit your speed in ARC so the specific PWM range is outputted. Use a volt meter to see. But, a speed of 127 is essentially half of 255, which would be 1.65v on a 3.3v micro
2. Direction change, works great. Awesome
3. Brake, I dont use but my board is +2.5-5 volts. Okay, if you don't use brake then don't connect any wires. Select some unused port and you'll be fine
4. Joystick contolled so it's not just forward, left,right but also 45" Forfard and L/R I'm not sure what you mean by this, so I'll guess again. Are you using a joystick robot skill? If so, ensure the analog stick is being used. Also ensure the variable speed setting is enabled.
5. Doesnt play well with Tracking, needs to Any Movement Panel works with camera tracking. View the camera device robot skill manual for more information and/or follow tutorials to learn how the settings. There are many options and it may require a bit of reading the question marks and explanations to understand the settings.
6. needs to work with Leanardo, without ez-b 4. using LattePanda. Synthiam ARC connects directly to Leanardo on lattepanda, long as the firmware is installed on it and the correct port is specified. Here is more information: https://synthiam.com/Support/Hardware/LattePanda
7. Needs to work with navagtion and or SLAM All movement panels work with navigation and slam, such as the Intel T265. You can click on the words Movement Panel and read what a Movement Panel is. There's really good getting started guide in the Support section that explains more. However, Synthiam ARC uses robot skills that are all compatible with each other.
see Above
From your answer it sounds like PWM is settable! Great, where. Looking at the "Brushless Motor Movement Panel" I cant see how? I do see a slider which would be great if it stayed set. If I use Tracking with Speed Settings set pwm 55, its full blast, Danger< , There is a place to set PWM but doesn't hold. It would be Awesome if the PWM was limited in this skill by a Box with a number but if the other skills can change that setting , Im not sure
If I use variable movement control it goes to full speed pwm 255, overriding the brushless motor controller settings. So that is not usable at this time. I was trying to explain that I would like to control movement in directions other than just N,S,E,W. but NE NW,SW,SE..... Like it would if I was using a joystick, like I am!
Speed settings in movement Tracking doesn't hold when set. note says 'only works with movement panels that support speed'.?
When I first set up LattePanda I was using just it and the Arduino board. It would, Arduino, would not control motor controller correctly. Tried several things including rechecking hookup and moving ports D0 and D1 to other ports, but just would not work. It is now running with ez B v4 from the LattePanda. Yes, I reflashed board too.
Thanks for all your help.
1. From your answer it sounds like PWM is settable! Great, where. Looking at the "Brushless Motor Movement Panel" I cant see how? I do see a slider which would be great if it stayed set. If I use Tracking with Speed Settings set pwm 55, its full blast, Danger< , There is a place to set PWM but doesn't hold. It would be Awesome if the PWM was limited in this skill by a Box with a number but if the other skills can change that setting , Im not sure PWM is adjustable because it is a range between 0 and 100%. For example, a number 50% is between 0 and 100%. So if PWM is set to 100% and the micro is a 3.3v micro, the output would be 3.3v. If PWM is set for 50%, it will be 1.65v. While you can limit the PWM by limiting the speed, it's probably not the most advisable way to do it. I sure wouldn't go about it that way for a reliable solution. I'd recommend using 2 resistors and creating a voltage divider.
4. If I use variable movement control it goes to full speed pwm 255, overriding the brushless motor controller settings. So that is not usable at this time. I was trying to explain that I would like to control movement in directions other than just N,S,E,W. but NE NW,SW,SE..... Like it would if I was using a joystick, like I am! Analog joysticks and any device that uses an analog setting will control the speed of a movement panel. If you see the sliders move, it is adjusting the PWM. You're probably not experiencing much speed difference because the output of the PWM port is higher than the 1.5v it requires. So a voltage divider makes the most sense.
5. Speed settings in movement Tracking doesn't hold when set. note says 'only works with movement panels that support speed'.? The robot skill in question supports speed. And I believe you're referring to the variable speed setting of the movement tracking? In which case, set the speeds you wish to use.
6. When I first set up LattePanda I was using just it and the Arduino board. It would, Arduino, would not control motor controller correctly. Tried several things including rechecking hookup and moving ports D0 and D1 to other ports, but just would not work. It is now running with ez B v4 from the LattePanda. Yes, I reflashed board too. I'd make sure you can identify that the ports are working. Use a volt meter and enable/disable ports to find the correct ones - to ensure your latte panda works. I provided a link in my previous response.
Really it sounds like you just need to get the speed working with the PWM wires and that solves all of your challenges. I'd use a voltage divider circuit because simply relying on limiting the voltage by limiting the speed to 127 isn't really reliable or safe.
Here's a video demonstrating the Movement Panel in question using movement speed... Notice the speed sliders moving when the joystick is moving in different directions and at different speeds.
PS, here's your voltage divider resistor values... This will go from 3.3v to 1.5. I recommend using two 1k ohm resistors. The website for the calculator is here: https://ohmslawcalculator.com/voltage-divider-calculator
So connect the input voltage on this schematic below from the PWM port goes to +. The - will be GND. And your output between the R1 and R2 goes to the PWM input on the motor controller. That way, you can use ARCs full 0-255 for speed and not worry about managing the speed in software.
controlling two hoverboard motors with Lattepanda with Leonardo board as in manual. Output at pins D0 and 3 go High and low with direction change, as they should. Pins D1 and D4 only output is when speed sliders are half way or higher. Not a linear output and its a full 5 volts. DTR is set and have also tried RTS, output at pins 1 and 4 the same. At this time I have no other skills on, just brushless motor controller. Have also check arduino and reflashed code 4 times now. It will however work if i run though ezb v4, with reflashed Leonardo hooked directly like in manual. Would like not to use if I can get this to work as advertised. Anyone have any ideas or have run across this before?
Thanks in advance.
Scott
Why duble poste?
https://synthiam.com/Community/Questions/Brushless-Motor-Controller-v3-20688
Merged the duplicate posts. Question was answered above
Sorry to be difficult! Just wanting an answer how a pwm output is not a linear one. I got to fly my drone today and can’t imagine controlling with just and on/off throttle. Would like to know if I don’t have an issue with my board but everything I’ve done leads to a code issue. Thanks for the help
Scott
PWM is not on/off. A PWM is a variable between 0 and 100%. The 0 is 0 volts (gnd) and 100% is the vcc of the microcontroller. If the microcontroller is 3.3v, then 100% pwm will be 3.3v... and 50% pwm will be 1.65v. In most cases, your micro will be 3.3v, not 5v. So it is safe to consider the PWM range to be between 0 and 3.3v
What it sounds like is your brushless motor controller PWM line requires a 0-1.5v control. So you'll need to create a voltage divider with 2 resistors on the pwm line. If not, then you still have control but only let the speed go to 50% (which is 50% pwm).
You see, speed control is relative to the type of motor controller you use. In some cases, the speed parameter is sent to the speed controller using a digital serial signal, or pwm, or some other method. In your case, the speed is controlled by a PWM. This means if the speed on the Movement Panel is 50%, then a 50% pwm voltage is sent.
You might need to read my responses a few times if it isn't making sense yet. Perhaps a good example is to connect a volt meter to one of the I/O ports of your micro. Add a PWM robot skill and move it to see how the voltage varies. Play with it to learn what PWM means and how the brushless speed controller uses the PWM ports. Here's a link to the PWM slider: https://synthiam.com/Support/Skills/Pwm/PWM-Slider?id=16047
(There are also a few videos that explain in better detail how PWM works). AND again remember, the speed of your brushless motor controller uses PWM - Which is why you have to select the PWM port in the config settings.
DSBaily, i think the problem is that you are using pins D1 and D4 which are not pwm on the Leonardo.
Oh that could contribute as well. The arduino documentation says leonardo pwm pins are 3, 5, 6, 9, 10, 11, 13
get the list from here: https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/
He’s also mentioned some 1.5v pwm speed control limit on his controller. If that’s a real thing, the voltage divider is necessary
I know that PWM is not 0 or 1! That's the point... I've read everything you have sent and that is why I'm still questioning the output of the "brushless controller". The output when hooked up with Leonardo as the instruction states is 0volts or 5volts on pins D1 and 4 when slider is pushed passed half way. confirmed by voltmeter and Oscope. I have no PWM. So the question is, do I have a bad board or the skill is broke, Arduino code issue or I don't know what the heck I'm doing. This isn't my first use of PWM and think I have a good understanding which is why I think I have an issue. I have tried other pinout configurations with similar results. Can you please verify controller skill is not broke? If not please give me guidance to troubleshoot my output so I can tell whether board is bad, which would be weird since I do have an output or I don't know what I'm doing!! I can send a video if you'd like. As far as I understand pins D 0-13 are all digital output pins. Thanks for your help!
I can 100% confirm the brushless robot skill is not broken. It uses pwm to control the speed and I verified that it indeed works.
Try using one of Leonardo’s actual pwm pins as stated above (not d1 or d4)
Thanks! Doc’s I have are different!! That’s what it was! Thanks
wonderful to hear! Now you have speed control - so everything will work as designed
Thank you DJ and proteusy for all your help. Blinded by the details! I appreciate your patience.
Scott
Glad to help! Take care.