hi tivoidethuong
check these out for usb connection
File:STM32-sch.png - ElectroDragon
File:STM32-sch 02.png - ElectroDragon
good luck with pcb desining
see con5 in schematics
Actally i was thinking using encoder and hallsensor both as hall sensor for driving motor and encoder for positioning and I was planning to use two avr microcontroller one for driving motor with hall sensor and one for position controll with encoder reading and pid stuff but mihai has done really great by using only encoder that makes this project effective and cheap for us so my heartly thanks to mihai ! Thanks mihai my guru! One cool guy has really cool example on driving bldc with hall sensor (not position controll ! But we can use that in over project if you going for hall and encoder both )
http://elecnote.blogspot.in/2014/11/cd-rom-3-phase-sensored-bldc-motor.html?m=1
I used his code and made power bridge with ir2110 and used mc33035 datasheet for other commutation info
Hey please if anybody has experience with elm chan based servo then please help me with this
This is what I am using
http://sufnicnc.com/SMC.html
: max232 for serial
Attiny2313a-pu
putty serial terminal
I think he has hex of smc mode 3(position control)
Currently what is happening:
I get nothing on serial terminal bu
When ever I reset I am getting some crazy character on serial terminal and error led remais on always I had not connected motor yet because first I want to creat successful connection with serial terminal and then I will connect motor and di tunnig and if you guys have videos or any other good info wil be appreciated on how to tune and enter parameter but currently I am stuck at this crazy character thanks hope you guys help
Thanks for reply I have tried all baud rate in arduino terminal but same crazy character as you see in my attatchements of previous reply
I am using attiny2313a-pu and in schematics it is
attiny2313-20pu so is it because of different attiny ?
If have success in elmchan (mode3) then please share you video and files and please suggest me what to do next I can meet u here :
http://www.cnczone.com/forums/open-source-cnc-machine-designs/288074-software.html
because this stm32 forum not elmcha so ..or my mail:[email protected]
so this will retain this forum's linearity
I think you got the right baud rate in putty... but the MCU is not running at the right speed. The fuse bits of the AVR do that. They configure how the internal clock of the MCU works. Out of the box the tiny2313 comes with internal oscillator selected and ck_div8 checked... so I think it runs at 1Mhz. if you uncheck ck_div8 it will run at 8 mhz. If you manage to select an external oscilator (do not remember fuse bits for that but there are plenty of softs on the net for that) it will run at the speed of the crystal.
The software itself is not adaptive. Does not know at what frequency the MCU works. From here the baudrate problem...
Hi mihai I have successfully (I think) installed eclipce and arm setup and I have also succesfully get hex of blink example which comes with arm plugin and I have can make some changes in programme and buid hex file many as I wish but when I use your files and imported and buid it and it gives me around 200 warning and I get hex but it makes hex only one time . If I remove hex from hex containing folder and try to buid hex again but hex is not created as in case of led blink programme it is again created.and my hex has more size then yours I cant figure out what is the problem ! Check your mail also
answer it if you feel to do else dont worry its ok because I think you have lots of work so I dont wanna bother you .thanks
elf and hex file is regenerated if you make some modifications. If you wish to regenerate the hex file do the folowing:
Delete all contents of Release or Debug folder (depending on what are you building)
Right click on project in the left side - > Clean Project
Right click on project in the left side - > Build Project
You should get a new map, elf and hex file.
Mihai
hi mihai you are really great it works only elf file and map file has little differnt file size in realease folder and hex are same size as you have given in realease and i checked hex codes and compares they are little different..but ..cool !
now what should i made change in code for l6203( i think i can also use ir2184 based h bridge wich is simmilar to l6203/l298)
void PWM_Init_Motor_DC(void)
{
//DC Motor statrtup code.
Duty_Limit = Zero_Duty_P;
Reset_Encoder_Position();
Requested_Position = 0;
TIM1->CCR1 = Zero_Duty_P;
TIM1->CCR2 = Zero_Duty_P;
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_1);
HAL_TIM_PWM_Start(&htim1, TIM_CHANNEL_2);
}
sorry for again asking this but i am little confused with this
and also give me some direction on why Zero_Duty_P ?
thanks for reply
to Mihai
should i worry about 226 wanrnings in eclipce ?
Hi everyone,
I have a question to forum members, is anyone who did a BLDC servo drive and run correctly ? and want to share experience ? I have still problem with the start motor.
Thank you
Hi,Mihai,
I've just inform to U by private message,pls, can you check?
Hi kamil I tried it with brushed dc and I run a motor with good result like it shows me tunning graph I can use move command and everything else on tuner software but I was shocked and become sad whrn realize I cant tun the servo with help of tuner software and it became useless to me and also can use it without connect it with pc via usb cable to servo tuner sofware....I am really when I see my motor is also not capturing position proparly ....by the way I found that I can not use it as stand alone after tunning done .
I have to still use pc for turning on pid loop ...why???
Please tell me if you have any idea what is happening to me and I think Mihai (my respected teacher ) will help us !
Mihai (Genius) we will wait for your reply