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

Windows Hyper-V Server 2019

This post will explain how to use the free Hyper-V Windows 2019 Server version. This version doesn't come with any GUI interface as provided in the full Windows 2019 Server version. Instead it comes with a character interface, but with the help of some third party tools you can easily get a fully functional Hyper-V server for free. The following will be assumed: You have a dedicated server connected to a network and you want to install Hyper-V 2019 on this server to run Virtual Machines and/or act as a file server. You have physical access to this server to do the installation. You have another machine connected to the same network to do remote management, running a recent version of Microsoft Windows. You don't want to join a domain or use Active Directory. You can do this if you want to, but this is not included in this post. First you'll need to download the Hyper-V 2019 ISO from  https://www.microsoft.com/en-us/evalcenter/evaluate-hyper-v-server-2019 . You’ll

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/