BrickTronic

Eurobricks Vassals
  • Content Count

    65
  • Joined

  • Last visited

Posts posted by BrickTronic


  1. 4 hours ago, MisterCreators Custom MOCs said:

    I now tested everything again and built a small testing rig, to make sure that it's nothing wrong with my RC Box. But same as before, the servo still only turns all the way to the left or to the right, no proportional steering possible. I used an 2S lipo to make sure that I'm not overvolting my servo.

    Hello,

    When Lego-Servo is working with Lego-IR-Rempte, then PWM of the IR-Remote should be OK

    In an Youtube-Video (Time-Stamp 0:45) you can find Measured this PWM.
    There are 3,5 sections of 250us resulting in a PWM-Period of 875us that is about 1,14kHz

    When you System is using higher Frequency, then the Servo has Problems getting the right %-Value


    Jo


  2. 2 hours ago, NoEXIST said:

    Not sure, but C1 and C2 are just to power electronics used in servos and PF receivers. As I know they don't work exactly the same as regular motor contacts do

    Hello,

    PF-Receiver and Lego-Servo are powered by GND/0V and 9V Pins of the Power-Function connector.

    See here again Picture from Philo :

    diagram.gif

    Signals on C1 and C2 at Servo define Direction and Angle
    A simple H-Bridge-Driver (that is inside the Power-Function IR Remote Receiver) that usually control an DC-Motor can generate this Sinals for the Servo

    Jo


  3. 11 hours ago, MisterCreators Custom MOCs said:

    Yes I did, but the servos don't understand the PWM signal the ESCs put out. So for now servos can not be controlled proportional, but they can be controlled left or right (-90°, 0°, 90° only these 3 positions and nothing in between)

    Hello,

    Your Statement is valid for many cheap chineese Servo-Clones

    Beside "Center" the Lego Servo support 7 Positions to the Left and 7 Positions to the Right.
    In total 15 Positions.

    Unfortunately Lego uses not the "usual" Servo-Control (20ms Periode and 1,0 to 2,0ms High.
    Center is 1,5ms and +/-0,5ms for Left/Right (depend on Servo if this result in +/- 270° angle or only +/- 90°)

    Lego drive C1 = 0 and C2 0 to 100% PWM
    or C2 = 0 and C1 0 to 100% PWM

    In an Youtube-Video (time-Stamp 0:52) you can see an opened Lego-Servo and the 15 Positions for Position-Control/Regulation


    Jo
     


  4. 18 hours ago, MisterCreators Custom MOCs said:

    ... The Dual Channel configuration allows to control two motors separately over one PowerFunctions Connector. .....

    Hello,

    I assume, your PF-Adapter wires GND from Bottom to C1 on Top and 9V (BAT+) from Bottom to C2 omn Top, right ?

    I've borrowed from Philo's Page :

    pfcon.jpg

    So your RC-Box put PWM (lets call them C3 & C4) to the PF-Connector instead GND & 9V.
    Does you conform ?

    I would be interested, why your Box is so high ?
    What is inside ?

    Jo


  5. 21 hours ago, Lok24 said:

    or all together ;-) Perhaps @TexasEngineer454 should open a new thread and ask for others to add lists like that:

     

    
    42099	4x4 X-treme Off-Roader		
    Port A	XL	front drive	white
    Port B	XL	rear drive	red
    Port C	L	steering	blue
    
    Hub      System   ID   Set                          Port    Ids
    ----------------------------------------------------------------------------------------------------
    Control+ Control+ 0x80 42099 4x4 Offroader          A       0x2F XL-Motor  (white)  “Drive Front“
                                                        B       0x2F XL-Motor  (red)    “Drive Rear“
                                                        C       0x2E L-Motor   (blue)   “Stearing“
                                                        D       -
    
                           42100 Liebherr               A Top : 0x2F XL-Motor  (red)    “Arm“ 
                                                          Bot : 0x2F XL-Motor  (red)    “Chain Left“
                                                        B Top : 0x2E L-Motor   (yellow) “Stem“
                                                          Bot : 0x2F XL-Motor  (yellow) “Chain Right“
                                                        C Top : 0x2E L-Motor   (blue)   “Bocket Tilt“
                                                          Bot : -
                                                        D Top : 0x2E L-Motor   (green)  “Bucket Open“
                                                          Bot : 0x2E L-Motor   (green)  “Rotate“
    
                           42109 Top Gear Car           A       -
                                                        B       0x2E L-Motor   (red)    “Steering“
                                                        C       -
                                                        D       0x2F XL-Motor  (yellow) “Drive“
    
                           42114 6x6 Volvo Hauler       A       0x2F XL-Motor  (blue)   “Drive / Tilt“
                                                        B       0x2E L-Motor   (green)  “Gear-Box“
                                                        C       -
                                                        D       0x4B L-Angular (orange) “Steering“
                           42124 Offroad Buggy          A       -
    
                                                        B       0x2E	L-Motor   (-)      “Steering“
                                                        C       0x2E	L-Motor   (-)      “Dive“
                                                        D       -
    
                           42129 Zetros                 A       0x2E L-Motor   (blue)   “Drive 1“
                                                        B       0x2E L-Motor   (red)    “Drive 2“
                                                        C       0x01 M-Motor   (green)  “Differentisl Lock“
                                                        D       0x2E L-Motor   (white)  “Steering“
    
                           42131 Cat D11 Bulldozer      A       0x4B L-Angular (red)    “Chain Left“
                                                        B       0x4B L-Angular (yellow) “Chain Right“
                                                        C       0x2E L-Motor   (green)  “Blade- Lift/Tilt / Gripper-Lift / Stair“
                                                        D       0x2E L-Motor   (blue)   “Gear-Box“
    
                           42140 Transformation Vehicle A       0x2E L-Motor   (violet) “Chain B“
                                                        B       0x2E L-Motor   (teal)   “Chain A“
                                                        C       -
                                                        D       -

     

     


  6. 2 hours ago, AVCampos said:

    The easiest solution for TLG would be to make an "analogue" version of the train controller, something in the lines of MK's 6-way controller. Then it'd just be a matter of Pybricks in the hub interpreting the inputs as needed.
    ...

    Hello,

    Does anybody know what is inside thie MK 6-chanel Remotge ?

    Can the used uC be replaced by another uC suporting Microphyton and therefore also Phybricks ?

    An Arduino Nano BLE 33 with the NRF52840 would be such an candidate in my eyes.

     

    Jo


  7. On 11/20/2022 at 2:10 PM, Toastie said:

    ...

    Here you go:

    ...

    This document (PDF) may be a matching datasheet - it is from Toshiba, from 1999, it covers 8-bit microcontrollers, and it has an onboard LCD driver. But who knows, TLG is always making big secrets about their electronic chippies: 

    https://brickshelf.com/gallery/ThorstenB/ThisAndThat/SCOUT/tmp86cm29u.txt

    (You need to rename the .txt extension to .pdf - Brickshelf does not like PDFs to be uploaded).

    Best regards,
    Thorsten

     

    Hello,

    @Toastie : Again many Thanks.

    The Data-sheet might be an Delta Data-Sheet.
    Big surprise that it has 10-bit ADC

    I digged a little bit and found a Data-Sheet for TMP86CH29BUG

    My conclusin on this ans some other similar documents is :

    Quote

    TLCS-870/C Series

    based on Intel 8080 (/ Zilog Z80) Registers

    TMP86CM29_U_

         !!  !!!
         !!  !!+-- G : tbd
         !!  !!    B : tbd, Emulation Chip
         !!  !!      : no feature
         !!  !!
         !!  !+--- U : PQFP64 0,5mm Pitch
         !!  !     F : PQFP64 0,8mm Pitch
         !!  !     X : Bond-Out Chip, Emulation Chip
         !!  !
         !!  +---- A : tbd, Emulation Chip
         !!        L : Low-Voltage, max 3,3V instead 5V
         !!        B : tbd
         !!          : no feature
         !!
         !+------- M : 32k
         !         H : 16k
         !         8 : 8k
         !         9 : external, Emulation chip TMP86C929AXB
         !         4 : 4k
         !
         +-------- C : Mask
                   F : Flash
                   P : OTP

     

    So Linked more detailed Data-Sheet might fit.

    Jo

     


  8. 5 hours ago, Toastie said:

    Hello Jo,

    now, if it is important to you, I can remove the LCD from a "broken" SCOUT and take a shot.

    You probably know this website as well: https://brickipedia.fandom.com/wiki/Mindstorms_RCX#Scout

    At least we learn it is a Motorola microcontroller with so-and-so much RAM/ROM.

    Just let me know.

    Best,
    Thorsten

    Hello Toastie,

    Thaks for your proposal, I'll be happy to get more Details here.
    The Bricjpedia-Page mentiones a Toshiba uC with 32k (Mask-) ROM and 1K RAM
    Would be nice to figure out what Processor exactly and maybe to find its Data-Sheet
    I'm asking myself, if there is also an LCD Controller used like in the RCX

    Jo


  9. 21 hours ago, aFrInaTi0n said:

    I just recognized the antenna for the buwizz two is on one side?! Thought this would be on the main horizontal pcb...
    buwizz2-antenna.png

    ...

    Hello

    There is a Tear-Down Youtube-Video by GreenGecko of the BuWizz2 available.
    But the Antenna is not where it is in your picture.
    @Zerobricks are there different Versions of the Buwizz2 and what are the (Hardware) differences (obviously the Antenna)

    For the Buwizz3 Sariel did a Tear-Down Youtube-Video
    Here the Antenna seems to be a stamped metalic part

    Jo


  10. 22 hours ago, joeh said:

    @BrickTronic  See attached table for device mode mappings performed by our Adapter board.

    717553588_QikEasyAdapterDeviceModeMapping.jpg.441f24fd9fc207ae2a4cf4e2e3c963c9.jpg

    Thanks,

    Your Table helped a lot to understand.

    I assume, that EV3 Device communicates with UART "A" of ESP8266 and PoweredUp is connected to an UART "B", right ?

    But at attached Motor there are the Encoder-Signals on UART "A" and TxD must then also be an Input.

    A Schematic diagram would be very helpfull to can understand how this is solved (does ESP8266 have a Time- Capture & Compare Funconality  also on this UART "A" ? Does this Cap-Com Trigger react also on rising and folling edges ? Or must you do Bit-Bang for this function ?
     

    Jo


  11. 6 hours ago, joeh said:

    >>> In the MCU processing, there are in fact two different threads running.  One side emulates the EV3 hub to work with EV3 device.  The other side will emulate a Spike Prime device (with the equivalent ID) to work with the spike prime hub.

    >>> It emulates a Spike Prime Pressure force sensor.

    >>> It emulates a Spike Prime Color Sensor.  See here for details: https://www.qikeasy.com/infrared-sensor/

    Hello,

    Is it possible to publish more Datails on this emulation ?

    I've tried to bring this into the following unconfirmed Table :

    EV3 :												emulated Spike/Inventor
    Devive			UART ID	Mode						Device		UART ID	Mode	Remark
    Touch			analog	-							Touch		0x3F	tbd		Mode 0x00 to 0x06, maybe 0x01 used ?
    Color			0x1D	0x00	Reflect				Color		0x3D	tbd		Mode 0x00 to 0x09, maybe Mode 0x01 ?
    						0x01	Ambient									tbd		Mode 0x00 to 0x09, maybe Mode 0x02 ?
    						0x02	Color									tbd		Mode 0x00 to 0x09, maybe Mode 0x00 ?
    						0x03	Ref-Raw									tbd
    						0x04	RGB-Raw									tbd
    						0x05	Col-Cal									tbd
    IR-Seeker		0x21	0x00	Prox				Color		0x3D	tbd
    						0x01	Seek									tbd
    						0x02	Remote									tbd		Mode 0x00 to 0x09, maybe Mode 0x02 ?
    						0x03	Remote-A								tbd
    						0x04	Seek-Alternate							tbd
    						0x05	IR-Cal									tbd
    Ultrasonic		0x1E	0x00	Cont Dist cm		Ultrasonic	0x3D	tbd		Mode 0x00 to 0x08, 
    																				maybe Mode 0x00 or 0x01 ?
    						0x01	Cont Dist Inch							tbd
    						0x02	Listen									tbd		Mode 0x00 to 0x08, maybe Mode 0x03 ?
    						0x03	Single Dist cm							tbd		Mode 0x00 to 0x08, maybe Mode 0x02 ?
    						0x04	Single Dist Inch						tbd
    						0x05	Cont Dist cm Alt						tbd
    						0x06	Cont Dist Inch Alt						tbd
    Gyro			0x20	0x00	Gyro-Angle			Ultrasonic	0x3D	tbd
    						0x01	Gyro-Rate								tbd
    						0x02	Fast-Raw								tbd
    						0x03	Gyro-Rate&Angle							tbd		Mode 0x00 to 0x08, 
    																				maybe Mode 0x00, 0x01 or 0x02 ?
    						0x04	Cal										tbd
    						0x05	Tilt-Rate								tbd		Mode 0x00 to 0x08, maybe Mode 0x01 ?
    						0x06	Tilt-Angle								tbd		Mode 0x00 to 0x08, maybe Mode 0x04 ?
    Large Motor		analog		-						tbd			tbd		tbd		what Spike-Prime Motor ID used ?
    																				0x30, 0x31, 0x41, 0x4B or 0x4C
    Medium Motor	analog		-						tbd			tbd		tbd		what Spike-Prime Motor ID used ?
    																				0x30, 0x31, 0x41, 0x4B or 0x4C
                                                        
    How Access EV3-Sensor Modes not "translated" ?
    What is delivered when accessing PoweredUp-Sensor Modes not used for translation ?
    

    Jo


  12. 8 hours ago, joeh said:

    ... do protocol level translation so that the EV3 sensors will be recognized as Spike Prime sensors.  ...
    The board is powered by an ESP8266 MCU.  As such, even EV3 motors work with this board.

    https://www.qikeasy.com/

    Hello,

    Inreresting module.

    But I can not see the 6pin Cable to the HUB with its connector.
    What does you use here and why is it not visible ?

    What was the reason to use an ESP8266 ?
    For what does you need WLAN/WIFI ?

    What happens if you plug in NXT Sensors/Motor ?

    How did you translate the EV3 UART IDs to PoweredUp-ID numbers ?
    You also listed the analog EV3 Touch Sensors. How ist it reported to the Hub ?

    How is translated the IR-Sensor to the Hub ?

     

    Jo


  13. 14 hours ago, Phondly said:

    Hi,

    Sorry, this will be a commercial product, ...

    Hello,

    Does you plan to use a injection-mold housing or still a 3D-printed case for the comercial version ?
    How many orders does you expect, that a molding-tool would make sense ?

    Unfortunately I was not able to contact you via your Web-Page.
    For a comercial Product this and an Impressum should be available

    Jo


  14. On 2/20/2022 at 4:14 PM, fotoopa said:

    ...

    51892911273_fe2b3bb631_c.jpg

    ...

    Update: Just tested the motor and there the CMD is:

    5C 23 00 10 20 30 00 00 00 80
     

    Frans.

    Hello,

    Unfortunately Lego did a poor Job on Documentation.
    The BLE/GATT Profile is long time outdated and has big gaps.
    The UART Protocol is fully undocumented by LEGO and that what is
    available is Reverese-Engineering from Fans like Philo.

    About the UART Messages :

    0x4C 0x20 0x00 0x93
    
    0x4C -> 01001100b	    where
            01		        is a Command-Message
    		  001      		is 2^1 = 2 Data-Byte
    		     100	    is Command "Write to Sensor/Motor"
    
         0x20 0x00	        are the Data-Bytes that has to be "Written"to the Sensor/Moror
    
                   0x93	    XOR Checksum
    
    
    1. Data-Byte :
    
         0x20				is the Sub-Command to set the Mode-Combining
           2			    is the Comand itself (there is told, that the EV3 Gyro
    			            knows also 0x11 and/ot 0x88)
            0		        specify how much Modes has to be combined and mapped
                			Zero mean, that a previous Mode-Combining is removed
    
    2. Data-Byte :
    
              0x00	        not confirmed, but maybe
                			Specify the Mapping for Mode 0, starting at 1st Data-Element
                0	        identify the Mode itself to be used for Mapping
                 0	        identify the Index-Element Data in the Mode
    
    ---------------------------------------------------------------------------------------
    
    0x43 0x00 0xBC
    
    0x43 -> 01000011b	    where
            01		        is a Command-Message
    		  000      		is 2^0 = 1 Data-Byte
    		     011	    is Command "Select Mode"
    
         0x00		        is the Data-Bytes to which the Sensor/Moror has to switch
    
              0xBC	        XOR Checksum
    
    ---------------------------------------------------------------------------------------
    
    0x02 -> 00000010b	    where
            00		        is a System-Message
    		  000      		always 0 because System-Commands does not have Data and Checksum
    			            There is only 1 exception for future extensions
    		     010	    is soecify the Not-Acknowledge (NACK) that is used to detect
    			            a Timeout in UART-Communication (Watchdog)
    
    ---------------------------------------------------------------------------------------
    
    0x5C 0x25 0x00 0x10 0x00 0x50 0x51 0x52 0x00 0xC5
    
    0x5C -> 01011100b	    where
            01		        is a Command-Message
    		  011      		is 2^3 = 8 Data-Byte
    		     100	    is Command "Write to Sensor/Motor"
    
    1. Data-Byte :
    
         0x25		        there has to be mapped 5 Data (Data can be Byte, Word, Lomg or Float)
    
    2. Data-Byte :
    
              0x00	        map Combined-Mode to Mode 0
    
    3. to 7. Byte	        specifies the sequence of Data in the Combined-Mode
    
                   0x10	    Mode 1, Data[0] : Reflect [1x Byte]
                   0x00	    Mode 0, Data[0] : Color   [1x Byte]
                   0x50	    Mode 5, Data[0] : RGBI    [4x Wprd],
    						so Index 0 mean 1. Value that might be "Red"
                   0x51	    Mode 5, Data[1] : RGBI    [4x Wprd],
                            so Index 1 mean 2. Value that might be "Green"
                   0x52	    Mode 5, Data[2] : RGBI    [4x Wprd],
                            so Index 2 mean 3. Value that might be "Blue"
    
    8. Byte		            0x00 used for Padding
    
                       0x93 XOR Checksum
    
    Note, that the 4. Word (Index 3) of Mode 5 is skipped (Intensity)
    
    ---------------------------------------------------------------------------------------
    
    Would be interesting what Modes the Force-Sensor would combine.
    
    ---------------------------------------------------------------------------------------
    
    The allowed Modes for Combining of the Ultrasonic Distance Sensor is unknown
    or maybe not sent during the Init-sequence because not available
    
    ---------------------------------------------------------------------------------------
    
    0x5C 0x23 0x00 0x10 0x20 0x30 0x00 0x00 0x00 0x80
    
    0x5C -> 01011100b	    where
            01		        is a Command-Message
    		  011      		is 2^3 = 8 Data-Byte
    		     100	    is Command "Write to Sensor/Motor"
    
    1. Data-Byte :
    
         0x23		        there has to be mapped 3 Data
    			            (Data can be Byte (8-Bit), Word (16-Bit), Lomg (32-Bit) or Float (32-Bit))
    
    2. Data-Byte :
    
              0x00	        map Combined-Mode to Mode 0
    
    3. to 5. Byte	        specifies the sequence of Data in the Combined-Mode
    
                   0x10	    Mode 1, Data[0] : Speed [1x Byte]
                   0x20	    Mode 2, Data[0] : Pos   [1x Long]
                   0x30	    Mode 3, Data[0] : APos  [1x Word]
    
    6. to 8. Byte	        0x00 used for Padding
    
                       0x80 XOR Checksum


    Jo


  15. Hello,

    Color-Sensor :

    The 16-Bit Values "Red", "Green" Blue" might be :
    fraction of RGBI (4x 16-Bit Raw-Values Mode 5) or HSV (3x 16-Bit Raw-Values Mode 6),
    but your observed Values are strange for HSV

    Also strange that according to Sensor Init-Data all 3 HSV RAW Values should
    be in Range 0 to 360° but Saturation and Intensity are according the HSV-Model
    in Ranhe 0 to 100%

    To can clarify what exacly is mapped, there has to be evaluated the Write-Command
    (0x54 with 4 Data or 0x5C with 8 Data) from Hub to Sensor that issues Mode-Combining


    Force-Sensor :

    The 16-Bit "ForceA" could be :
    ForceRaw (1x 16-Bit Raw Value Mode 4) or ForcePeakRaw (1x 16-Bit Raw Value Mode 5)

    Again here, to clarify what is really mapped, can only be clarified when
    evaluating the Write-Command (0x54 or 0x5C).

    Your FPGA is able to also read Data on TXD-Line (Pin 5) from Hub to Sensor.
    Can you do a record of this TXD-Data starting after switch over to 115200Bd
    or trigger on 0x54 or 0x5C on TXD Line to evaluate the Combine-Mode Data


    Jo


  16. 4 hours ago, fotoopa said:

    ...

    Example of reading out the Lego Mindstorms color sensor on the PC. Now 4 values are read out: Light, red, green, and blue color. The RGB values have a range up to 1023, the light value up to about 2660. If there is no object in the picture, the RGB values are just above 0, the light value is -255, so lower than zero.

    ...

    Frans.

    Hello,

    Does you have records of the TXD-Line (Hub to Sensor) just before observed Values are starting (after initiialisation) ?

    I think you will get Mode-Combined Data (Mode 6 + 1 + 0) -> 3x Word with HSV Color-Data followed
    by 1-Byte Ambient-Light (max 100% -> 0x64) and finaly the Color-Index (max 10 -> 0x0A) that would explain
    the strange max limit of 2660 (0xA64 -> 0x64 0x0A with least significant Byte first)

    I would expect a Mode-Combining-Command similar to :
    0x54 0x23 0x00 0x60 0x10 0x07 or
    0x5C 0x23 0x00 0x60 0x10 0x00 0x00 0x00 0x00 0x0F


    Jo

     


  17. 3 hours ago, fotoopa said:

    In the meantime, I have done a lot of measurements with the Lego Mindstorms 51515

    ...

    Frans.

     

    Hello,

    More Info on the UART Protocol you can find here : https://github.com/pybricks/technical-info/blob/master/uart-protocol.md

    and also here

    Frame 52 00 C2 01 00 6E is the Comand "Speed" with the 32-Bit Valie for the UART Speed of 115200Bd. 6E is the XOR Checksum.

     

    Jo