Aller au contenu


OliveaCaen

Inscrit(e) (le) 21 avril 2023
Déconnecté Dernière activité mars 03 2024 04:41
-----

Messages que j'ai postés

Dans le sujet : Test LD06 library

03 mars 2024 - 04:43

@mike118
Merci pour la mise à jour , je ferais un test dès que possible !

Dans le sujet : Test LD06 library

08 mai 2023 - 03:10

 

 

when fullscan is disabled strange things happen , it's worse .. only a few points ... 1-5° then skip to 355-359 .. 

I think there is a mistake somewhere , it's only reporting one packet ( 12 points each time ) entered around 0° . 

 

I did enable afterward : 
-  getSpeed() : reporting ~3600 ( 10hz )

- getAngleStep()about 0.8°

- getNbPointsInScan() : is reporting always  12 points only not a full 360 

 

 

Your code looks very promising with so many features to explore :) 

 

I tried PWM some dedicated code on my Ustepper with no luck , no error but no speed change .. 
 

#define pin PA6 // Pin for PWM
void setup() {

  // no need to configure pin, it will be done by HardwareTimer configuration
  pinMode(pin, OUTPUT);

  // Automatically retrieve TIM instance and channel associated to pin
  // This is used to be compatible with all STM32 series automatically.
  TIM_TypeDef *Instance = (TIM_TypeDef *)pinmap_peripheral(digitalPinToPinName(pin), PinMap_PWM);
  uint32_t channel = STM_PIN_CHANNEL(pinmap_function(digitalPinToPinName(pin), PinMap_PWM));


  // Instantiate HardwareTimer object. Thanks to 'new' instantiation, HardwareTimer is not destructed when setup() function is finished.
  HardwareTimer *MyTim = new HardwareTimer(Instance);

  // Configure and start PWM
  // MyTim->setPWM(channel, pin, 5, 10, NULL, NULL); // No callback required, we can simplify the function call
  MyTim->setPWM(channel, pin, 30000, 10); // 30 Khz, 10% dutycycle
}


Dans le sujet : Test LD06 library

06 mai 2023 - 03:03

Ok ... I finally had some time to proceed with the latest version : 

 

Results are not good , I definitely think the Stepper S32 is not powerful enough  , in full scan mode still skipping points in the usual range , no change .. 

 

when fullscan is disabled strange things happen , it's worse .. only a few points ... 1-5° then skip to 355-359 .. 

 

I had no chance to try PWM , there a library for STM32 ( STM32_PWM ) , will try it separately to see what I can do with it :) 

 

For now I will concentrate on modelling the 3D part for my project and do some 3D printing . and I think ordering a Teensy 4.1 will solve my problems . 


Dans le sujet : Test LD06 library

27 avril 2023 - 08:00

Great News !  thanks again , I will also read on my side about STM32 PWM ... to try to sort it out . 
 


Dans le sujet : Test LD06 library

26 avril 2023 - 04:50

Hi Mike, 

 

Thanks again , the inconsistency was not related to your code ! one welding was bad on the data line :( sorry for that. 

 

but the result is still the same, when fullscan is enabled , jumps from 14-16 to 150-160° ... so no change on this side for me ... 

 

I think anyway that I will probably switch to Teensy 4.1 soon, as I should be able to control the UStepper S32 ( and also use a cheaper version / or Chinese) . 

 

Teensy would also give me the possibility to save data directly on a µSD card , and use Ethernet .. to transfer data directly . 

 

Many thanks for your work again this is awesome !