07-30-2017, 01:30 PM
|
#3111 (permalink)
|
EcoModding Lurker
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
|
Quote:
Originally Posted by MPaulHolmes
same values as indicated on what schematic?
|
I mean here https://ibb.co/jvFKvQ
I already tried this configuration.. i get 4.7volt to 5volt
Adc values from 962 to 1020.. and throttle mapping just does not work..
Then i connected the potentiometer to anlaog input getting raw_throttle from 0 to 1023...
Now in the middle i have 0 throttle.. then it goes to max negative and max positive. So i think the throttle mapping now it ok.
But the motor turns only in one direction is it normal? When the throttle values is negative it should not be changing the rotation direction?
Other question is how can i set the maximum rpms? Because now it goes up to 4000rpms when thw throttle is maximum
And thanks guys for helping
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
08-01-2017, 05:03 AM
|
#3112 (permalink)
|
EcoModding Lurker
Join Date: Apr 2010
Location: Cali
Posts: 35
Thanks: 3
Thanked 4 Times in 3 Posts
|
Quote:
Originally Posted by MPaulHolmes
Hello! I don't think there's a difference between PMAC and brushless DC. Well, I think sometimes PMAC wants a pure AC waveform for best results, and brushless DC wants trapezoidal? But I'm not sure. Also, both motors work fine with an AC waveform.
If it's a permanent maget motor, and you have an encoder, you shouldn't need different firmware. You might just have to set the number of pole pairs, motor type (permanent magnet with encoder) etc.
That would be absolutely awesome to go through the whole tuning process and everything. That's something that I should have done and never got around to doing.
|
Hey! Long time no join this conversation. Finishing my computer engineering degree, looking for a job has had me busy.
You're correct on the differences between PMAC and Brushless IF the PMAC is single-phase. Just a difference of optimizations for field-to-field contact, should be pretty small in differences too.
There are PMAC motors that are three-phase and will run MUCH less efficiently wired in single-phase or PWM. Due to mismatched PM-field to AC-field alignment in timing. If it's a motor they bothered to do such optimizations for, anyway. Unoptimized designs I wouldn't be surprised if they don't account properly and act like single-phase anyway.
Exact optimal waveform for PMAC is typically sinusoidal. BLDC... vary. I've seen a few list triangular, some trapzoidal, some CLAIM square(but we well know true square waves are a pipedream). Trapizodal seems the best assumption though since it makes the most physics sense. (I've seen triangular on fine motion motors, nowhere else.)
Been great watching this controller become a thing.
|
|
|
08-01-2017, 02:49 PM
|
#3113 (permalink)
|
Master EcoModder
Join Date: Aug 2012
Location: northwest of normal
Posts: 28,489
Thanks: 8,058
Thanked 8,859 Times in 7,313 Posts
|
When I try to figure this out, there is a set called 'polyphase DC'. Is that a thing?
|
|
|
08-06-2017, 06:30 PM
|
#3114 (permalink)
|
Master EcoModder
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488
Thanks: 746
Thanked 565 Times in 447 Posts
|
Quote:
Originally Posted by freebeard
When I try to figure this out, there is a set called 'polyphase DC'. Is that a thing?
|
Just when doing dc to dc converters, I think.
__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
|
|
|
The Following User Says Thank You to thingstodo For This Useful Post:
|
|
08-25-2017, 12:28 AM
|
#3115 (permalink)
|
EV
Join Date: Jun 2017
Location: Akron, OH
Posts: 12
Thanks: 4
Thanked 0 Times in 0 Posts
|
I'm having trouble programming my PIC. I have quite a bit of experience working with AVR microcontrollers, but MPLab is some voodoo magic. I'm assuming what I need to do is take the C files and Hex files in the "ACController" folder and put them into an MPLab project, which would compile into a hex file which would be flashed onto the PIC?
Could somebody guide me through this?
Thanks!
|
|
|
08-26-2017, 12:31 AM
|
#3116 (permalink)
|
Master EcoModder
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488
Thanks: 746
Thanked 565 Times in 447 Posts
|
Quote:
Originally Posted by ScottyWarpNine
I'm having trouble programming my PIC. I have quite a bit of experience working with AVR microcontrollers, but MPLab is some voodoo magic.
|
Assuming that you have loaded the latest MPLAB X ... I`d agree with the voodoo. I have yet to get Paul`s code to compile. Last time I threw it in the corner in disgust was ... mid last year or so.
Quote:
I'm assuming what I need to do is take the C files and Hex files in the "ACController" folder and put them into an MPLab project, which would compile into a hex file which would be flashed onto the PIC?
|
If you can get the Import Legacy to work, I believe that is supposed to be the path from the older MPLAB projects to the new. It does not find any files that it likes the extensions of .. for me.
Creating a new project and adding the .C and .H files manually gives me a few screens full of errors. I think the hex files are the output and will be over-written if you do things right.
The new code is a bit bigger than the old code (from MPLAB 8.x) but I believe that it still fits into the PIC. Paul had tested the newer version of MPLAB and did not like it. But I think he got it to compile.
I tried to get his older copy of MPLAB running on my laptop and failed.
So I keep bugging him to send me the various files .. as a backup .. but so far I have not been able to build hex files.
Quote:
Could somebody guide me through this?
Thanks!
|
If you find someone - let me know! MPLAB X may be the new way of doing things .. but it does not like my install. It likely has some doofus path hard-coded ... or something equally lame.
I have been meaning to do a clean install on a plain-jane windows 7 machine with default paths for everything and see if that clears things up ... but MPLAB X has not made it to page 1 of the todo list.
__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
|
|
|
08-26-2017, 02:54 PM
|
#3117 (permalink)
|
EV
Join Date: Jun 2017
Location: Akron, OH
Posts: 12
Thanks: 4
Thanked 0 Times in 0 Posts
|
Interesting, so would it be easier if I could try to install a previous version of MPlab? if there are legacy versions available for download...
|
|
|
08-26-2017, 05:50 PM
|
#3118 (permalink)
|
Master EcoModder
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488
Thanks: 746
Thanked 565 Times in 447 Posts
|
Quote:
Originally Posted by ScottyWarpNine
Interesting, so would it be easier if I could try to install a previous version of MPlab? if there are legacy versions available for download...
|
My apologies .. perhaps I made some assumptions that are not correct!
The only reason to deal with code and compilers is if you want to change the code yourself.
If you buy a board from Paul and do the soldering yourself, he sends you a hex file to load into the dsPIC (or you find it yourself from the forums etc).
To load the hex file you use a utility in MPLAB X called MPLAB IPE, which loads a HEX file from your computer and uses a PICKit 3 to write the code to the dsPIC. The PICkit 3 is a $80 USB device (seen as low as $39). MPLAB X is free from Microchip, who make PIC and dsPIC CPUs. The PICKit 3 connects to the dsPIC via a JTAG port, which is a 4 pin interface, which is beside the dsPIC on the board.
Other JTAG debugger/burners will work - I know Paul uses the PICKit 3 so that's what I ended up buying. I had an older PICKit 2 but had trouble loading the library for the dsPIC. It was far too frustrating ... so I spent a bit of money and got a running system.
As for the older versions of MPLAB - I have not found a source. MICROCHIP does not appear to support the older versions and seems to be discouraging their use. Or they were ... perhaps .. by not giving general access to the archives
Did that help?
__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
|
|
|
The Following User Says Thank You to thingstodo For This Useful Post:
|
|
08-27-2017, 07:03 PM
|
#3119 (permalink)
|
EV
Join Date: Jun 2017
Location: Akron, OH
Posts: 12
Thanks: 4
Thanked 0 Times in 0 Posts
|
Ok, that makes sense. I figured there was pre-compiled code, but was confused since I couldn't find it. Paul sent me a bunch of files (c files, header files) but no hex file that I'm aware of. I guess I need to track that down.
Does the Pickit 3 supply power to the board or do I need to power the circuit with a power supply?
Thanks for the help!
Last edited by ScottyWarpNine; 08-27-2017 at 07:12 PM..
|
|
|
08-28-2017, 01:16 AM
|
#3120 (permalink)
|
Master EcoModder
Join Date: Sep 2010
Location: Saskatoon, canada
Posts: 1,488
Thanks: 746
Thanked 565 Times in 447 Posts
|
Quote:
Originally Posted by ScottyWarpNine
Ok, that makes sense. I figured there was pre-compiled code, but was confused since I couldn't find it. Paul sent me a bunch of files (c files, header files) but no hex file that I'm aware of. I guess I need to track that down.
|
That's a bit strange. I've attached the latest one that I have on this message. I have source dated Jan 3 2017 but it has no hex file. The latest one that I have the hex file for is April 17 2016.
Quote:
Does the Pickit 3 supply power to the board
|
Yes it does. I think that's how I loaded the firmware. Using the DC/DC supply works for debugging ... but there was something about loading firmware that I only used the PICKit 3 to power the board.
The file is too big to post as a zip file. I renamed it to an xls extension and it uploads ... but you will need to rename it to zip to use it.
I tried to add the hex file separately - unknown file type - sigh!
__________________
In THEORY there is no difference between Theory and Practice
In PRACTICE there IS!
|
|
|
|