Open Tommyboi2001 opened 1 year ago
okay i uploaded the old hall order. Test it with the phase cables again switched.
20:55 here in Germany, i go to bed. Would be good if you install keil and change the pins yourself in defines_2-10.h And choose the master/slave/single and REMOTE_XY in config.h
F7 = compile F8 = flash to hoverboard.
with three hall cables, there are 6 combinations to check. Good night and good luck.
you did not uploaded, I think ? files are 30 minutes old.
reagarding keil - this will finish bad for me, but will try... for this I also have to sleep and prepare for hard battle.
@Tommyboi2001 - maybe you feel comfortable with programming... ? :)
Sorry @pacraf , i forgot to move the bin from readyToFlash to BinariesToTest.
I now have introduced an Arduino style pinMode and digitalWrite:
// LED defines
#define LED_GREEN PA12 // thanks to pacraf, transistors are on led module !
#define LED_ORANGE PA15 // thanks to pacraf, transistors are on led module !
#define LED_RED PB3 // thanks to pacraf, transistors are on led module !
//#define LED_GREEN GPIO_PIN_12 // thanks to pacraf, transistors are on led module !
//#define LED_GREEN_PORT GPIOA
//#define LED_ORANGE GPIO_PIN_15 // thanks to pacraf, transistors are on led module !
//#define LED_ORANGE_PORT GPIOA
//#define LED_RED GPIO_PIN_3 // thanks to pacraf, transistors are on led module !
//#define LED_RED_PORT GPIOB
Please confirm that the new binaries still make the three led blink nicely to the rotation of the motor. Then i can update the change to all pins and all layouts. Currently only the 2.10 compiles ! That is a bad state for other users !!
Thanks Robo! today after work will check it and give feedback.
@Tommyboi2001 - maybe you feel comfortable with programming... ? :)
I think i'm at a similar level to you
So the status is that: HoverBoardGigaDevice/BinariesToTest/hoverboard 2.10 single Dummy hall_a0-a1-b10.bin works with switched motor cable Yellow <> Green
HoverBoardGigaDevice/BinariesToTest/hoverboard 2.10 single Dummy hall_b10-a1-a0.bin works good when board Blue go to motor Yellow board green to blue of motor board yellow to green motor
the three led still blinking nicely ?
So i have compiled and uploaded all 6 hall combinations :-/ One of them should work nicely with the three motor phase cable colors matching the mainboard colors.
and the WINNER is.............. hoverboard 2.10 single Dummy hall_a1-a0-b10.bin
three led still blinking nicely ?
Now you can continue with uart_master+slave or with single_uartBus :-)
SO it is done congrats! yes, leds are blinking OK. Motor does what lolin says... tested HoverBoardGigaDevice/BinariesToTest/hoverboard 2.10 single UartBus id0.bin Current factor is in my opinion ~8 times to much. I see that with hand breaking it is max ~1,5 A
iSpeed: 282 iSlave: 0 iOdom: 979 iSpeed: 0.69 iAmp: 12.89 iVolt: 25.09
I will take on slave now... it may take some time for me. will try today, but I have to make some test rig...
Thanks, i wait for the current rescaling until i need to recompile anyway..
It was faster than expected. master slave works. HoverBoardGigaDevice/BinariesToTest/hoverboard 2.10 slave.bin HoverBoardGigaDevice/BinariesToTest/hoverboard 2.10 master Uart.bin
you know there is always a trap somewhere, and here as well. In slave board programming pinout has changed pin position (DIO <>CLK ) ,, GND the same....
Would be nice if you make a little photo with the two headers and the DIO/CLK/GND/3.3V pins :-)
You PB12 circuit still does not make sense to me:
I guess there is a connection from the 1k resistor to one of the inputs of the nearby dual-opamp for the currentDC-adc.
here it is. regarding schematics reverse, for sure there are more interconnections. It is tricky to trace it all. I will look on that more if it is helpfull for something.
As you seem to have gotten the current adc and overcurrent-digital correct, it is not really helpful anymore. I just would need to delete your images from the repo. I would rather update it with a correct image that shows how the current is measured.
Is there a tiny led on these boards ? Like a little red led that used to turn on when the board is powered. I guess that would be this define:
// Mosfet output
#define MOSFET_OUT TODO_PIN
Yes, delete the misleading image. Next days I will sit to it and resolve it better. small led indeed are on board. Will trace them too.
@pacraf could you please test the two NEW binaries: hoverboard 2.10 NEW master Uart.bin
and hoverboard 2.10 NEW slave.bin
Took me quite some time to nearly completely rewrite the defines_2.10.h
Chances are good that the code works just like before. But some code lines have changed, so i am not 100% sure.
I go to bed now
the firmware seems to work (motors rotating with lolin communication, leds reflecting halls) buzzer is silent however.
btw. small LED goes to pin 6 = PF1 OSC OUT
Port with this "two line "panel leds goes from PF6. of course via transistor and 1k
Good to hear that my code changes still make the motors spin and uart remote + masterSlave communication still works.
So PF6 should be the upperLed ? If have set the the upperLed and lowerLed to the two additional pins of that dupont female header:
If i now set UPPER_LED to PF6 then i do not really know what to do with PB4 ;-)
What is this "two line panel leds" ? one stripe of blue leds like the front lights of a car ?
Yes, buzzer pin was faulty.
Will upload new binaries shortly. Good morning from Germany. Where do you came from ?
Okay new binaries online. The buzzer should work again (for master and single). This new one color led panel should light up on startup and turn off when init is done. Then this little onboard led should blink. The four leds on the panel can be controlled from the ESP32 again. So the hall led blinking is turned off.
Good morning from Poland ;) PF6 is driving transistor that is supplying this panel , I called it "two line led panel"
dupont was originally used for small RCreciver
will test bin files.
so my test was with UART (master + slave) files. what is not working (and I havent looked on that for a few last tests - so don't really know when it broke) is readings of voltage and current. it reports all the time: 0,42 A and 21,6V
Speed: -201 iOdomL: -229 iOdomR: -391 iSpeedL: -0.71 iSpeedR: 0.74 iAmpL: 0.42 iAmpR: 0.42 iVolt: 21.60
iSpeed: -186 iOdomL: -215 iOdomR: -406 iSpeedL: -0.65 iSpeedR: 0.69 iAmpL: 0.42 iAmpR: 0.42 iVolt: 21.60
iSpeed: -168 iOdomL: -202 iOdomR: -419 iSpeedL: -0.60 iSpeedR: 0.64 iAmpL: 0.42 iAmpR: 0.42 iVolt: 21.60
iSpeed: -153 iOdomL: -191 iOdomR: -432 iSpeedL: -0.54 iSpeedR: 0.58 iAmpL: 0.42 iAmpR: 0.42 iVolt: 21.60
Led which shows battery status indicated green leds, after few seconds switches off, after some seconds turns again led back, but maybe it is the same issue with reporting voltage to console)
small leds are not ON
led two line panel during buzzer power on sound is switched ON , then off. then sometimes blinks ...
if you want short movie, let me know.
There is one thing more, and this is topic I observe for all my master-slave playing (2.0 board, this 2.10 too) when testspeed.ino drivers master-slave , then sometimes (let's say once per 10 left - right sequences) for a short moment it behaves like stall... hard to describe it, maybe a movie? but as I said, this is not specific to this board, I already reported this to you for 2.0 board.
What I have to look is current UARTBUS status... if it also has this jerk or it is only master slave... but this is another topic.
I have uploaded new binaries. Now i have completed all pin definitions, also the 6 bldc mosfet outputs. Motor should still spin nicely.
Yes, voltage and current should now read again.
As i have disabled TEST_HALL2LED
//#define TEST_HALL2LED // led the 3-led panel blink according to the hall sensors
All 5 led (you only have 3 + 1) get controlled by arduino code:
uint8_t wState = 1; // 1=ledGreen, 2=ledOrange, 4=ledRed, 8=ledUp, 16=ledDown , 32=Battery3Led, 64=Disable, 128=ShutOff
void loop()
{
unsigned long iNow = millis();
...
if (iNow > iTimeNextState)
{
iTimeNextState = iNow + 3000;
wState = wState << 1;
if (wState == 128) wState = 1; // remove this line to test Shutoff = 128
}
That might explain the strange behavior of the led panels.
little onboard led should now blink because of the code line in main.c:
digitalWrite(MOSFET_OUT, (steerCounter%20) < 10 ); // onboard led blinking :-)
I forgot the pinMode in setup.c
pinMode(MOSFET_OUT, GPIO_MODE_OUTPUT);
Sorry i can not focus on that strange choppy/stuttering motor behavior now as we finalize the pin definitions.
The Arduino send the 64=Disable command after he cycled throuh all the leds. I could not see any effect so the motor disable does not seem to work.
Have upaded the defines_2-0.h Would be nice if you could test the 2.0 binaries in the https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/tree/main/HoverBoardGigaDevice/BinariesToTest
bin files from previous test do not spin motors (not this just above - with updated defines_2-0.h) iOdom values due to hand rotate. in arduino sketch nothing changed.
iSpeed: -162 iOdomL: -6 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.02 iAmpR: 0.02 iVolt: 31.16
iSpeed: -180 iOdomL: -6 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.04 iAmpR: 0.02 iVolt: 31.16
iSpeed: -195 iOdomL: -6 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.16 iAmpR: 0.00 iVolt: 31.16
iSpeed: -213 iOdomL: -6 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.38 iAmpR: 0.02 iVolt: 31.16
??? So the latest/newest 2.10 binaries do no longer spin the motor ? Or did you already test the 2.0 binaries and they do not work on your 2.0 setup ?
Oh shit i mixed it all up. wait.
current test binaries for 2.10 do not spin motors for me below debug from lolin voltage fine , iOdom sees movement by hand motors
iSpeed: 165 iOdomL: 63 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.10 iAmpR: 0.00 iVolt: 31.15
iSpeed: 183 iOdomL: 63 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.34 iAmpR: 0.02 iVolt: 31.15
iSpeed: 198 iOdomL: 63 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.14 iAmpR: 0.02 iVolt: 31.15
iSpeed: 216 iOdomL: 63 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.04 iAmpR: 0.00 iVolt: 31.15
iSpeed: 231 iOdomL: 63 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.02 iAmpR: 0.02 iVolt: 31.15
iSpeed: 249 iOdomL: 63 iOdomR: 2 iSpeedL: 0.00 iSpeedR: 0.00 iAmpL: 0.06 iAmpR: 0.02 iVolt: 31.15
master dummy + slave rotates OK if it helps
This is confusing.
So latest hoverboard 2.10 master Dummy.bin
+ hoverboard 2.10 slave.bin
is making both motors spin nicely. But hoverboard 2.10 master Uart.bin
not ?
Then only the uart RX line on the master board is no longer working ?
Yes, I am to fast to answer with unchecked info. all works. just tx cable from lolin was out of socket... please do not comment that.
Why not comment ? Loose connections happen to me all the time because i am way to lazy to use propper rx tx cables but extend these 20cm dupont prototype cables up to 80cm :-(
Is the little onboard led blinking by now ?
;) embarassing anyway.
regarding small leds: on slave board its constantly ON on master board it is like always ON but 3 times per second for very short time OFF . and repeating just like that every second.
these "two line led" panels also behave strange. slave is never ON , master is blinking sometimes (like maybe every 20 seconds it will be blinking for two seconds)
if you want to have a look how it blinks https://youtube.com/shorts/eLuaLC6NWLQ?feature=share
The arduino test code is cycling the first 7 bits of wState every 21 seconds. So the 2pinLed should be on for 3 seconds every 21 seconds.
I found some old code that overwrote my new wState method to turn on/off the leds. Maybe now the second led panel (and the onboardLed) are working as they shoud.
new binares online.
binaries are still one hour old - did you forgot to upload?
looks so, sorry. now have uploaded.
;) led are working OK. small leds nicely blinking, two line panels also lighted brightly every arduino 20s cycle.
regarding led panels with colors (Master has green/red cross , slave has connected orange/red/green ) I see that cross connected to master is never ON. cross I mean this one - I have it on master connected
Hmm if I change panels (master = 6led , slave = 4ledcross) then I see that on slave led are never on. on master green appears on cycle. so seems that maybe the green leds are on different pins on both panels.. right? will look on that.