Popular Post electric_vehicle_lover Posted June 30, 2016 Author Popular Post Share Posted June 30, 2016 I got the Arduino controlling an red LED when the EGG EUC brakes (the BRAKE light). The Arduino reads the motor current value from the MicroWorks 30B4 board. There is a wire connected from the 30B4 board on the bluetooth serial module TX pin to Arduino serial RX pin. As you can see on the video, the red LED turns on when I balance the EUC to back and is off when EUC runs forward. I also tested with the RGB LED bar but it adds a delay time that makes the system not working as expected. Maybe there is some optimization that can be done. The Arduino code is here: https://github.com/EGG-electric-unicycle/RGB_LED_bar @Lz Lee 4 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted June 30, 2016 Author Share Posted June 30, 2016 Now the RGB LED bar works well :-) :-) - please see the video. Next I need to add the animation and make it relative to the EUC speed - luckily the RGB LED bar library for the Arduino already ships with a few samples of animations :-) 2 Quote Link to comment Share on other sites More sharing options...
RolluS Posted June 30, 2016 Share Posted June 30, 2016 (edited) Wow! This is an awesome work, congratulations, thanks, and keep on going! Many thanks for having published the code. Now... Firmware time Edited June 30, 2016 by RolluS Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted June 30, 2016 Author Share Posted June 30, 2016 I AM now looking for ideas on how to make the animation - anyone have ideas? Any videos on YouTube that I can look? I also can read the battery voltage and so show on the LEDs the battery charge state. Quote Link to comment Share on other sites More sharing options...
RolluS Posted June 30, 2016 Share Posted June 30, 2016 Ho, I think you could do: Fading color from green to red according to battery state Fading speed according to speed Steady red while braking 1 Quote Link to comment Share on other sites More sharing options...
Popular Post electric_vehicle_lover Posted July 2, 2016 Author Popular Post Share Posted July 2, 2016 I got the speed animation working but I have some bug when I did merge the break and speed code - next I hope to finish the final code and install the LED bar on the EUC: 5 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted July 3, 2016 Author Share Posted July 3, 2016 I have a bug on the firmware. If I try to compare "current" with < 1, the current varibale always get value 0!! (code doens't work and Serial.print just show that). If I comment the current comparison < 1, the value is ok as expected. Anyone can please look at code and give recommendations?? https://github.com/EGG-electric-unicycle/RGB_LED_bar/blob/master/RGB_led_bar/RGB_led_bar.ino void loop() { static unsigned long next_step_time = 0; static int speed = 0; static int current = 0; read_serial_data (&speed, ¤t); Serial.print (speed); Serial.print (" "); Serial.print (current); Serial.print ("\n"); if (current < 1) { led_brake (); } else { if (speed > 50) { if (speed > 1000) speed = 2000; // verify if we need to make next step if (millis () > next_step_time) { next_step_time = millis() + ((unsigned long) 14000 / (unsigned long) speed); pixels_step (); } } } } Quote Link to comment Share on other sites More sharing options...
Shoe73 Posted July 3, 2016 Share Posted July 3, 2016 @electric_vehicle_lover You have an 'else' after your if condition on the current. So if you do the led_brake() the rest of the code does not execute, which is probably not what you want. Get rid of the 'else' 1 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted July 3, 2016 Author Share Posted July 3, 2016 @Shoe73 that else is for when the system is not braking. Anyway, I am pretty sure it is a bug on the compiler and I had to try avoid use the current variable. Anyway, it is working now :-) Next I need to install on the EGG EUC :-) 1 Quote Link to comment Share on other sites More sharing options...
Shoe73 Posted July 3, 2016 Share Posted July 3, 2016 Ah I see, the rest of the code is to make the lights advance and they only do that when not braking. The lights look good! Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted July 5, 2016 Author Share Posted July 5, 2016 One more step!! I were able to configure the 60V -> 12V small board from MicroWorks to output 5V instead of the 12V. This way I can power the RGB LED strip and Arduino with the 5V. The original board had a resistor of 2.4k (R5 on the board) and I exchanged for another of 6.8k. The output voltage is now 4.9 volts. 3 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted July 5, 2016 Author Share Posted July 5, 2016 I just add to wiki: How to MOD MicroWorks 60V to 12V stepdown converter This board is very useful because have as input 60V from the EUCs battery packs and can output 12V and max 2A (or other configurable voltage). I were able to configure the board to output 5V instead of the 12V. This way I could power a RGB LED strip and Arduino with the 5V. The original board have a resistor of 2.4k (R5 on the board) and I exchanged for another of 6.8k (as seen on the picture) - the output voltage will be 4.9 volts. Other voltages are possible if you use other resistor values. Link to product page on MicroWorks shop: http://wholesaler.alibaba.com/product-detail/converter-DC-60V-to-12V-output_60461417441.html https://github.com/EGG-electric-unicycle/documentation/wiki/How-to-MOD-MicroWorks-60V-to-12V-stepdown-converter @Lz Lee 1 Quote Link to comment Share on other sites More sharing options...
esaj Posted July 5, 2016 Share Posted July 5, 2016 (edited) 4 hours ago, electric_vehicle_lover said: One more step!! I were able to configure the 60V -> 12V small board from MicroWorks to output 5V instead of the 12V. This way I can power the RGB LED strip and Arduino with the 5V. The original board had a resistor of 2.4k (R5 on the board) and I exchanged for another of 6.8k. The output voltage is now 4.9 volts. There appears to be no inductor on that board? Can you check what chip is that, is it a linear regulator? I recently found (and ordered a bunch of ) TL783, which is a linear regulator with 20-125V input and 1.25-125V output, just wondering what other options there are... And yeah, probably I could find more just by looking through manufacturer pages, but I'm lazy EDIT: Nevermind, you just posted a link to the product page, and one of the photos showing the board from different angle revealed an inductor that's behind the other capacitor in you picture. Edited July 5, 2016 by esaj 2 Quote Link to comment Share on other sites More sharing options...
RolluS Posted July 5, 2016 Share Posted July 5, 2016 I was thinking.. Isn't there a low voltage DC supply on the 30B controller? I guess there is 5V or 3.3V on the UART header. What current can I drain from it please? It may be not enough for the led bar so the 60->5Vdc converter is needed, but for small application it could. 2 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted July 5, 2016 Author Share Posted July 5, 2016 9 minutes ago, RolluS said: For an EUC application, I would avoid to use power from the board as we don't know the limit of the board and that way the board can reset or fail while riding!! 3 Quote Link to comment Share on other sites More sharing options...
esaj Posted July 5, 2016 Share Posted July 5, 2016 15 minutes ago, electric_vehicle_lover said: For an EUC application, I would avoid to use power from the board as we don't know the limit of the board and that way the board can reset or fail while riding!! My thoughts exactly, since we don't know where and how much current can be drawn safely from the mainboard, I'd personally avoid it, and instead use the battery directly (or through a step-down/buck converter or linear regulator, whichever fits the use case better). 1 Quote Link to comment Share on other sites More sharing options...
RolluS Posted July 5, 2016 Share Posted July 5, 2016 Thank you guys ! I agree Quote Link to comment Share on other sites More sharing options...
Popular Post electric_vehicle_lover Posted July 9, 2016 Author Popular Post Share Posted July 9, 2016 It is now installed on EGG EUC :-) Later at night I will record a better video for promotion of this MOD and I will document on the Github wiki. 5 Quote Link to comment Share on other sites More sharing options...
RolluS Posted July 9, 2016 Share Posted July 9, 2016 Wow I really like it ! Good game 1 Quote Link to comment Share on other sites More sharing options...
Jessica Wu Posted July 12, 2016 Share Posted July 12, 2016 On 2016年5月28日 at 1:19 AM, electric_vehicle_lover said: They don't provide that information but they say is for electric unicycles. I just bought 2 units because I am building 2 EGGs EUCs where I want to have lights. One thing that I miss is to known how much current this board can handle... I want to use high amperage LED. Also I want to use the RGB LED bar... I also bought from eBay to play with :-) The max current of that board is 2A, if you want to add lights, a 60V -to-12V converter. 1 Quote Link to comment Share on other sites More sharing options...
Rein-tech Posted July 12, 2016 Share Posted July 12, 2016 On 2016年5月3日 at 11:38 PM, baltimorecity said: I have a situation where my EUC shell cracked (as shown in the picture below). The tire somehow caught on the fiberglass molding and split it where foot stand is connected to rest of EUC. So after reading the post where the gentleman from Portugal took on the project to 3-D print a new shell I started reading a book on how to 3-D model with tinkercard.. After 2 weeks I still don't know what to do. I don't know where to start and how do I combine shapes to make a part like the Picasso of Printing from Portugal????????????????? If it is just the shell broken, and 3D printing is also unavailable, you can buy a replacement from ROCKWHEEL, they have a store on Aliexpress 1 Quote Link to comment Share on other sites More sharing options...
electric_vehicle_lover Posted July 12, 2016 Author Share Posted July 12, 2016 Thanks Jessica!! Would be great if you identify yourself as a MiroWorks staff, that way the value/awareness of MicroWorks would increase here in the forum. Really nice to see I can get the 60V from the board on that connector - I had to solder wires to the 30B4 board :-) I already added RGB LED strip, please see here - I even had to mod your board to output 5V instead of the 12V: Quote Link to comment Share on other sites More sharing options...
lizardmech Posted July 13, 2016 Share Posted July 13, 2016 Got the new version of my board, only finished it late tonight so I haven't tested it much, most of it appears to work, had it spinning briefly but it was drawing 5V from the instaspin board and it was too much and shut down. TI TL783 works well, easiest way I have found to get low voltage out of 60V+ vsupply. Will try and finish it then clean the flux off tomorrow. 3 Quote Link to comment Share on other sites More sharing options...
esaj Posted July 13, 2016 Share Posted July 13, 2016 2 minutes ago, lizardmech said: Will try and finish it then clean the flux off tomorrow. Sorry for the off-topic, but what do you use to remove the flux? I just bought a 100ml bottle of pure isopropanol (isopropyl alcohol) from a pharmacy, but it's quite costly (around 7€ per bottle), some of the anti-freezes for cars at least used to be 99% isopropanol, but nowadays they don't list the ingredients anymore I reverted back to using "no-clean" -solder a while back, as I didn't have anything suitable for cleaning the flux residue from the "multichannel strong halogenated activation" 0.5mm solder-wire I have, and it's the only 0.5mm available locally, the "no-cleans" are all 0.8-2mm. Hobby16 suggested using an old toothbrush and something called "Essence F" (apparently some sort of naptha), so I was wondering if Zippo lighter fluid might be ok... apparently acetone is not(?) Quote Link to comment Share on other sites More sharing options...
lizardmech Posted July 14, 2016 Share Posted July 14, 2016 I just use methylated spirits, leaves that white residue but gets rid of flux. I had to use a large amount of flux to assemble this one, the mosfet drivers are 5x5mm and have pins the size of BGA chips have. Because the board has so much cooling the soldering iron can't even stay hot enough to solder to it. I had to just stick all the parts with blobs of flux and use hot air. 1 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.