Hey everyone, a buddy of mine ordered an IPS electric unicycle. Unfortunately, it is no longer working. While someone was riding it, they crashed and it would no longer self balance. It was possibly low on charge so we put it on the charger. About thirty minutes to an hour later the charger gave up the magic smoke, and now the unicycle will not even beep. All it does is give a quick flash of the power light when pressed.
Would anyone be interested in helping me repair it? I’m planning on taking it apart and looking for obvious damage, but if it’s more complicated than some blown components I fear it will be beyond my level of expertise. If we can get it running again I would be interested in trying to hack it as well to tweak some of the settings, although I’m not sure my friend will let me mess with it beyond the repair.
Edit: I had some success tonight, a fuse on the main circuit board was blown. So, I replaced it, and now the unicycle at least turns on. Unfortunately, when it tries to self-balance it kinda jerks back and forth and then gives an error beep. I’m thinking maybe it is getting a bad reading from an accelerometer or gyro? Documentation on this thing has been very difficult to find…
Edit 2: OK, here’s what I found today. According to some forums, it’s possible that a hall effect sensor was knocked loose inside the wheel. I took the hub apart (with some help from Big John, thank you!), but nothing looked amiss. Back to the electronics. I agree that at this point it is most likely getting a bad reading from a sensor, perhaps the gyro. Luckily, all the chips I looked at today appear to be in common use and have readily available datasheets! Yay! The following is a list of the more important ICs:
- Accelerometer/Gyro: Invensense MPU-6050, datasheet
- Mixed signal MCU: STM32F302, datasheet
- Battery Management: Maxim, MAX14921, datasheet
I see that the MCU supports I2C and UART, and there is a nine wire connector that is not hooked up to anything (assuming it is a diagnostic connection). The wires from that connector also terminate to pins (42, 43, etc) on the MCU relating to I2C/UART. Is anyone familiar with I2C and/or UART? If I could pull diagnostic info from this thing it would be great.
SAFETY NOTE: If you see a giant 1000uf capacitor, make sure to discharge it with a resistor. Don’t be dumb like me and nearly weld a nail file you just happened to have lying on the table to the terminals…
Good news: We might have JTAG! The first four pins of the disconnected connector I mentioned seem to be hooked up to JTAG pins on the micro. Gotta do a bit of reading, but hopefully I can hook this thing up soon and see what I can read from it.
OK, I have determined the pins the “debug connector” is connected to.
- Red Wire: Pin 34, USART3_CTS, TIM4_CH3, TIM16_CH1N, TSC_G4_IO3, IR_OUT, SWDIO-JTMS, EVENTOUT
- Green: 37, I2C1_SDA, USART2_TXTIM1_BKIN, TSC_G4_IO4, SWCLK-JTCK, EVENTOUT
- Yellow: 36, Digital power supply
- Black: Ground
- Purple: 43, I2C1_SDA, USART1_RX, TIM3_CH4, TIM4_CH2, TIM17_CH1N, TSC_G5_IO4, EVENTOUT
- White: 42, I2C1_SCL, USART1_TX, TIM16_CH1N, TIM4_CH1, TSC_G5_IO3EVENTOUT
- Blue: 30, I2C2_SCL,I2S3_MCK, USART1_TX, TIM1_CH2, TIM2_CH3, TIM15_BKIN, TSC_G4_IO1, EVENTOUT
- Orange: 31, I2C2_SDA, USART1_RX, TIM1_CH3, TIM2_CH4, TIM17_BKIN, TSC_G4_IO2, COMP6_OUT, EVENTOUT
- Gray: 32, USART1_CTS, USB_DM, CAN_RX, TIM1_CH1N, TIM1_CH4, TIM1_BKIN2, TIM4_CH1, COMP1_OUT, EVENTOUT
It seems these pins can be used for many different purposes. Unfortunately, it looks like only two of them could be used for JTAG, which I believe would require four pins. It looks like maybe enough pins are available USART… Any suggestions?