Jump to content

LabManager

Eurobricks Vassals
  • Posts

    35
  • Joined

  • Last visited

Everything posted by LabManager

  1. Oh yes, I've done some tests to get an understanding of how much current PF motors need. Here's the link to the results: https://drive.google.com/file/d/1KYb1vnxXwx6x-V2tKyvcvMcOFA5w-4p9/view?usp=drive_link The current version of GeekShield can be powered only by a 7.4V (2S) battery, and you can pick any battery which just has any rating. I haven't seen any 7.4V rated batteries with less than 20C number, so even 20C x 300mAh battery will supply up to 6A. That's more than enough for Pololu's DRV8835 used in the GeekShield. Any higher rated or higher capacity battery will work too. As for the black motors... I do not have the BuWizz motors (and that was one of the reasons the project was started :) but DRV8835 can drive a couple of black "monster" motors. I've used this setup and it's OK. The only issue I've seen was with CaDa Monster Motors - they're either even more powerful than unbranded black motors, or they have some internal current/power limitation so I could not get a CaDa Monster Motor running by a single channel of DRV8835.
  2. That also works with MK6.0 modules. The limitation is that only one MK 6.0 can be connected via Bluetooth, while 3x MK 4.0 can be controlled simultaneously. So you can control up to 12x PF motors with a gamepad. The original controller is not used at all, all the input is from the gamepad and it is processed by the ESP32, so you can connect even more GeekServos or other units to the ESP32 (IMU, distance sensors and so on).
  3. Here are some updates on this topic. While still working on a production-grade version of my GeekShield project, I’ve had some experiments with Mould King modules. Thanks to @vicocz and his great open source brickcontroller2 app, I’ve finally got all the answers needed to make a better Arduino adapter for Mould King. So, this is the new concept: 1. An Arduino (ESP32) board is powered by the Mould King module’s PF port so they are turned on together 2. A gamepad connects to the ESP32 3. The ESP32 then processes the inputs from the gamepad and sends Bluetooth packets to the Mould King module – just like the smartphone app does (MK 4.0 and MK 6.0 modules are supported). 4. Additionally, a GeekServo is connected to one of the ESP32’s pins so it’s controlled with a PWM signal and powered by the MK module. 5. The code in Arduino sketch can control both the PF motors and the GeekServo by processing inputs from the sticks/triggers/buttons on the gamepad. I’ve used the M5Stack’s Atom Lite controller and the Atomic HDriver Base because they’re very small in size and have pin holes so it’s easy to attach these units to my car. But many other ESP32 boards can be used, providing they tolerate 7.4V power supply. In my setup, the voltage regulator inside the HDriver Base reduces 7.4V from the MK to 5V needed by Arduino. This approach still requires some coding, but I hope it will not be too hard if you have some experience with Arduino. The library and examples are on the GitHub (https://github.com/pink0D/M5Bluepad) and there’s also a wiki page with some instructions on wiring (https://github.com/pink0D/M5Bluepad/wiki/Controlling-Mould-King-modules-and-GeekServo-with-ESP32).
  4. C+ offers additional sensors, and though I don't have any sales data, I guess that LEGO Education sets with C+ elements are very popular not only for classroom activities, but also as expensive toys both for kids and AFOLs. At least they feature something different from motorizing cars, trucks and all kinds of construction machines. Before C+ era, PF and Mindstorms coexisted and two different systems probably better fitted two different themes: Technic Vehicles need power and Robotics need variety of sensors. An attempt to unify all of that stuff in a single lineup (C+) possibly was not a good idea, so: 100% agree with this! Still doubt that we'll see any of this in upgraded PUP system.
  5. Pololu item #: 2808 (Mini Pushbutton Power Switch with Reverse Voltage Protection, LV). This feature is present in all of their switches that have a pushbutton (not the slider!)
  6. Sure, and if you have the original servo it will have proportional control. The trick for 3rd party servos isn't present here because it would require more components, so those servos will rotate only -90/0/+90 degrees. The whole board is powererd by 7.4V from the 2S battery: - ESP32-CAM has an internal voltage regulator (AMS1117), which is not very efficient and should not be used to down-step 7.4V if the camera is attached, but here there's no camera, so the board needs very little power and the internal AMS1117 doesn't overheat. - GeekServos have 3.6-6V operating voltage range, but it seems that 7.4V is also OK. I've ordered some more GeekServos, will disassemble one of them to see what's inside. Probably this will give the understanding of its real voltage tolerance - the motor driver (DRV8835) gets 3.3V from the ESP32-CAM as logical inputs, and full 7.4V from the battery for powering motors. So C1/C2 outputs are 7.4V. It's interesting to test if the DRV8835 will tolerate 11.1V from a 3S battery, which would give significant more torque from motors, but didn't have time to do that. In fact, I'm thinking of a bigger board Some of the ideas for the new board are: - use ESP32 WROOM. It's even bigger, but it has more pins which I can use for outputs (obviously the smaller modern ESP32 boards have even less pins than ESP32-CAM, and they lack BT Classic support which is a key feature) - use the other motor driver (TB6612FNG). It also capable to output high currents (1.2A continiously or even 3.2A at peaks!), and it has higher maximum motor voltage (13.5V), so I can reliably upgrade the power supply to a 3S LiPo. The downside here is that TB6612FNG does not have any of protections that DRV8835 has (overcurrent for example). Didn't measure the stall current for a buggy motor, but perhaps its not as high as 3.2A - since there will be more output pins, possibly 2x motor drivers for 4xPF motors + some 4-5-6 GeekServos can be controlled independently
  7. Yes, green boards are the main components: ESP32-CAM (the MCU), Pololu Pushbutton power switch and the DRV8835 motor driver. The complete list of materials (except for usual stuff for soldering) is here. Yes, ESP32 chips have built-in support for Bluetooth. While there are smaller ESP32 boards, I've chosen the ESP32-CAM, which is a pretty old chip/board introduced back in 2016 I think, however, it is still available on marketplaces. The chip used in ESP32-CAM has support for Bluetooth Classic, so a direct connection with a gamepad can be made. Modern ESP32 usually support only Bluetooth Low Energy (BLE). The PF motors are powered by the DRV8835 motor driver (the smallest of the green boards), which can deliver 1.2A (1.5A peak) per channel. And yes, two ports are independent. ESP32-CAM board has very limited amount of pins that can be used for output. The board was initially designed as a camera carrier so most of MCU pins are internally used for camera connection. So, there are only 5 pins for PWM output. Each PF motor needs 2 inputs (C1/C2), so when 2x PF motors are used there is only 1 pin left for GeekServo's signal. But if you want, you can detach the motor driver and connect 5x GeekServos to these pins. There is a green version of GeekServo which is not a 360 servo, but a continious rotation motor. It can be controlled to rotate with variable speed both clockwise and counterclockwise, but it needs just one signal wire to control it. As for power, I believe a high rated LiPo battery can easily power 5x GeekServos simultaneously. They are glued. Didn't find any smarter solution to fix them reliably. A 3D-printed shell does not seem to be the solution either: - this would make the DIY controller even more complicated - I don't beleive it's possible to print the studs with adequate precision so the connection with the PF plug is reliable
  8. It's a hybrid solution. The software part: one of ESP32's pins is connected to the voltage divider so the ADC can measure 2S battery voltage indirectly. Though this adds some error (not mentioning that ESP32's ADC has poor accuracy itself), the software can read a value which is +/- 10% near the true battery voltage. That's enough to catch the situation when the battery level becomes too low. The hardware part: the ESP32 cannot shutdown itself, but the Pololu's power switch has a nice feature: it can not only switch the power on and off with the physical pushbutton, it can also cut off the power when it gets a signal from the MCU. So when the ESP32 measures the low battery level, it can just shutdown the power supply of the whole board.
  9. Sure, there are some more options: 1) Powered Up Motor -> Technic Hub (88012 or even 88009) -> Custom DIY ESP32 gamepad with BLE support (example) Then use legoino library to control the Hub by LWP 3.0 2) Powered Up Motor -> Technic Hub -> ESP32 board which supports both BLE and BT Classic -> Dualshock or XBox controller The ESP32 will have the same function as the smartphone app: it will control the hub by BLE link with inputs received from the gamepad via BT Classic
  10. Hello everyone! Recently, every time I visit the LEGO Technic, Mindstorms, Model Team and Scale Modeling forum, I do notice more and more topics with some kind of custom electronics or Arduino MCU’s used with LEGO models. And here’s another one I started this project some time ago, when I was in search of an RC system for LEGO with two key features: 1) Proportional control for servos to make steering very accurate 2) Ability to control the car directly with a physical remote, excluding any kind of smartphone app between them While each requirement has its own solution, they cannot be combined: 1) A Powered-Up motor can be used for proportional steering, but it can be controlled only with a smartphone (or with a gamepad, but it also must be connected via the app) 2) There are numerous Power Functions compatible remotes, but none of them feature proportional control My initial approach was to adjust the PF controls (old topic here) so these PF-servos could rotate proportionally. Thanks to @gyenesvi and @oracidI learned about the GeekServos, and, eventually, found the way to control them with a PF-compatible remote. However, I didn’t abandon the idea of developing a complete solution which would meet my needs. Though DIY, soldering and so on are not the first things one would love to do when building LEGO models, perhaps my solution can still be useful for some enthusiasts. So, finally, now I’m happy to share it here - the GeekShield. Features: Classic Bluetooth gamepad support (Dualshock 4, DualSense, Xbox Wireless Controller and many others) Direct Bluetooth connection (no iOS/Android apps needed) 2x Power Functions ports, maximum 1.5A at peak per channel (2x Buggy Motors can be used together) 5x classic servo (3-wire) connectors (*only 1 GeekServo can be controlled when using 2xPF motors). Pluggable 2S LiPo battery Battery discharge protection Ready to use Arduino Library for easy programming with Arduino IDE Board size: 5x9 studs + mounts (fits inside 7x11 frame). Height: 4 studs together with a compact battery Steps to make the GeekShield: Order PCB production. Though this sounds complicated, now it’s an easy and affordable online service offered by many manufacturers for private use Buy some other electronic components Solder the components together. Some basic soldering skills are needed at this point, but no hi-tech or industrial equipment will be required Write a few lines of code in Arduino IDE to configure the way you want to control your model. The GeekShield library hides most of the code inside, so the sketches are as simple as possible All source code and PCB files are available on my GitHub (https://github.com/pink0D/GeekShield/). I’m also planning to add some wiki pages there to describe the making process in detail. Will be pleased to answer any questions in this topic. Additionally, I’ve built a MOD of 42161 Lamborghini Huracan as a “mule” car to demonstrate the GeekShield and its relatively small size that fits inside even of a 15-stud wide (1:16 scale) model. While the drivetrain is entirely custom and has nothing in common with the original model, I was able to place my shield, the battery, 2x L-motors and the GeekServo so the MOD still has the same exterior (except for 2 little panels on the roof), interior, opening doors and hood. Drifting is not as spectacular as it could be due to model’s weight, but anyway, it’s quite powerful and very cool to drive.
  11. This is going to be my first post without any DIY or Arduino stuff for LEGO (but still there will be non-LEGO components here – the Micro Motors). Despite the mod is for a City Theme’s set, I’ve decided to put it in Technic forum since it has several Technic parts. My mod was initially inspired by @KirTech LAB's Motorized LEGO Arctic crawler (60378) and I thought it will be possible to put micro motors to similar crawlers, which LEGO has featured in multiple variations over the years: the older ones from Volcano Explorers (60122) and Arctic Base (60036) or this Snow Groomer (60222). While the original mod carries the power supply in a separate trailer which is towed behind, I decided to put the battery box on the snow groomer itself instead of the snow cannon. It also took all space inside the cabin so now it has become a 100% unmanned RC-vehicle It was also a challenge to find a place for the 3rd motor and to fix the worm gear and its axle so they don’t slide away when lifting the snow plow. The solution I’ve found is shown in the pictures below and the Stud.io files are also available at my Rebrickable page. Finally, this winter I got all the needed parts and assembled the model. There’s also a video with build process overview and demo. I’ve also replaced the original gray tracks with compatible black tracks which have rubber dots, so the grip is really good. Hope everyone enjoys the winter
  12. Hi! Will that also restore the markup code for image preview ? Before the update, I could just paste the generated markup from postimage, which resulted in a small preview image shown in the reply body and a bigger image could be opened by clicking the link. Example markup which used to work: [url=https://postimg.cc/3dxQPmWs][img]https://i.postimg.cc/3dxQPmWs/IMG-9904.jpg[/img][/url]
  13. Finally, finished the PCB design for my all-in-one controller. Hope to get the order soon and share some videos of how it works. For now, just a few words of what it is going to feature: 1) ESP32-CAM as the core. That'a a pretty old ESP32 board, but there are many reasons to use it: - it has BT-Classic support (it's still used by most gamepads, not the BLE) - it has relatively small size (newer ESP32 are even smaller, but they have only BLE) - it's cheap and widely available 2) Power control (Pololu Mini Pushbutton Power Switch) - power on/off with a clickable button, that's definitely more handy that connecting/disconnecting the battery every time - more important, it also allows to shutdown the power supply automatically when the battery voltage becomes too low to run the controller & motors 3) Dual motor driver (Pololu DRV8835 Dual Motor Driver Carrier) - tiny size - lots of builtin protections (reverse-voltage, under-voltage, over-current, and over-temperature) - good operational ranges (11V & 1.2A by specification, but the datasheet tells that up to 12V and 2.0A per channel at peak are OK). That should be enough to power PF motors 4) 2x PF sockets glued directly onto the PCB. I didn't find any better way to connect the motors 5) GeekServo 3-wire pins - as the ESP32-CAM board has limited amount of outputs, there are two possible scenarios: - option A) 2x PF motors + 1x GeekServo - option B) 5x GeekServos simultaneously (in this case, the motor driver is not required to be installed) - the GeekServos are powered directly by a 2S battery, which seems to be OK, (as @oracid suggested). But, the PCB will also have the connections to add a regulator to reduce the voltage for servos down to 5V Of coarse, it's still a DIY-controller and even a beta-version of it. I didn't make any endurance or safety tests of this, however the breadboard prototype has successfully worked for some hours some weekends when I worked on it. It's really hard to make a DIY board small enough , so its size and number of ports ratio is not comparable with common products. But: - it's really cheap ($30 for all components). Almost the half of its cost comes from the 2S LiPo battery. - you need just basic soldering skills to make it (as for me, I'm not ready to get the reflow oven and setup the SMT process at home) - it can be directly controlled by Bluetooth gamepad without using the smartphone as a proxy - it can control the GeekServos - not sure that this is an advantage, but it allows to be configured by writing real code in Arduino IDE Anyway, this mess of wires is going to become a PCB with size of a 9x5 frame + some extra pin holes for mounting + space needed for the battery (greatly depends on its capacity) While waiting the PCB production, also made some tests trying to make a drift car. This car has independent motors for left and right wheels which can be controlled by ESP32 in some way to make the car oversteer/understeer (something like torque steering). However this has no effect... So if anyone has suggestions how to make the car drift properly, that would be very appreciated :) I'm also exploring the option to upgrade 2S to 3S power supply so there will be more torque from the motors. However, 3S battery will supply up to 12.6V when fully charged, which is more than DRV8835 can handle by specification. But since I have some spare DRV8835's I'm going to try that soon :) BTW since this topic is now much more about Arduino and the DIY-controller, I'm planning to create a new topic when the final PCB is ready so the topic name will not be confusing (there is no more Mould King servos-related information here)
  14. Thanks. K1t is a BAV99S switching diode (https://assets.nexperia.com/documents/data-sheet/BAV99S.pdf), which is used a rectifier, so both LED's get turned on when current comes from the hub in any direction.
  15. It's very interesting to see that the PCB was designed by LEGO in 2015, while the PUP lights (88005) were introduced only in 2018. Do you have a bigger picture of the board? Does the black 6-pin chip have any code on it ?
  16. Does that mean that you've written some Arduino code to control PUP motors with an ESP32 ? I mean not only to power them, but also to read their sensors' data ? PUP has quite a sophisticated serial link which uses 2 out of 6 wires in the PUP plug. And while LEGO has opened it's wireless protocol for Bluetooth communication with modern Technic's hubs, the wired serial link with motors/sensors is not officially documented. As I have some interest in developing a DIY RC-controller for LEGO motors, the best materials I've found yet are 1) reverse engineering by Philo (link 1) 2) pybricks sources (link 2). I guess BuWizz developers also have a good understanding of that, but their firmware is not opensource.
  17. Hello! I'm trying to use BrickController2 to control a Powered-up Train Hub (88009) with two attached PUP L-motors in a small RC vehicle (A motor for driving and B motor for steering). However, when I create a profile in BrickController2 and try to test it, the app can successfully connect to the hub, but the motors just don't react to the controls (even if I set their mode to the most simple NormalMotor). What am I doing wrong ? Some remarks: 1) The hub and the motors are operational, moreover, I've managed to control the L-motors (without steering of course) by connecting the hub to a train's remote (88010) 2) The same profile works just fine if I use it with a Technic Hub (88012)
  18. If 60198 is really going to retire in December 2025, will this set become the one that was available for the longest time among Lego Trains ? Had they been selling any other Train set for more than 7 years ?
  19. I'm expecting new train sets not earlier than 2026. At least, this date is more or less reasonable since first powered-up trains debuted in 2018, then there were two more sets in 2022, so I think the next ones may come in 2026. And what is interesting for me, the 2024's Lego catalog still features the 60198 Cargo Train from 2018, not the 2022's 60336 Freight Train! Can't understand why they still advertise the 60198 set which is out of stock now. Looking at new 2025 train sets, one can only find Duplo trains there. I've noticed there's a new purple action brick with a star on it, wondering what is the function of this new brick and if the old duplo trains will recognize it. The updated bridge and the new tunnel also look fresh. Overall, both me and my son still find Duplo trains more functional than the City trains Wish Powered Up trains will feature the same sensors and sounds some day - they could place the color sensor and the speaker inside the second smart-bogie under the train, and the Powered-Up serial link could be used to control the train's hub.
  20. It's disappointing that TLG continues to use stickers instead of modelling headlights with trans-clear or at least white parts. In my opinion the way they did it in the initial 1:16 scale sets (the blue car from 42098 and the old 42093 Corvette) and even in 2022 (42138 Mustang) looked much better and it had the Technic's spirit then. The 2023 and 2024 1:16 cars started to use stickers, but they were smaller. Now this Corvette has a really big sticker and it will look totally incomplete if you prefer not to use stickers. What I like about this new Corvette is that it seems to be very challenging to make a motorized version, since it has a very low profile in the rear part.
  21. Mine was from a local online store, it was packed in a branded MK retail box with M-0005 item code. Here are some pictures of it after disassembly. It looks very similar to the original Lego PF-motor (you can find a video with its disassembly here), at least there are contact pads that could probably work as a 15-position encoder. The PCB components are different, so MK servo is not a 100% copy. I could identify MX612 motor driver and a weird 14-pin chip without any marking on it. The next step could be to dump the firmware from that chip and make some reverse engineering to find what kind of signals it expects, but I'm not 100% sure that it has similar pinout to PIC and even if it was a PIC clone, I just don't have that hardware to read the chip (not mentioning it can also have read protection). So I just tried to control it with higher frequency signals (up to 2000 Hz), but I could not notice any difference in the way it works. It still rotates to a certain angle, proportional to the duty of C1/C2 signals, but it can't stop at that position and moves little bit around. Probably, as with original PF-Servo, there could be some magic numbers that identify the 15 fixed positions the servo can rotate to, and the signal's duty must match them exactly so the servo can work properly. Or, more likely, MK just cloned the hardware of the original servo, but couldn't (or didn't want to) develop similar signal/encoder processing inside the chip.
  22. Sure, there are services which do PCB assembly (so called PCBA). However this is reasonable for mass production, or at least for small batch ordering. The other point is that PCBA is usually made with surface-mount technology (SMT), and this requires different PCB design using SMD components. In one word, this is too serious for a hobby project. So, unfortunately, for DIY purposes you really need to do some soldering yourself :) That's true. But ESP32-CAM is different, it doesn't include USB components to save some space and make the board smaller. Usually ESP32-CAM board is bundled with ESP32-CAM-MB (or you can order it separately), that second board is used for uploading. Here's a link to a tutorial.
  23. Correct! Why would you want to connect a GeekServo to the BuWizz ? Buwizz 3.0 has PUP connectors so you can use PUP L-motor for steering.
  24. ESP32 is a 3.3V chip, it needs 3.3V power supply and this is also the maximum voltage for input/output on its pins. ESP32-CAM board contains a tiny voltage regulator so the board can be powered either with 5V or 3.3V, but that does not change max voltage for pins. The buck converter and the voltage dividers do very different things. The buck converter handles the DC current up to 1A for the power supply, decreasing 9V from the hub (actually 7.4V since there's 2S LiPo battery inside MK Hub) to 5V for powering the ESP32 board. Converting 9V directly to board's native 3.3V is also possible, and that would be even more effective, but 5V power supply is also used for the GeekServo. @oracid has much more experience with these servos and suggests that direct 2S power supply is also acceptable for the GeekServo, but I prefer to follow electical limitations :) Resistors in the voltage divider are much more simple, they lower the signal level to 3V so it can be handled by ESP32 and they also limit the current which goes through the circuit (1+2 kOhm resistors take just around 2mA from the HUB, while C1/C2 pins can provide up to 500-800mA for a L-motor) There's a Servo class in Arduino's standard framework, but it supports only architectures for original Arduinos. For ESP32 boards, there's a different ESP32Servo library (but the class name is the same). Did you share this anywhere? If it was a kickstarter project, suppose there would be a lot of support! This is what I really looked for before starting my project! What you've done is really cool! As I see, you've mastered SMT assembly so the board is much smaller than mine. Personally, I'm not ready to do SMT assembly at home :)
×
×
  • Create New...