Hi,
its possible to a isolated current sensor? There are some available for Arduino?
Thanks
Hans
Hi,
its possible to a isolated current sensor? There are some available for Arduino?
Thanks
Hans
Hello guys!
Here is the first (very alpha) version of the software. Does not have Enable input, and current sensing...
at 72MHz the PID frequency reached is around 60kHz...
Tools used:
1. eclipse Mars.1 Release (4.5.1)
2. gcc-arm-none-eabi-4_8-141002
3. eclipse plugin: GNU ARM C/C++ Cross Development Tools (filename: ilg.gnuarmeclipse.repository-2.9.3-201508190739.zip)
4. CoreUtils, Coreutils-090604.msi
5. OpenOcd 0.9.0
enjoy...
Mihai
It's me again...
Here is a better version of the firmware... has also current sense in place... and the enable signal input...
Code it's a mess, very little comments and very ugly written... Sorry about that... I am not a C developer...
The PID Frequency has decreased to 48kHz after adding ADC in interrupt mode... I do not think DMA mode ADC would do in out case as we need very little lag in measuring the current...
Anyway, it's pretty accurate... and 48 kHz it's really nice...
enjoy video...
Mihai
https://www.youtube.com/watch?v=3pDLmSwuHiU
Thanks for publishing the code. And don't be too hard on yourself, your code was very readable and actually I'm impressed how simple the firmware actually is. I was able to compile it right away. I did not upload it to actual hardware as I don't have anything suitable on the table right now, but will do maybe tomorrow.
The tuner software is a bit trickier for me as I don't own a Windows PC at the moment.. I tried running the code on Linux with Mono (Opensource alternative to MS C# runtime libraries) and after a bit of commenting your code (had to remove the chart area and customprogressbar which seemed not compatible with Mono) I was able to launch the gui at least. But having no hardware I cannot say for sure if the USB connection works. I'll come back to you when I know.
Thanks for your hard work!
Pekka
Hmmm... The code for the tuner program uses lots of references to usb hid dlls from windows... I do not think they will work on Linux. However the app is simple... I bet there are already made programs for linux that can send simple texts to a usb hid device... The only thing that is not text is the servo response matrix.
Mihai
Yet another issue...
The STEP / DIR inputs are mapped right now to Ext Interrupts... From what I've read it's possible to configure the Tims in encoder mode and read a pulse + direction signal... strange but I did not managed to do that yet... all I can get in the tim3 register is the direction change...
I am working on that now...
Mihai
hello Mihai
I am really impressed at your project, I'm sure it will be work perfectly. I have a question, do you plan add "step multiplier "option ? Sometimes if encoder resolution is to big the Mach3 will not be able send step signal as fast as need.
Kamil.
Should not be a problem to add such feature... Also there are several modes to count encoder pulses... Right now we count all (both raising and falling on both A and B channels), but the encoder counter could be configured differently also...
Will add in the next version a configurable step multiplier. I guess 1 to 10 should do...
Mihai
Hello Mihai,
in what kind of way can the controller check the rotorposition, when the controller is switch on the first time?
There are no inputs for hallsensors or similar.
Thanks
Hans
I've been investigating the bootloader embeded in the ROM of STM32F103 MCU. It only supports USART so it's not really useful since we already have USB. So I modified and compiled a USB DFU mode bootloader (taken from ST website: http://www.st.com/web/en/catalog/tools/PF258157) in order to have the USB firmware upgrade feature... The servo firmware was modified to be able to enter the new bootloader from program.
The bootloader code was compiled in IAR (I was too lazy to setup the project in eclipse...), but it is very little and I think you can compile in the Demo version of IAR.
Also we might add a jumper in order to put the device in the new bootloader mode (BOOT0 and BOOT1 pins can not be used because they put the cpu in the embeded bootloader)
I will come back with code, schematic and compiled firmwares...
Mihai
PS. I have in mind to set up a folder in some webserver folder and to add the "update from internet" feature to the Servo Drive Tuner program...
Power is applied to 2 inputs of the motor in a gradually mode on initialization. This will move the rotor to a known position. (yes, it's a minus but I do not really care because I always remake the HOME reset on my cnc on powerup)... From there the angle of the shaft is computed from the encoder position and the number of PPR of the encoder...
Check out function PWM_Init_Motor from unit pwm.
If some want to use hall sensors, the code in function PWM_Set_Duty must be changed. The values in p1, p2 and p3 must be taken from the Hall sensors and not my commutation tables... That's all...
Mihai
James hosts the single best wiki page about steppers for CNC hobbyists on the net:
http://www.piclist.com/techref/io/steppers.htm Disagree? Tell him what's missing! ,o)
Hello Mihai,
many thanks for your answer. You are a super software developer but It`s not possible for me to write one line of code. I want only know the prinzip of checking the rotorposition.
Thanks
Hans
Hello guys!
Here is the latest code for you!
It contains:
1. Bootloader code and binary file.
2. Firmware code and binary (debug version).
3. Servo Tuner Utility code and binary.
There is a new feature, maybe someone may want to add some jumpers to the schematic. If you link the pin PB1 to 3.3 V and reset the mcu it will enter USB DFU Bootloader mode. The program is capable of entering bootloader mode with the command "UPG".
Also there is a Step multiplier field as requested...
In order to flash the first time you will have to flash via StLink with the images: BootLoader.bin and F103ServoDrive.hex (order is not important). Then you can upgrade firmware from USB from the Servo Tuner Utility (Menu File > Update servo firmware)...
Please note that you will need dfu files in the Servo Tuner Utility. You can convert HEX files to dfu files using DfuFileMgr.exe utility included in ST app from link: STSW-STM32080 DfuSe USB device firmware upgrade STMicroelectronics extension: contains the demo GUI, debugging GUI, all sources files and the protocol layer (UM0412) - STMicroelectronics
Mihai
PS: I'm still waiting for a board... please... share your works...
If you compile in release mode you get a PID frequency up to 54 kHz...
I'm trying to finish
Nice work... I can not tell I fully understand... Where is the USB connector? Why the 15 pin connector?
Anyway... I am waiting for someone to make a nice PCB for this project... I am interested in buying some...
The idea of to have 2 boards (one for low power logic and one for high power part) seems to be very nice... One on top of the other with some connectors between them...
It would be super cool!
Mihai
Hi,
I think the board will be createt with the minimum development board. Some hobby machinists or electronic are not able to solder smd parts. I thinks its a good idea to make a power pcb and a isolated controller pcb with a isolated current sensor. Maybe the power pcb with integratet bridge like IRAMX20xxxxxx and a control of the integratet thermosensor.
Thanks
Hans
May I make a suggestion on the PCB? One barrier to entry which will keep a lot of people from trying, testing, contributing to this project is the fine pitch SMT soldering required for that processor. If you could use an /existing/ development board as the basis for the PCB, assuming one exists, it would really help people to get involved. There is no reason why you can't /also/ layout a section for the actual processor, but providing an option to easily connect to an existing development board is an important step, in my experience. It could be as easy as simply providing well labeled "test points" so that a cable can be run from the dev board to the PCB in place of an onboard processor.
James hosts the single best wiki page about steppers for CNC hobbyists on the net:
http://www.piclist.com/techref/io/steppers.htm Disagree? Tell him what's missing! ,o)
Maybe a board like this will work.
Arm Cortex M3 STM32F103C8T6 Minimum System Chip Development Board STM32 48 Pin | eBay
Jeff...
Patience and perseverance have a magical effect before which difficulties disappear and obstacles vanish.
I'm sure that could be made to work... but ideally, it should be something that can be directly soldered in place, and that one, with the pre-soldered headers, would make that difficult. I was thinking of this much less expensive one:
STM32F103C8T6 Arm STM32 Minimum System Development Board Module for Arduino DHU | eBay
Or at least of something like that one. Where the headers can be put on the bottom, and are simple straight headers.
James hosts the single best wiki page about steppers for CNC hobbyists on the net:
http://www.piclist.com/techref/io/steppers.htm Disagree? Tell him what's missing! ,o)