Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing motor output #7

Open
awright424 opened this issue Apr 15, 2023 · 8 comments
Open

testing motor output #7

awright424 opened this issue Apr 15, 2023 · 8 comments

Comments

@awright424
Copy link

Is there any test/examples on how to test the motor output only? if I dont need the nrf modules will the board stil work without those populated?

@dridri
Copy link
Owner

dridri commented Apr 15, 2023

Hello, if you let me a few days I can implement it. Generating pre-built images and giving some testing config files

@awright424
Copy link
Author

Thanks. the major thing I need to know is if the nrf modules aren't populated will it cause issues with the pcb. Where did you have the boards built as well. it looks like oshpark pcbs

@dridri
Copy link
Owner

dridri commented Apr 15, 2023

None of the modules nor ICs are mandatory, as the software is fully configurable to choose what to use. You could even actually use a regular Raspberry Pi board and connect breakout boards to the pins header.
I ordered my board from JLCPCB, cheaper here in Europe

@awright424
Copy link
Author

awright424 commented Apr 15, 2023 via email

@awright424
Copy link
Author

I know you have been busy, did you get a chance to add testing of motor outputs? I also had the pcb manufactured just need to add components. Is there a chance of having a bom that can be used with mouser etc? I tried the one in the pull request and tried using there bom tool but it seemed like it didnt import correctly.

@dridri
Copy link
Owner

dridri commented Jun 21, 2023

Hey, sorry for the (very) late reply. I finished the image builder script, and working on a console interface directly in the flight controller allowing to access anything (including motors). Should be ready in the next 24hrs after some tweaks.

About the elrs chip, it seems to use generic UART communication bus so you should be able to directly solder it on the UART0 solder pads of the PCB.

However, I don't know what kind of data it sends via the bus, you will probably have to make your own Link class. (like what https://github.com/dridri/bcflight/blob/master/flight/links/SBUS.cpp does, the ::Read() function receives data from SBUS then returns a Packet containing at least the ControllerBase::CONTROLS command [+ some fancy math conversions and clipping])

@dridri
Copy link
Owner

dridri commented Jun 25, 2023

Finally finished !

If you don't already have a working setup, you can find a prebuilt image here : https://github.com/dridri/bcflight#pre-built-images. This should be ready to use without any modifications.

The motors outputs are set to PWM-500Hz on pins 4,5,6,7 by default. You can change that in the /var/flight/config.lua file.

Once booted, SSH into the Pi using root:bcflight then go to /var/flight and start the flight controller using ./flight. This should end up on the new console interface after loading.

From this console, you should be able to spin any motor simply by using the following prompt :

flight> frame.motors[1].speed = 0 -- Set to 0 on the first time, this will arm the ESC
flight> frame.motors[1].speed = 0.25 -- any value between 0.00 and 1.00

This new console interface is all-new, so be sure to remove the propellers and/or secure the drone/motor on your desk

@awright424
Copy link
Author

Finally finished !

If you don't already have a working setup, you can find a prebuilt image here : https://github.com/dridri/bcflight#pre-built-images. This should be ready to use without any modifications.

The motors outputs are set to PWM-500Hz on pins 4,5,6,7 by default. You can change that in the /var/flight/config.lua file.

Once booted, SSH into the Pi using root:bcflight then go to /var/flight and start the flight controller using ./flight. This should end up on the new console interface after loading.

From this console, you should be able to spin any motor simply by using the following prompt :

flight> frame.motors[1].speed = 0 -- Set to 0 on the first time, this will arm the ESC
flight> frame.motors[1].speed = 0.25 -- any value between 0.00 and 1.00

This new console interface is all-new, so be sure to remove the propellers and/or secure the drone/motor on your desk

will do. I assume if I have a gy-91 module, mpu9250, I can use it with breakout board for the time being? I have the pcb's. the bom is the current problem I have. I would rather build the board to make sure things are as they should be. plus I have a cm4 for this reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants