-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] AMK Motors (the car will move soon) #137
base: master
Are you sure you want to change the base?
Conversation
…rol, which will require free CAN config
…nit stuff to match
…ing off the motors
…its okay for now, still not 100% sure on exactly what temps and stuff we need
…it works but its all there, atleast the stuff I know that needs to be there :) Except for wheel speeds
…I have here is good enough? Or can I just set them to max values and just set torque setpoint normally from there?
… they want me to send with 1% scaling
uint16_t AMK_bError : 1; | ||
uint16_t AMK_bWarn : 1; | ||
uint16_t AMK_bQuitDcOn : 1; | ||
uint16_t AMK_bDcOn : 1; /* Same as QUE ?? */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified this yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still looking into this. I am unsure if this is even necessary. We can charge the caps and monitor the DC bus voltage ourselves, correct? Or I would think once the precharging on our side is complete, we should be good to go. But that is a Finn question I would think.
SEND_AMK_TESTING(motor->states.init_stage, motor->control.bits, motor->status.bits, *motor->pchg_complete); | ||
} | ||
|
||
/* TODO: Determine period of this. Should be pretty often of course. The control |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you explored this more? Talk to Demetrius if you need to
motor->torque_limit_positive = 0; | ||
} else { | ||
/* FIXME: Was told 9.8Nm is nominal, and to set to limit to 17Nm for now, | ||
* but in the mean time I am going to go less than 100% as I am unsure */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any resolutions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not as of now, I have talked with Demetrius and he still isn't fully sure. I am working on figuring this out though. I think we are going to keep the limits fairly low to start just to make sure all is good
motor->torque_limit_positive = 500; | ||
|
||
/* FIXME: Should this actually be negative? */ | ||
/* NOTE: For some reason it cannot be 0, so do -0.1% (according to UIUC's team) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add units to these variables? like torque_limit_positive_nm or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can, they are % of nominal torque though, the variable names will probably get fairly long.
case MOTOR_DEINIT_PRECHARGE: | ||
/* 7. Discharge DC caps; QUE should be reset (is this just DcOn?) */ | ||
|
||
/* FIXME: Will this work? Not sure if this goes low when discharged */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talk to Finn
I am working on setting up all motor can message (Free CAN) and getting the init and deinit state machine setup. Then will move on calling motors functions in car.c.
Seth is working on getting CAN2 working with our current CAN setup (different branch)