05-29-2023, 03:22 PM
Have you considered switching to an SSD for reliability?
05-29-2023, 03:22 PM
Have you considered switching to an SSD for reliability?
05-29-2023, 10:01 PM
(05-29-2023, 03:22 PM)GSPW Wrote: Have you considered switching to an SSD for reliability? Not yet, the problem here was not the SD card (it's a brand new Sandisk 32GB Extreme Pro Class 10 UHS-I V30 A1), but me trying too many random things at the same time and not being able to go back to a properly working setup, it was faster and easier to re-do it from scratch.
While experimenting with the cameras I noticed a strange issue with both of them suddenly, their auto-exposure started going to a very dark mode after a few seconds in the correct exposure. And from the moment they started doing this it didn't matter what I connected them to, they did it on all devices with all OSes.
The issue is very similar described in the forum thread linked below, the fix didn't work for me but it seems that this can affect a lot of USB webcams so I'll definitely spend more time to find a solution and the root cause of the issue as well Webcam; Camera control; exposure not working or resetting | OBS Forums (obsproject.com)
I had a little time on my hands so I decided to continue with the screen assembly, it was clear from very early on that I will need to cut the metal covers and parts quite a lot to fit the new screen and the original circuit board and I didn't want to get rid of them completely because they were there for a purpose.
This is how the big metal cover with the balance weight looked like originally: I had to cut off the protruding part at the red line on both rear and front parts to be able to squeeze the original board under it while putting the whole thing back on the new screen, these are the results of the test fitting, cables will be sorted later:
I was playing around with the original power supply and circuit board of the nav unit in the last few months here and there and I might have damaged them as the screen just doesn't want to open anymore, it closes fine, but that's it, tilting doesn't work either. After messing around with them for hours I traced the problem back to the CPU or around it somewhere, the signals from buttons can reach the CPU, the motor driver can drive motor in both directions but the CPU only gives out the close command and it doesn't want to do anything else. The board should work without the screen and the IR sensor, but something is obviously wrong.
I realised that it would be just easier and faster to program a cheap Rasperry Pi Pico to handle the opening/closing/tilting of the screen and that way I would save a lot of space as well as I wouldn't need the quite big original power supply and circuit board for the original screen either. I ordered a Raspberry Pico H and an Adafruit TB6612 motor driver so when they arrive I'll start tinkering with that so I can actually install this in the car sooner, rather than later.
06-24-2023, 10:21 AM
So much lateral thinking here, great to read!
06-24-2023, 05:23 PM
(06-24-2023, 12:01 AM)AnnieC Wrote: I was playing around with the original power supply and circuit board of the nav unit in the last few months here and there and I might have damaged them as the screen just doesn't want to open anymore, it closes fine, but that's it, tilting doesn't work either. After messing around with them for hours I traced the problem back to the CPU or around it somewhere, the signals from buttons can reach the CPU, the motor driver can drive motor in both directions but the CPU only gives out the close command and it doesn't want to do anything else. The board should work without the screen and the IR sensor, but something is obviously wrong. It looks like you have researched it a lot more than I ever did, but I had a similar problem where the motor would stop responding to the commands, and all I had to do was to unplug the screen/power supply completely from power. To me, it looked like it had stucked in a software loop/crashed and resetting the power fixed it.
06-27-2023, 02:30 PM
(06-24-2023, 05:23 PM)KreAch3R Wrote:(06-24-2023, 12:01 AM)AnnieC Wrote: I was playing around with the original power supply and circuit board of the nav unit in the last few months here and there and I might have damaged them as the screen just doesn't want to open anymore, it closes fine, but that's it, tilting doesn't work either. After messing around with them for hours I traced the problem back to the CPU or around it somewhere, the signals from buttons can reach the CPU, the motor driver can drive motor in both directions but the CPU only gives out the close command and it doesn't want to do anything else. The board should work without the screen and the IR sensor, but something is obviously wrong. I wanted to check if the position sensor data is getting to the CPU as well, it seemed to get to the board itself, but then the power supply unit stopped working for some reason. The Raspberry Pi Pico and the Adafruit TB6612 motor driver arrived today, I won't have time to play with them until the weekend but I already have the plan for the code in my head and that could give me an opportunity to add some extra features with those buttons.
Wired everything up quickly before going to bed today and the Raspberry Pi Pico can read the position sensor potentiometer, and after playing around with the wire order the input value on the ADC is nice and linear in relation to the motor position. The motor controller can control the DC motor speed and direction nicely. I wrote a simple proof of concept code to run the motor until it reaches a certain position(or rather voltage on the input pin), even this very simple program works quite well, but I will import a simple PID controller to the project to make the screen motion smooth and precise.
I set the stop point to 3 Volts, the power to the motor stopped at the right moment, the inertia carried it a little further, but for now that's good enough, in fact this method would work well enough for the final solution as well. But having a PID(proportional–integral–derivative) controller implementation is just too interesting to pass up. A PID demo video of what's possible with tuning the parameters, total overkill for this project, but fun. These components will sit inside the screen assembly in the place of the original mainboard so I decided to move the screen brightness control code to the Raspberry Pi Pico as well. This way the automatic brightness control based on ambient light will not take away any resources from the Raspberry Pi and it will run regardless of what happens with the Pi. Edit: The electronics store near my workplace had DC-DC step-down converters at a discount so I bought another one and added a little heatsink to make sure I have one which can provide stable power to the little DC motor through the motor controller. It can handle up to 3A, the output can be adjusted to anything between 1,5-35V depending on the input voltage which can be between 4-40V. From my measurements and seeing the power supply service manual my guess is the original voltage for the motor was around 8V. |
|