Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FPGA Oktokopter implementation

Status
Not open for further replies.

cleo claudiu

Junior Member level 1
Joined
Jun 17, 2011
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Cluj Napoca, Romania
Activity points
1,411
Hi guys,

I am participating to a electronic design contest, and my project is a helicopter with 8 brushless motors build around a Nexys 2 board, the helicopter will be controlled wireless trough radio waves from a Microcontroller board.

Also i am using for this project the following hardwares from Digilent
Gyroscope, Accelerometer, Radio Transciever, Joystick
My team mate will make the controllers for the motors.

This is the Oktokopter schematic block diagram :
oktokopter block diagram.png
This is the Base schematic block diagram:
The Base block diagram.png

So i have already started to work on this project, and i made the Verilog codes for gyroscope and accelerometer, I have some problems with that, but i will open an other thread about it.
Now i would need some help with the PID controller for the brushless mottors. If somene ca give me some useful information about digital implementetion of PID in FPGA -Verilog.
I am also expecting some general feedback about this project, and any recommendations will be welcomed.

Thanks!
 

Why not use a quad?
Less variables = easier, more reliable design
 

well, that was our first question also. But as I said, we are participating in a contest : Digilent Inc. - Digital Design Engineer's Source and the level is pretty high, so we thought that we have to come with something big and complex, so thats why we chose a oktokopter, and now there is no way back, we already have all needed hardwares, including the 8 brushless motors.
 

Do you have to use the Nexys 2 ?
 

Actualy yes, because we had a 200$ limit for the products requested. And the Nexys2 board is my personal board , so in this way i reduced the costs.
I am not intending to use EDK , just describe all in HDL, I am more confortable with it. But my big problem is the PID control. I couldnt find anything helpful related to PID in HDL.
 

Thanks for the link, i have opend the code, it seems verry helpful.

And yes, with a soft microprocessor would be more easy, but i don't have much experience with EDK - SDK , and beside it will be more appreciated as a good project if made in HDL
 

What is the "PROJECT" ?
When will you consider it to be complete ?
 

Well, the PROJECT is "The oktokopter" , and when it flies I will consider close to complete. But I have still a lot of work until then, and the dead line is in May, so I still have time too.
 

Having the FPGA control a simple PID loop to maintain hover is possible but won't be easy.
Your 8 motors will create a lot of vibration on the plattform. Because of this noise the raw data from your sensors may become unusable - and you'll need a complex sensor fusing algorithm - to do it completely in hardware is VERY hard.

Also if you want your system to be more complex and do "smarter" things (for example: return to base, autonomous waypoint tracking , etc...) then I strongly suggest you consider a hardware/software implementation.

What ESCs do you intend to use?
What sensors?
 

Attachments

  • controller.pdf
    33.3 KB · Views: 59

What is the Atmel for?
 

from FPGA I will send the PWM signal to Atmel, who will generate the apropriate signals to control the transistors, and motor. we are doing this so that the controller could be used with other master
 

Are you going to write the firmware for the ESC yourself ?
Why not use an of the shelf ESC with a high update rate and focus only on the fpga design?
 
One reason is that we already have exceeded our budget for the project(8 ESC will add an other 100$), and i will focus only in the fpga design, the ESC is my teammate job, so, he has a shot to do it, if it will work, good, if not, we will make some efforts and go to the shelf for the ESC.
So, as I see it, you don't give me many chances to succeed, but at least I am doing my best, and will succeed eventualy, even if not until May.
 

Or you can use the ever popular "Cheat" methodology. Buy 8 ESCs for $100, use that during development so you get up to speeds fast with something that actually works. When you have that you can work towards a solution where you do the ESC yourself. This is of course assuming the budget limit is due to the competition, and not due to "We don't have an extra $100 to spend on consumables". Essentially you'd be trading $100 for some accelerated development. Not sure if that's feasible, but just a random idea...

Cool project BTW! :)
 

I never said that.
If your design skills are good - I think you'll be able to implement a stable PID loop that controls the motor.
But, I think you should seperate the tasks of the PID and ESC.

When stepping into uncharted territory - always try to keep your variables at minimal.
You should first implement your PID loop and make sure it works with an off the shelf ESC.

DON'T test your PID design on an unproven ESC...you won't know the cause of the problems.
This is a good ESC:
**broken link removed**

Buy 2 of them.
Build a "seesaw" testbench (one that can only tilt) with only 2 BLDC motors - one on each end.
And start debugging your code. I'll be glad to take an active part in it!
 
You should first implement your PID loop and make sure it works with an off the shelf ESC.

DON'T test your PID design on an unproven ESC...you won't know the cause of the problems.

That! The idea to buy 2 and use it during development will save you a lot of headaches. And lets not even begin on the fun team dynamics where you blame your teamie for your collective failure, just because your development is hampered by the Oh-It-Doesnt-Work-Yet-Almost-No-Really-Almost-Done status of work on the ESC. As shaiko said, you want seperation of concerns. Get something known to work, and use that. At $17 a piece getting 2 should be doable I'd say...
 
Thanks for the advices, very well said.
My plan is :
1. To finish debugging my codes for gyroscope an accelerometer (I am almost done with it) and to make a PWM signal generator in order to: step 2
2. Meanwhile my teammate will finish his version of ESC, and with my PWM generator we will test it, and if will not work , we will go to the shaft and buy some.
3. Now we should have an ESC , even if is our, or even if is from the shaft and I could start making the PID control.
4. Building that seesaw with 2 motors and debugging the code.
5. Building the entire oktokopter and debuging again
6. Making the RF comunication
 

That's not cheating!
Your doing R&D...The competition budget is for the cost of "D" !
The competition will end and that capital D will stay in the basement.

The "R" on the other hand - will stay with you forever.

---------- Post added at 15:57 ---------- Previous post was at 15:50 ----------

-- VHDL code for pwm

if rising_edge ( clk ) then

counter <= counter + 1 ;

if counter = counter_end then -- this sets the frequency of PWM
counter <= ( others => '0' ) ;
end if;

if counter > pwm_value then -- this sets the duty cycle
pwm_out <= '1' ;
else
pwm_out <= '0' ;
end if;

end if;
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top