Différences entre versions de « ENG-CANSAT-MISSION1-AUTONOMOUS »
(4 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 12 : | Ligne 12 : | ||
Don't panic, we will solve this in a minute ;-) | Don't panic, we will solve this in a minute ;-) | ||
− | == Removing the "Serial | + | == Removing the "Serial Connection Wait" == |
− | The serial | + | The serial connection is only useful when you need to track the debugging messages send by the Feather. |
− | As we are going autonomous... we do not need to wait for the serial | + | As we are going autonomous... we do not need to wait for the serial connection to be established. |
So locate the following lines inside the {{fname|setup()}} function of your "mission1-serial-radio-capture.ino" sketch (the emitter code running inside the CanSat). | So locate the following lines inside the {{fname|setup()}} function of your "mission1-serial-radio-capture.ino" sketch (the emitter code running inside the CanSat). | ||
Ligne 49 : | Ligne 49 : | ||
Compile and upload the modified version to your Feather. | Compile and upload the modified version to your Feather. | ||
− | Great! You are ready. The program would now starts without waiting for the Serial Monitor. | + | Great! You are ready. The program would now starts without waiting for the Serial Monitor. |
== Plug the battery == | == Plug the battery == | ||
It is now time to plug the Lipo in the appropriate connector. | It is now time to plug the Lipo in the appropriate connector. | ||
− | When the Feather is plugged via USB: | + | [[Fichier:ENG-CANSAT-MISSION1-AUTONOMOUS.png|360px]] |
+ | |||
+ | When the Feather '''is plugged via USB''': | ||
* The Feather runs over the USB power. | * The Feather runs over the USB power. | ||
* The LiPo battery is loaded from the USB. | * The LiPo battery is loaded from the USB. | ||
− | When the Feather is unplugged from USB: | + | When the Feather '''is unplugged from USB''': |
* The Feather is instantaneously powered from the LiPo battery. | * The Feather is instantaneously powered from the LiPo battery. | ||
* The LiPo battery is now discharging to power up the Feather. | * The LiPo battery is now discharging to power up the Feather. | ||
Ligne 71 : | Ligne 73 : | ||
{{ambox|text=This is an estimate. In real life, the current sink by the project is not constant so energy is not sink out constantly from the LiPo.}} | {{ambox|text=This is an estimate. In real life, the current sink by the project is not constant so energy is not sink out constantly from the LiPo.}} | ||
+ | |||
+ | == Conclusion == | ||
+ | You should now be able to unplug the Feather from the USB connector then still receive the telemetric data over the air :-) | ||
+ | |||
{{ENG-CANSAT-TRAILER}} | {{ENG-CANSAT-TRAILER}} |
Version actuelle datée du 2 novembre 2018 à 19:08
Introduction
Until now, we have worked with the emitter linked to a computer via USB cable.
Using the USB cable was very useful to capture the debugging message into the serial console.
As designed in the code, the Feather wait for the serial connexion to start the software.
This means that you cannot make your object flying into the CanSat without packing the computer together with the feather into the can... GLOUPS!!!
Don't panic, we will solve this in a minute ;-)
Removing the "Serial Connection Wait"
The serial connection is only useful when you need to track the debugging messages send by the Feather.
As we are going autonomous... we do not need to wait for the serial connection to be established.
So locate the following lines inside the setup() function of your "mission1-serial-radio-capture.ino" sketch (the emitter code running inside the CanSat).
void setup() {
Serial.begin(9600);
// wait until serial console is open, remove if not tethered to computer
while (!Serial) { delay(1); }
...
}
Then place the while under comment to disable it.
Proceed by placing a // in the front of the while instruction.
When done, the code should look to this:
void setup() {
Serial.begin(9600);
// wait until serial console is open, remove if not tethered to computer
// while (!Serial) { delay(1); }
...
}
Compile and upload the modified version to your Feather.
Great! You are ready. The program would now starts without waiting for the Serial Monitor.
Plug the battery
It is now time to plug the Lipo in the appropriate connector.
When the Feather is plugged via USB:
- The Feather runs over the USB power.
- The LiPo battery is loaded from the USB.
When the Feather is unplugged from USB:
- The Feather is instantaneously powered from the LiPo battery.
- The LiPo battery is now discharging to power up the Feather.
The feather will run until the battery is discharged.
At best, the battery have 4.2V and discharge until 3.0V (when LiPo the protection circuit shutdown the power.
The time it takes to discharge depend on the power requirement of your LiPo.
If the LiPo can store 2500mAh and a project requiring 130mA to run will last after 2500mAh/130mA = 19 Hour of working.
This is an estimate. In real life, the current sink by the project is not constant so energy is not sink out constantly from the LiPo. |
Conclusion
You should now be able to unplug the Feather from the USB connector then still receive the telemetric data over the air :-)
Written by Meurisse D. from MC Hobby - License: CC-SA-BY.