本帖最后由 HKing 于 2020-3-6 12:19 编辑
统一此楼回复,我也新手,只是找点新玩法。电池板是sunpower的,比老版的焊接方便多了,而且能轻微弯曲,裂了还能用,而且保持整体,不像原来碎成渣渣。机体基本是3mm depron板,轻,可以用砂纸打磨。小机子用电池有些多余,而且失去了纯太阳能电池版的乐趣,加电池的一般是长续航加飞控地面站的用,有个飞了80多个小时,电容的也撑不了多久,单片机时刻监控电压不能太低,要以牺牲动力为代价,电调和接收都不能重启,起码能可控滑翔。8块电池板总共差不多8-16w,受太阳光影响很大,现在早上11点多电流3A左右,夏天中午1点多是光照强度最强的时候。
一般都用低kv大电机来保证扭矩和力效,但这个机子小,不用太在乎,毕竟电流要用充分,原版400多克的那个机子,电机好像就60-70克多,算超大的了。
电池板先把前后缘蒙住黏住,在中间再蒙一层,能保证电池板强度,玻纤超薄,透光性不错,没什么影响。8s电池板的有飞翼的,190克,可后空翻
这是电路图,因为我要用开发板改程序省事,所以接线乱了些
烧录步骤也写下吧:驱动自己度吧
首先,下载个arduino
首选项里填写此地址 http: // digistump.com/package_digistump_index.json
下载这个
选择1mhz,省电,别的频率需要自行改程序频率,比如下面TCCR0A = B00000010改为100
下面是程序,arduino,适合8-12s电池板,具体要调根据阳光,舵机最好别用数码舵机,耗电
/*MPPT v6.3 for F5E RC Solar Airplane
pin2 solar voltage coming off a divider. 1.1v max. 300k and pin2 across 47k to ground
pin3 rc input comeing from rx
pin4 rc output going to esc
Sergey Vekli and Ted Luginbuhl
__ __
Reset -|o \/ |- VCC
3 Rx -| |- 2 Solarvoltage
4 ESC -| |- 1
GND -|_____|- 0
*/
//#include <avr/wdt.h> // Watch Dog Timer
#define Vmpp 0.55 // good setting: 0.84 for 12 cell and .55 for 8 cell. If too low motor will be faster at less than full throttle.
#define VmppLOW 0.63 // low throttle mpp voltage. 0.97 seems to be good for 12 cell and .63 for 8 cell.Set so that motor cuts off when parallel with suns rays.
#define STEPdown 2 //default 2 If too high throttle will oscilate, if too low esc will reset
#define STEPup 1
#define iterations 15 //default 15. This is how many times the algo averages the array voltage.
#define transition 150 // point at wich transition takes place from Vmpp to VmppLOW between 110 and 230. Default 150.If too high it will kick in too soon and mimick Vmpp set too low.
#define LOW false
#define HIGH true
int x = 0;
int Vcell = 0;
int VMPP = 0.00;
int VMPPlow = 0.00;
boolean cur_level = LOW;
void setup()
{
// wdt_enable(WDTO_500MS); //Enable Watch Dog Timer.
// set pins mode
pinMode(4, OUTPUT); //going to esc
pinMode(3, INPUT); //coming from rx
//convert Vmpp to adc levels
VMPP = Vmpp * 925;
VMPPlow = VmppLOW * 925;
//set freq and interrupts registers
GIMSK = B00100000;
PCMSK = B00001000;
TCCR0A = B00000010;
TCCR0B = B00000010;
TIMSK = B00010000;
OCR0A = 110;
analogReference(INTERNAL1V1);
}
//main control timer
ISR(TIMER0_COMPA_vect)
{
if (cur_level == HIGH)
{
digitalWrite(4, LOW);
cur_level = LOW;
}
TCNT0 = 0;
}
//interrupt for rx repeater mode
ISR(PCINT0_vect)
{
if (digitalRead(3) > cur_level)
{
digitalWrite(4, HIGH);
cur_level = HIGH;
TCNT0 = 0;
}
else
{
if (cur_level == HIGH)
{
digitalWrite(4, LOW);
cur_level = LOW;
}
}
}
//main measurement-set cycle
void loop()
{
//wdt_reset(); //Pat the dog
if (OCR0A <= transition) // throttle level at wich higher Vmpp kicks in else statement.
{
x = VMPPlow;
}
else
{
x = VMPP;
}
Vcell=0;
for (int XX = 0; XX < iterations; XX++) //iterations for average array voltage.
{
delay(1);
Vcell = Vcell + analogRead(A1);
}
Vcell = Vcell / iterations;
//Vcell=analogRead(A1);
if (Vcell > x)
{
if (OCR0A <= 230 ) //230
{
OCR0A += STEPup;
}}
if (Vcell < x)
{
if (OCR0A >= 110) { //110
OCR0A -= STEPdown;
}}
}
|