CRC Issues in Serial Packet Mode
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: CRC Issues in Serial Packet Mode
1. The PIC probably doesnt need the pullup then(eg 2v min)
2. The noise could be coming in through the pullup, or you may need to put a choke on the whires going to the arduino to elliminate the noise.
Let me know where you are at after doing what we went over on the phone yesterday.
2. The noise could be coming in through the pullup, or you may need to put a choke on the whires going to the arduino to elliminate the noise.
Let me know where you are at after doing what we went over on the phone yesterday.
Re: CRC Issues in Serial Packet Mode
To be perfectly honest. I gave up. I read values for both the high byte and low byte, even though only 10 bits should be in the register. I was able to read battery voltage, although I had to reverse the order of the MSB and LSB sent from roboclaw. I applied the same technique to the encoder reads and nada. I've since been modding my controller to input the pot directly. Much more messy(for me) and not my first choice , but at this point it had to be done.
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: CRC Issues in Serial Packet Mode
Hmm, very odd. If any commands work all the commands should work. Especially if the encoder readings were working in IonMotion(eg confirming they were being read correctly).
We will be writing a PICmicro library when we can schedule the time. Though in your case(using MikroC) I dont know if that would help.
We will be writing a PICmicro library when we can schedule the time. Though in your case(using MikroC) I dont know if that would help.
Re: CRC Issues in Serial Packet Mode
Not sure if this still belongs in this post but I'm attempting to tune the motors in my design. They are both linear actuators with pot feedback. I am using the Ion Motion program. I have confirmed that they are both set to absolute modes. Direction is confirmed under PWM settings. The problem is that M2 encoder position remains constant ~230 while M1 encoder position changes properly. Under general settings I've checked the swap encoder channels and the good encoder reading from 1 swaps to 2. Since the M2 wiring had to be reversed in order to have both actuators travel in the same position i thought maybe the same would apply to the pot so i reverse + and -. Still nothing. I've measured the voltage on both pots and it's nearly identical during all positions so the signal should be getting to the board. Have i missed something obvious?
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: CRC Issues in Serial Packet Mode
If the value on one pot isnt changing in IonMotion, and based on your description the problem follows the pot whichever encoder pin it is actually on, then there is a problem with that pot/wiring to that pot.
Just to be sure I understood you correctly. One pot works on either channel. The other is approx 230 all the time whatever channel it is on? Correct?
Note the direction of the pots doesnt matter for this test. The direction only matters when you are tuning the PID which you cant get to until you get the pots value changing properly so dont worry about direction. A pot can be wired with either side power or ground. Only the middle pin has to be wired to signal always. Which ever way you waire power/ground you should still get a changing signal if you move the pot. If you are not, but another pot does work on that channel then there is a problem with the pot.
Just to be sure I understood you correctly. One pot works on either channel. The other is approx 230 all the time whatever channel it is on? Correct?
Note the direction of the pots doesnt matter for this test. The direction only matters when you are tuning the PID which you cant get to until you get the pots value changing properly so dont worry about direction. A pot can be wired with either side power or ground. Only the middle pin has to be wired to signal always. Which ever way you waire power/ground you should still get a changing signal if you move the pot. If you are not, but another pot does work on that channel then there is a problem with the pot.
Re: CRC Issues in Serial Packet Mode
strangely enough with no pots connected to either encoder pin on ion motion one value seems to float ~1200 and the other around 220.
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: CRC Issues in Serial Packet Mode
When an analog pin floats it can float at alot of different values. There is coupling from nearby pins when the inputs are floating.