RolluS Posted September 15, 2016 Share Posted September 15, 2016 On 14/09/2016 at 8:24 AM, changfrancis said: 1. 30B4 controller board @ 220rmb ~ $33usd https://item.taobao.com/item.htm?spm=a1z09.2.0.0.OyJAma&id=43973598019&_u=e1qcvq294ff2 2. Bluetooth adapter @ 40rmb ~ $6usd https://item.taobao.com/item.htm?spm=a1z09.2.0.0.OyJAma&id=531660846217&_u=e1qcvq29d2a6 3. ST programmer @ 10rmb ~ $1.50usd https://item.taobao.com/item.htm?spm=a1z09.2.0.0.OyJAma&id=523108494686&_u=e1qcvq297a24 Thank you for the shopping list, I've just order 2 of each but 1 programmer (I have another one). I won't developp, but should be able to test and maybe debug 1 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 16, 2016 Share Posted September 16, 2016 17 hours ago, changfrancis said: I am setting up a small lab space for development, unfortunately i only have one set of motor and accessories. I will need to use my daily driver EUC for development too. Currently, waiting for element14 to delivery some quick connector for me to quickly disconnect the testing board. Btw, do you have the firmware from the original 30B4 ? Once i flash the development firmware, does it means that i will never be able to flash back the original firmware ? I bought 3 x 30B4 boards for development. I also have 2 working EUCs with that boards (in total I bought 5 x 30B4 boards). For motor, I am using one motor from an old generic. I have in total 4 motors with me but 3 of them on working EUCs. There is no file for original firmware. Quote Link to comment Share on other sites More sharing options...
changfrancis Posted September 16, 2016 Share Posted September 16, 2016 @electric_vehicle_lover btw for the faulty board, is t he damage only on the mosfets or there are more damages in other ICs (IMU, Micro-controller)? I just received the connectors from element14, will be starting some setup this weekend. Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 16, 2016 Share Posted September 16, 2016 I already verified that some mosfets are burned but I didn't repair the board - I will do it when needed. Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 16, 2016 Share Posted September 16, 2016 (edited) @changfrancis I suggest you to try beep the buzzer first, then maybe doing some the printfs, after printfs of angle. Trying to run the motor should be the last thing to try because of the risk. I am using a potentiometer connected to J7 (please see the schematic electronics-gen2_boards) and powered from 0 to 3.3V from the LEDs connector header. On main() loop I am doing: value = adc_get_potentiometer_value (); value = value - 2048; value = value * 1000; value = value / 2048; motor_set_duty_cycle (value); printf("pot: %d\n", value); Where duty_cycle value is [-999 up to 999]. Edited September 16, 2016 by electric_vehicle_lover Quote Link to comment Share on other sites More sharing options...
changfrancis Posted September 16, 2016 Share Posted September 16, 2016 @electric_vehicle_lover I am currently trying to wire up each of the wheels wires and leds (my wheel does not have similar connectors). By any chance you have the description/label for each wires on the board ? i.e pin 1: LED1, pin 2 LED2, pin 3 LED3, pin4 LED4, pin 5 GND. LOL, my old board have labels but i cant see the labels on 30B4 I guess i will continue the soldering tomorrow, it is 1030pm in singapore I got this from the chinese website but it does not show the pin level config. I hope i can wire them up correctly. Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 16, 2016 Share Posted September 16, 2016 (edited) My 30B4 have labels for the headers but some labels are under the headers and so they need to be removed. Please look at the schematic and follow the lines with a multimeter to verify which is what. You can always go and improve the schematic with more information and commit a new version of it. Edited September 16, 2016 by electric_vehicle_lover Quote Link to comment Share on other sites More sharing options...
changfrancis Posted September 16, 2016 Share Posted September 16, 2016 can you take a few photo of your current wired up board ? I will use it as reference tomorrow. 1 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 16, 2016 Share Posted September 16, 2016 I will but tomorrow, in about 20h. Quote Link to comment Share on other sites More sharing options...
changfrancis Posted September 16, 2016 Share Posted September 16, 2016 @electric_vehicle_loverthanks Quote Link to comment Share on other sites More sharing options...
Popular Post lizardmech Posted September 16, 2016 Popular Post Share Posted September 16, 2016 Testing this thing tomorrow. 4 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 16, 2016 Share Posted September 16, 2016 @changfrancis please note: when I do: value = value * 1000; value = value / 2048; I could do simple value = value * 0,488 but on the STM32F103 the float operations are very slow when compared to integer operations (I did some tests and measure with oscilloscope). I want to force myself to do integer operations everytime possible. Just the control loop for balance control, that maybe can happen at each 1/100 second, may be ok for slow operations. The code for future FOC/motor control/ current PIDs, etc, must be fast and so with integers if possible. Quote Link to comment Share on other sites More sharing options...
OliverH Posted September 16, 2016 Share Posted September 16, 2016 2 hours ago, lizardmech said: Testing this thing tomorrow. Wohoo, tell me more.. Quote Link to comment Share on other sites More sharing options...
Tomek Posted September 16, 2016 Share Posted September 16, 2016 3 hours ago, lizardmech said: Testing this thing tomorrow. Looks awesome, is that prospectively VESC6.0 compatible? Quote Link to comment Share on other sites More sharing options...
OliverH Posted September 16, 2016 Share Posted September 16, 2016 14 minutes ago, Tomek said: Looks awesome, is that prospectively VESC6.0 compatible? Not CPU compatible. But hopefully this will be sorted out. Quote Link to comment Share on other sites More sharing options...
changfrancis Posted September 17, 2016 Share Posted September 17, 2016 Attached is the connection diagram for 30B4. I maybe wrong on the polarity of the plug, do check again if you plan to use this as reference. Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 17, 2016 Share Posted September 17, 2016 I took some high res pictures that I want to label the headers and pin numbers. I also found a small error on schematic. I will correct the schematic and label the pictures, than I will share them. I hope to make it in next 4h. Quote Link to comment Share on other sites More sharing options...
lizardmech Posted September 17, 2016 Share Posted September 17, 2016 STM32F4 module I designed is working, runs VESC firmware and has the same pin layout as the TI instaspin boards. 1 Quote Link to comment Share on other sites More sharing options...
RolluS Posted September 17, 2016 Share Posted September 17, 2016 (edited) Please check here the spec of the board, pinout is detailled : http://nc.reynald.cloud/index.php/s/FMCebjvVbBoQccf Edited September 17, 2016 by RolluS 1 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted September 17, 2016 Share Posted September 17, 2016 @changfrancis, done!! Here on the wiki page: https://github.com/EGG-electric-unicycle/documentation/wiki/MicroWorks-30B4-30kmh-controller-board-with-bluetooth I also updated the schematic - please tell me if something is missing or wrong. --- Schematic Seller MicroWorks: http://microworks.en.alibaba.com/ Product page: http://wholesaler.alibaba.com/product-detail/2016-balance-scooter-controller-Motherboard-with_60376493987.html Simplified schematic, designed on KiCAD: https://github.com/EGG-electric-unicycle/electronics-gen2_boards/raw/master/MicroWorks_30B4/MicroWorks_30B4.sch.png Sources on github: https://github.com/EGG-electric-unicycle/electronics-gen2_boards Active component list: 1x ASM1117 3.3v Linear Voltage regulator for 3.3v on Invensense 6050 and STM32 2x ACS712ELCTR-05B-T (+-5 amps max) ma Hall Current Sensor on 2 separate Phases - To measure phase current 3x IR2184s Gate Driver for Half Bridge. Built in fixed Deadband 1 for each N-Fet Pair 2x XL7005A SMPS Max 80v input Output can be adjusted 1 is used to produce 15-20v for Gate driver IC's The other most likely produces 5-12v for Current sensors or maybe just the 1117 to produce 3.3v with minimal losses. 1x Invensense MPU6050 (needs no introduction) 6Axis Accel/Gyro with nifity build in filtering 1x STM32F103C8T6 ARM microcontroller Header pins The next pictures show the labels according to the previous schematic. 2 Quote Link to comment Share on other sites More sharing options...
changfrancis Posted September 17, 2016 Share Posted September 17, 2016 @electric_vehicle_lover Many thanks. I just wired up my wheel to the board. upon power up I fried my switch LED as it did not check in voltage(60V vs 12V led :D, hahaha). After that I also saw magic smoke at the first capacitor 47uf near connector J1. Everything else seem ok, will continue testing the board. hopefully by Monday i can start flashing the STM32. Quote Link to comment Share on other sites More sharing options...
changfrancis Posted September 17, 2016 Share Posted September 17, 2016 @RolluS thank you for the user manual. Very cool. Quote Link to comment Share on other sites More sharing options...
Popular Post lizardmech Posted September 22, 2016 Popular Post Share Posted September 22, 2016 I have 90% of the VESC working now, just have one PCB issue to solve that is screwing up mosfet switching. High speed high accuracy current sense appears to be the key to getting automated motor detection and FOC working in general. 5 Quote Link to comment Share on other sites More sharing options...
OliverH Posted September 22, 2016 Share Posted September 22, 2016 1 hour ago, lizardmech said: I have 90% of the VESC working now, just have one PCB issue to solve that is screwing up mosfet switching. High speed high accuracy current sense appears to be the key to getting automated motor detection and FOC working in general. Your current board is based on the Cortex4 and not on a R version? Is this plan withdrawn? We need this kind of solution for PLEV vehicle. Quote Link to comment Share on other sites More sharing options...
lizardmech Posted September 22, 2016 Share Posted September 22, 2016 M4 but it's just a small riser that fits on switching MCU is easy. I don't know if it would be worth while porting the entire VESC firmware for safety applications, it's probably better to have a smaller simple firmware without all the motor detection in it. I think instaspin and a few other commercial options are already safety certified so it's just a matter of making a small MCU board with a different MCU. You can always measure the motor specifications with an M4 board and write the specs into the firmware. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.