Im pretty sure the magnets are fine, if they were not diametrically magnetised they would not work at all ? Those are the magnets I’m using
https://amzn.eu/d/4KhNtYf
Search found 14 matches
- Tue Dec 27, 2022 6:31 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
- Tue Dec 27, 2022 3:05 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
Hey :)
Like "counter", "Direction" should be declared as volatile.
the counter was already declared as "volatile", I changed the direction to volatile just now.
It's probably better not to reset the "counter" when the direction changes, but it probably doesn't matter for the current use case ...
Like "counter", "Direction" should be declared as volatile.
the counter was already declared as "volatile", I changed the direction to volatile just now.
It's probably better not to reset the "counter" when the direction changes, but it probably doesn't matter for the current use case ...
- Mon Dec 26, 2022 11:47 am
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
Hello everyone, Merry Christmas and thank you so much for your help and especially for your patience with me. I have revised the code with your recommendations and hope it fits now. My test with some random high speed movements looked promising, the positions at the and was always correct ...
- Sat Dec 24, 2022 10:53 am
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
Yes, you are completely right, I was a bit hasty yesterday and didn't think things through properly.
- Fri Dec 23, 2022 8:38 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
so here is the full code (without Correction of the stepper position)
A Big Thanks @ozcar
#include <STM32FreeRTOS.h>
#include <Arduino.h>
#include <TMCStepper.h>
#include <Wire.h>
#include <AS5600.h>
#include <STM32FreeRTOS.h>
#if !defined(STM32_CORE_VERSION) || (STM32_CORE_VERSION < 0x01090000 ...
A Big Thanks @ozcar
#include <STM32FreeRTOS.h>
#include <Arduino.h>
#include <TMCStepper.h>
#include <Wire.h>
#include <AS5600.h>
#include <STM32FreeRTOS.h>
#if !defined(STM32_CORE_VERSION) || (STM32_CORE_VERSION < 0x01090000 ...
- Fri Dec 23, 2022 4:54 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
I took your last test program and modified it to alter the timer to count external signal, instead of using the internal clock. It did not take much to do that, but it is far from being a generalised solution. It does not make any assumption about which timer will be used, but does assume that the ...
- Fri Dec 23, 2022 4:43 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
damn the other stuff doesn't work any more with the board manager I set this up...
- Fri Dec 23, 2022 3:17 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
Im not 100% sure if this is the right approach, I basically copied this code "https://web.archive.org/web/20190316154745/https://www.stm32duino.com/viewtopic.php?f=18&t=3804"
and added a second Timer, please correct me if this is wrong
#include "Streaming.h"
volatile uint32_t counter = 0 ...
and added a second Timer, please correct me if this is wrong
#include "Streaming.h"
volatile uint32_t counter = 0 ...
- Thu Dec 22, 2022 8:02 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
40,000-80,000 inputs per second if that is possible. That would translate to a max speed of 500mm/s at 16-32 micristeps
the current code is able to process 8000 inputs per second, which is just around 100 mm/s
I took the frequency / duty cycle example, and changed it to only interrupt on ...
- Thu Dec 22, 2022 5:48 pm
- Forum: Projects
- Topic: STM32F103C8 Fast Input Rate Counter
- Replies: 23
- Views: 11482
Re: STM32F103C8 Fast Input Rate Counter
40,000-80,000 inputs per second if that is possible. That would translate to a max speed of 500mm/s at 16-32 micristeps
the current code is able to process 8000 inputs per second, which is just around 100 mm/s
the current code is able to process 8000 inputs per second, which is just around 100 mm/s