Skip to main content

FLL EV3 Robot

This blog post is about our current EV3 robot we're planning to use in the 2023/2024 FLL competition. Some features: 2 large motors for steering. 2 medium motors for attachments.  2 colour sensors for picking up the white and black lines, also used for line squaring. 1 gyro sensor. To enable attachments to be changed as quickly as possible we're using gravity to keep the gears connected, i.e. you don't need to fasten anything to the robot. Every attachment has 2x 12 tooth double bevel gear (part 32270) which comes in contact with the 2x 20 tooth double bevel gears (part 32269) on the robot. The medium motors are horizontally aligned on the robots, but we use 12 tooth double bevel gears to convert that to vertical alignments. These in turn are connected to 20 tooth double bevel gears, and the attachments in turn connect to these 20 tooth double bevel gears with their 12 tooth double bevel gears.  The complete robot is modelled in Bricklink Studio 2 . You can download the rob...

Clone hard drive using dd

If you wish to copy an entire hard drive to another hard drive (i.e. clone) you can use the standard "dd" program available on almost any Linux distribution. A good reason for cloning would be to move all data from a spinning disk to an SSD disk, but in theory it could be anything that acts as a block device, even a file (e.g. allowing you to write all contents from a disk to a single file, and vice versa).

I'm usually using SliTaz because it's a lightweight Linux distribution allowing for fast boot times, normally under 5 seconds when you use the SliTaz base Live option.

So here is the steps I'm following:

  1. Connect both hard drives to the same PC.
  2. Boot from SliTaz USB drive & choose the SliTaz base Live option.
  3. Login as root with password root.
  4. Execute "dmesg | grep sd" to see all hard drives connected to the system. You'll need to verify the source & destination disk.
  5. Once you've identified the source disk (input file) and destination disk (output file) you can run the dd command, in this case we'll copy from /dev/sdb to /dev/sda:
    dd if=/dev/sdb of=/dev/sda conv=noerror,sync bs=8M

    Notes:
    if: input file
    of: output file
    conv=noerror: don't stop on any read error
    conv=sync: in the event of hitting an error keep the output in sync with the input by padding the missing data. Note that the complete block will be padded, use a smaller block size to keep data loss to a minimum.
    bs: block size. 8 MB is usually a good choice here, but you might want to use a lower size if the source drive has read errors.
  6. Wait for the process to complete.
  7. Type in "halt" to stop SliTaz.
  8. Power down the system.
  9. Remove the source drive and only keep the destination drive.
  10. Power up the system. If everything went to plan it should now boot up your existing system from the new hard drive.


Notes:

  1. Your destination drive must usually be bigger as your source drive. When you want to clone a bigger hard drive to a smaller hard drive you'll first need to resize the partitions so that it will fit on the smaller drive (usually needed for SSD). If you've done that you can safely ignore the error message when dd completes.
  2. By default dd will not give any feedback on the progress, but you can open another terminal (Ctrl-Alt-F2) and log in as root again. Then find the dd process by doing
    ps -ef | grep dd

    Find the row with your dd command. The first column will be your process ID. Then do a
    kill -sigusr1 pid
    where you replace the pid with the process ID. Then switch back to the first terminal (Ctrl-Alt-F1) and it will show you the current progress.
  3. It's a painful process to shrink a Windows partition, especially when there are files open (i.e. system is running from this drive). Typically you'll need to:
    • Disable hibernation: powercfg -h off
    • Disable page file
    • Disable system restore
    • Delete temp files
    • Run defrag
    • Open Disk Management, right-click on the partition and choose "Shrink Volume". It will query the amount of space you can shrink and choose the max size to shrink.
    • If the partition size is still too big, open the Event Viewer and search for event ID 259 under Windows Logs - Application. Clicking on the event will show the filename that's limiting the shrink. Once you've resolved this file you'll need to re-run defrag & shrink volume.
    • Once you have the system running on the new hard drive you can extend the volume so that it fills the new hard drive, and enable everything you've disabled to shrink the partition.


Comments

Popular posts from this blog

Installing Lego Digital Designer (LDD) on Windows 10

If you're using Windows 10 18.09 or later and try to install Lego Digital Designer (LDD) 4.3.11 you'll probably get an installation error for Adobe Flash Player. However, there is an easy way around it: Download the installation file for LDD 4.3.11. Rename the .exe file to .zip. If you don't see the .exe extension in Explorer, go to "View - Options" on the Explorer menu, then under the "View" tab deselect the "Hide extensions for known file types". Open the zip file with Windows Explorer. Copy all files in the zip to another directory on your computer. In the new folder: Delete install_flash_player_active_x.exe. Copy OpenGLChecker.exe and rename it to install_flash_player_active_x.exe. Run LDDSetup.exe. In short the installer will execute install_flash_player_active_x.exe during the installation process, but all it does now is to execute the same logic as what OpenGLChecker does. In theory you can run any .exe that will not retu...

Install OpenWRT 14.09 on TP-Link MR3420 with Huawei E353 3G dongle

This post will describe how to install OpenWRT 14.09 on a TP-Link MR3420 router, plus configure it to use a Huawei E353 3G dongle to connect to the internet. First download the firmware, plus extra packages we'll need later. Store this on your computer: http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/openwrt-ar71xx-generic-tl-mr3420-v1-squashfs-factory.bin http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-mii_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-usb-net_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-usb-net-cdc-ether_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/kmod-usb-net-rndis_3.10.49-1_ar71xx.ipk http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base/libpthread_0.9.33.2-1_ar71xx.ipk http://downloads.openwrt.org/...

8051 ROM replaced with SRAM

Compare this schematic to the 8051 schematic posted earlier. U6 (2764 8kb ROM chip) was replaced with a 6264 8kB SRAM chip. The idea is that the 8051 will still be able to access this chip as an external ROM chip using PSEN#, but also as external RAM. This way it is possible to download firmware to SRAM and execute the firmware as if it was stored on ROM. Comparing the DIP pinouts between SRAM (6264 8kb SRAM) and ROM (2764 8kB ROM), we can see that the two chips follow more or less the same pin layout, except for the address pins: Pin SRAM ROM 1 N/C Vpp 2 A4 A12 3 A5 A7 4 A6 A6 5 A7 A5 6 A8 A4 7 A9 A3 8 A10 A2 9 A11 A1 10 A12 A0 11 D0 D0 12 D1 D1 13 D2 D2 14 Gnd Gnd 15 D3 D3 16 D4 D4 17 D5 D5 18 D6 D6 19 D7 D7 20 CE1# CE# 21 A0 A10 22 RD# G# 23 A1 A11 24 A2 A9 25 A3 A8 26 CE2 N/C 27 WR# P# 28 Vcc Vcc To enable the SRAM to respond to ROM access and RAM access, we need to add logic to the chip select and output enable pins. Chip select (CE1# and CE2): The SRAM should be selected either...