If the motors are still these: Amazon.com: 35KG High Torque RC Servo Digital Servo Waterproof Full Metal Gear Steering Servo with 25T Servo Horn Compatible with 1/8, 1/10, 1/12 RC Car Crawler Robot Control Angle 180° : Toys & Games
In that case these can be hooked up directly to a GPIO. They are NOT driven with PWM, though, so any digital output will be fine; it doesn't have to have PWM capability.
Driven by voltage, controlled by PWM.
It's most likely to be "servo PWM", IDK if that has a special name.
It's PWM at 50 Hz with a minimum duty cycle of five percent and a maximum duty cycle of ten percent if you want to look at it as traditional PWM.
Unusually ppl just say a pulse varying from 1 millisecond to 2 milliseconds delivered every 20 milliseconds. Or 50 Hz.
If you use the servo library, you do not need to use an Arduino PWM capable pin.
HTH
a7
See @alto777 's response above. It's technically a modulated pulse alright, but generally when we talk about PWM we mean the kind that's generated with Arduino's 'analogWrite' function. In this case it's the kind of PWM generated with the Servo library: https://www.arduino.cc/reference/en/libraries/servo/
The good news is that this gives you more freedom to choose a digital output pin.
ohh ok I understood now, thank you for the clarification @alto777 @rsmls .
I believe for now all is clear, we should proceed with procuring the parts, waiting approval from the university.
In regard to the transceiver, I was checking if we switch to Xbee S2b pro, for have a link with ground station, do you have a suggestion on which antenna to chose? its gonna be an open field during the launch, do you have a recommendation for the Antenna?
And one last note, I saw that it is possible to connect and ESP32-CAM to the arduino nano since it cannot handle a cam on its own, can you confirm this please, and do you see an advantage to switching to a different controller from the nano? with all these peripherals connected to it.
Thank you again!
Can't be of much help about the Xbee antenna, apart from that I'd actually use a physical antenna and not rely on a PCB-printed/integrated antenna.
Technically, yes, but it's a bit like having a Volkswagen Polo to get around, hitching a trailer behind it and putting a big Ford F150 on the trailer so that you can take the Porsche for a spin sometimes. It'll work, but it begs the question why you're hauling a big Ford around on a trailer all of the time and whether the Polo has any purpose, really.
If you're going to do something with video data, I'd consider upgrading from the Nano to a more powerful platform (ESP32, or maybe a single board computer like a Pi) and building the whole system around that. Frankly, if flight time is limited and hence power consumption / battery lifetime is of secondary importance, I'd probably lean away from Arduino and look at a Raspberry solution instead, especially if you're starting out.
I'm not sure if the prof. would be willing to switch to rasberry pi at this stage, also to be honest I have no experience working with Pi, as I understand they do not read analog data directly? I know its not gonna be a very efficient design. Will try to suggest either way. as I understand it PI boards don't accept analog sensors, we need to add other parts to make it adaptable?
Also I was thinking maybe for example upgrading to Portenta C33, it should be able to handle all of the tasks better? or do u recommend a different arduino controller?
That's possible, I haven't looked into this. It's easy to add an ADC to a Pi using its I2C bus; e.g. the ADS1115 is a popular 4-channel ADC that is commonly available on a small module board.
But it's also entirely possible to have the ESp32cam piggy-back on a Nano-based system. It's a little odd, in a way, but in principle it'll work.
Yes, for instance. There are many options!
ok I'll check it out, and check with the prof. if they're interested in making the switch to Pi.
I wanted to ask you, do you have any idea how can I calculate the data transfer rate I can get from my Xbee Pro S2B, and how much data I'll need to transfer from the sensors that I have connected? I don't have much of an idea how to approach calculating this.
I've found this file.
link Budget analysis.pdf (79.3 KB)
however not sure how to apply it for my case.
Dive into the datasheet of the product, work out what the practical limits to datarates are etc.
That's up to you to decide, really. The main choice is the refresh rate. You only have a small handful of sensors, so you're looking at fairly small amounts of data per measurement. The question is how many measurements you want/need to perform per time unit. Then use that to work out the requirements on the communication channel.
But since you have a dedicated thread on this, perhaps you should continue there: Need help in ground station to rocket model communication
@rsmls Thanks a lot! it's clear now the steps I need to do, I'll do some reading on my own and try to understand it better and how to apply it.
much appreciate the help!
usually in the forum should I post the networking part on the networking category or continue all the information on the same thread? as I understood same topic should not be posted in different categories however different aspects of the topic should be posted according to its category? can you clarify this?
There's a tendency on this forum to stimulate people to bunch follow-up questions about the same project together in the same thread, even if that doesn't neatly fit in the categories.
But it's better to ask the moderators about this; maybe @UKHeliBob or @PerryBebbington could chime in.
ok thank you @rsmls , yes that would be good if they can chime in on this, to avoid any mistakes on the forum.
Anyway I think I have much to read and work on for the coming 2 days, hopefully by Monday will revert back with an updated.
Thanks a lot for the continuous help!
I wanted to ask you regarding the motors, do you think it is better to connect them using the following:
if you are talking about your servo PWM controlled servomotors, then no - the product is for
For Motors, Solenoids, LEDs, etc
and "etc" does not include servos.
Wire power to the servo directly. the logic signal is attached to an output pin.
The Adafruit product is for devices that do not have power switching built in. It is a nice board, but in essence no more than a good MOSFET in a (I assume) proper circuit.
Servos have that or its equivalent in the power part of their internal circuitry.
The most important part cannot be overlooked, no matter you ever don't and things still "work" - servos need adequate power which should be routed directly to the V+ input.
a7
ok thank you @alto777 ! this point is clear now.
@rsmls I'm trying to calculate the data capacity for all the sensors in order to ensure that my arduino nano can handle it as well as my SD and Xbee.
Can you please check my calculation and advise if I'm missing something?
Data Load Calculation - organized.pdf (105.9 KB)
Link Budget Calculation.pdf (118.0 KB)
I'm getting a but confused regarding the maximum data rate of the Xbee, since in the calculation for the maximum using the baud rate I'm getting a value that is much higher than the theoretical value of 200 Kbps.
Start by determining how many samples per second you actually need from each sensor. I don't think your application actually requires you to sample at the highest possible acquisition rate.
@rsmls thank you for your reply.
yes I'm checking the sample per second, I just wanted to confirm if the approach is correct. I will fix the numbers once we know for sure. Also I wanted to ask you if it is a problem, coding wise to have different ODR for each sensor? does it make it extremely difficult to manage the data and results if I'm having different ODR for different sensors or it can be done.
It can be done fairly easily in a number of ways. I wouldn't worry about this too much. Just keep in mind that a Nano has limited memory to temporarily accumulate data, but I guesstimate that it'll be sufficient overall (not counting video data; that would throw all bets off).
