Propeller Levitation

Hi, im not sure if this is the right thread but, im trying to create a levitating propeller that levitates at a setpoint (chosen known distance from vertical platform) and im having trouble trying to control the motor. I am using a brushless dc motor, arduino uno, and a ultrasonic sensor. Is there a way to control the motor without a potentiometer?

Im not much of a programmer but i am thinking of something along the lines of:

setpoint = 30
pid for motor
//motor turns on
if sensor (not equal) setpoint
if sensor (less then) setpoint
increase motor speed
else // sensor (greater than setpoint)
decrease motor speed
else // (sensor = setpoint)
hold motor speed
end

Can you simply tell the motor what velocity you want and then hold its speed using a delay? The goal is to use a pid controller for the motor to optimize its performance to reach its setpoint.

Look into PWM motor speed control using the analogWrite() function.

Can you simply tell the motor what velocity you want

What is the motor supposed to do with 300 feet per second?

Hi bparkery, welcome to the forum.
Do you have the brushless motor now?
Typically, these are controlled using an electronic speed control (ESC) from the radio control hobby.
Do you have an appropriate ESC for your motor?

I am curious about your physical configuration. You have mentioned a propeller in a singular sense. Are you intending to use one motor and propeller? Many people who want to make something hover use 4 motors in a quad-copter configuration.

bparkery:
im trying to create a levitating propeller that levitates at a setpoint (chosen known distance from vertical platform)

What will this propeller do? Lift something?

While it is good to learn, you could look at leasing the job to another user here. However, it's not free.

The goal is to use a pid controller for the motor to optimize its performance to reach its setpoint.

A motor runs most efficiently at a certain rpm. To optimize this you would need a custom propeller.
The arduino can though keep it at a certain altitude.(With a adequate motor driver and battery.)