Go Back   EcoModder Forum > EcoModding > Fossil Fuel Free
Register Now
 Register Now
 

Reply  Post New Thread
 
Submit Tools LinkBack Thread Tools
Old 03-17-2016, 12:42 PM   #2661 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
Hurray! It worked! Michael is so much fun to work with! Notice that the power section is identical to the AC controller. The only difference is what board plugs into the IGBTs.

shaggy:
4v? Are you powering the control board with 4 volts?
No everything is powered with 5v but only the encoder outputs has 4 volt when connected to the board..
I think because I have pull down RESISTORS... On the board
Then AFTER RC filter for encoder outputs I have 3.8v max

  Reply With Quote
Alt Today
Popular topics

Other popular topics in this forum...

   
Old 03-17-2016, 12:46 PM   #2662 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
aha!!! get rid of pull down resistors. And change the RC filter to just an R filter. 1k in series for index, qea, and qeb to the inputs of the microcontroller, and NO capacitance after that. The dspic has a "glitch ignore" feature. The RC time constant will just slow things down and confuse the quadrature encoder interface.

Or if you really want pull down resistors, just use something like 47k or 100k instead of whatever you are using. IT's too strong right now.
__________________
kits and boards
  Reply With Quote
Old 03-17-2016, 12:46 PM   #2663 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Take a look how it is coonected to the dspic

[IMG][/IMG]
  Reply With Quote
Old 03-17-2016, 12:49 PM   #2664 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
OK, 330pF is so small it probably doesn't matter. I'd get rid of the pull down resistors though.
__________________
kits and boards
  Reply With Quote
Old 03-17-2016, 12:49 PM   #2665 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
aha!!! get rid of pull down resistors. And change the RC filter to just an R filter. 1k in series for index, qea, and qeb to the inputs of the microcontroller, and NO capacitance after that. The dspic has a "glitch ignore" feature. The RC time constant will just slow things down and confuse the quadrature encoder interface.

Or if you really want pull down resistors, just use something like 47k or 100k instead of whatever you are using. IT's too strong right now.
ok ahhaha if they are not needed i will remove...

but i noticed that the encoder is working well with an1162's code... i can see the motor speed on lcd in rpm..
  Reply With Quote
Old 03-17-2016, 12:54 PM   #2666 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
They may have different settings for initializing the quadrature encoder interface. Or maybe that's not the problem at all. I don't know why it's not working with my code. Maybe there's an issue with the swap ab inputs, or something. YOu coudl try to change:

QEICONbits.SWPAB = 0; // don't swap QEA and QEB inputs.


Change that to SWPAB = 1 instead?
__________________
kits and boards
  Reply With Quote
Old 03-17-2016, 12:58 PM   #2667 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
They may have different settings for initializing the quadrature encoder interface. Or maybe that's not the problem at all. I don't know why it's not working with my code. Maybe there's an issue with the swap ab inputs, or something. YOu coudl try to change:

QEICONbits.SWPAB = 0; // don't swap QEA and QEB inputs.


Change that to SWPAB = 1 instead?
i just removed the pull down resistors and now i have 4.16V max

i also tried to swap the inputs but the postcount is remaing the same

this is configuration code of an1162:
Code:
// ============= Encoder ===============

    MAXCNT = MotorParm.iCntsPerRev;    
    POSCNT = 0;
    QEICON = 0;
    QEICONbits.QEIM = 7;    // x4 reset by MAXCNT pulse
    QEICONbits.POSRES = 0;  // Don't allow Index pulse to reset counter
    QEICONbits.SWPAB = 1;   // direction 
    DFLTCON = 0;            // Digital filter set to off
i also tried to disable the filter but nothing changes..
  Reply With Quote
Old 03-17-2016, 01:08 PM   #2668 (permalink)
PaulH
 
MPaulHolmes's Avatar
 
Join Date: Feb 2008
Location: Maricopa, AZ (sort of. Actually outside of town)
Posts: 3,832

Michael's Electric Beetle - '71 Volkswagen Superbeetle 500000
Thanks: 1,362
Thanked 1,202 Times in 765 Posts
There are too many unknowns for me to know if the code was ported over correctly to the 6010. The 6010 has a number of registers that are different from all the other dspics. It's hard to debug in this context. I know it works in the case of the 4011. That's all I can say for sure at the moment.
__________________
kits and boards
  Reply With Quote
Old 03-17-2016, 01:12 PM   #2669 (permalink)
EcoModding Lurker
 
Join Date: Mar 2016
Location: italy
Posts: 40
Thanks: 5
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by MPaulHolmes View Post
There are too many unknowns for me to know if the code was ported over correctly to the 6010. The 6010 has a number of registers that are different from all the other dspics. It's hard to debug in this context. I know it works in the case of the 4011. That's all I can say for sure at the moment.
If I send to you the modified code could you please take a look when you have time? I commented everything with //Singh in this way it is easy to find where I did modifications..
Another thing that I compiled the code with mplab x ide I don't know if it is a problem..
  Reply With Quote
Old 03-17-2016, 01:14 PM   #2670 (permalink)
EcoModding Apprentice
 
Join Date: Oct 2009
Location: Jyvaskyla, Finland
Posts: 143

Golfwagen - '89 Volkswagen Golf mk2
90 day: 107.14 mpg (US)
Thanks: 44
Thanked 35 Times in 28 Posts
Awesome dc controller there! And solar array too. Haha. Are there 3 IGBT blocks in parallel? Lots of headroom at least.

  Reply With Quote
Reply  Post New Thread


Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paul & Sabrina's cheap DIY 144v motor controller MPaulHolmes Open ReVolt: open source DC motor controller 7381 08-02-2023 11:55 PM
Paul & Sabrina's Cheap EV Conversion MPaulHolmes Fossil Fuel Free 542 11-12-2016 10:09 PM
Contest! Name Paul & Sabrina's controller MetroMPG Forum News & Feedback 120 10-22-2011 02:59 PM



Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Content Relevant URLs by vBSEO 3.5.2
All content copyright EcoModder.com