-
Notifications
You must be signed in to change notification settings - Fork 983
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
ADC variant does not work...troubleshooting? #136
Comments
Do you have a picture or link of the board just in case ? There are little instructions in the wiki |
and here the link to this board: |
I uploaded the generated firmware.bin file via ST-Link software. The build I done with vscode/plio I used following programmer (connecting all 4 wires, 3.3V, GND, SWDIO, SWDCLK, no additional supply needed) |
@epikao Seems like you have a slightly different board version, at least at this middle location: The coil is a different location. And I am sure because you don't hear the beep and melody, some pins are also changed. If not, then you need to do a small exercise to update the pins similar to here (but with your pins of course). |
OK I was too slow and Emanuel replied ah ah You can also program directly from vscode/platformio. |
Luckily, I was around this time :P |
many thanks, I'm checking all that now. But some more questions: Does the controller send always some data over the serial? Till now I didn't had success to receive anything.. I'm also not sure if I need the battery power for that, or if only supply over my programmer is enough. With supply of programmer and no battery power the LED switches directly on, so the on/off switch has no function. Edit: a normal pota normal potin1:414 in2:44 cmdL:1 cmdR:-1 BatADC:93 BatV:3538 TempADC:1685 Temp:300 Edit2: below serial debug log with battery power, but no motor/ hall sensor connected: a normal pota normal potin1:2087 in2:2047 cmdL:3 cmdR:1 BatADC:1461 BatV:3985 TempADC:1711 Temp:249 Edit3: |
Motors are not spinning for safety reasons at startup if cmdL and cmdR are not within -50 to +50 range. |
ok, I will test this later, now I first want make work this buzzer. Edit: with the second board the buzzer works now, but at PA4 |
Hmm weird, is it a problem on the first board. |
so yes, something at the buzzer is defective on my first board. With the second board buzzer works, and motor are spinning, but both motor spins always together. I couldn't find a position where the one motor stops and the other one is spinning... why that? And I also not understand that even buzzer is connected at PA6 it works if Software is set at default PA4... |
ok, but I also couldn't find a position where both motor are spinning in the same direction, always spinning in opposite... but will check tomorrow again more carefully. Thanks for your great support. |
Making the buzzer work is a confirmation that the interrupt for motor control is working correctly. So it's a good idea to fix the issue. Are you sure the buzzer pin is correct? And what chip do you have? |
Thanks! First board with original firmware I can not remember that there was sound from the buzzer, but with my second board. So the buzzer electronics on the first board must have a defect somewhere. The confusion regarding PA4, PA6, was because I checked the wrong controller datasheet. Unfortunately, I still don't fully understand the spinning behavior of the motors in combination with the states of the ADC inputs: Following my setup and findings. I never had a state where both motors are spinning in the same direction... also I not understand why some input states make motor not spinning very smoth or very slow, or beep, and sometimes stopping... |
That is a mystery... Best thing to do is uart print cmd1 and cmd2 to see if they agree with your motor movement. I think your setup will introduce a lot of noise into the ADC which may account for some of the roughness. Try grounding all inputs as close to the input plug as possible then run a debug with that input. Also what steer/speed blending are you using? |
I did the autocal, but not more, I also not study the other setups, just download the newest code from this respository, build ADC variant and upload... so all other setups should be still default. I was hopping that default should work, but it looks I must study now your mentioned other parameter, and I will record the UART output and maybe do again an autocal... |
And what do you mean with that? I'm using 0V, 3.3V and two 33K resistors to each input do genarate 1.65 V (MID), see setup above. But yes, maybe my wirings are too long, especially the 3.3V... |
As I understand it, the default blend is x.5 on steering (blue adc1) and x1 on speed (green adc2) so if green is 1 or -1 the blue cannot cause a reversal until green is at mid. But this doesn't explain your table. The shutdowns were probably caused by emergency shutdown due to exceeding the ADC timeout count (indicated by beeps) due to high level of noise. |
@epikao, for testing purposes I think is easier to use 2 potentiometers and remove the 33k resistors. Because auto-calibration requires that you move the potis thorough the whole range. And if your motors act roughly it could be that 2 of the motors phases are swapped. Sometimes the colors don't match. Swap the phases and give a try with low input. Overall to get the ADC variant running it should be:
|
besides EMC, I think this is the main problem. Do I have to try the Hall connections as well? Can I not either or? So Hall or motor phases ? It is easier to change the motor phases. Maybe I should also check if the Hall-Sensors are not connected on other pins... but I think then the motor would not spins... What is the easiest way to find the right combination? Try and error? I could also open the motor cover.... |
I think try and error is the easiest. The other way is to use an oscilloscope and log back-emf voltage with Hall sensors. The should match the motor mapping. |
ok thanks, I couldn't find a combination that works...(I tested with the Nunchuck Variant, with 15V to 3.3V regulator between). At some combination the motor started without touching the Nunchuck, often with very strong shaking. Crazy. Could it be that the mosfetdriver maybe are some on the wrong GPIO's ? I fear that I must now check the whole PIN assignment... |
I think, I've found the problem. The hall wires Left, are connected to motor phase Left Hi, and so one, so something is swapped and not according pin assignment.... Edit: Unfortunately, the pin assignment is correct, I did a mistake by counting the pin's. So now I'm lost what the failure could be... (always also erased the IC with STLink) |
Can you record a video of how it behaves ? |
Hello,
I ordered two hover electronics boards as shown on the Emanuel front page via Aliexpress + a Nunchuck controller.
With the Nunchuck controller, reverse and forward does not work cleanly. If I push the joystick backwards or forwards, the motor (both) turns mostly in the right direction but not always, and that only one motor turns somehow does not work with the joystick.
I have now programmed the board with the ADC variant, but unfortunately here nothing works.
Interestingly, I have both variants no sound from the buzzer, is that normal?
I just do not know where to look for the error? The board can be switched on, at least an LED lights up.
Or are these Aliexpress boards defective?
Would appreciate any hints.
Many thanks
The text was updated successfully, but these errors were encountered: