SparkFun JetBot AI kit – monteringsinstruktioner

Assembly Guide for SparkFun JetBot AI Kit

Introduction

SparkFun’s version of the JetBot merges the industry leading machine learning capabilities of the NVIDIA Jetson Nano with the vast SparkFun ecosystem of sensors and accessories. Packaged as a ready to assemble robotics platform, the SparkFun JetBot Kit requires no additional components or 3D printing to get started – just assemble the robot, boot up the Jetson Nano, connect to WiFi and start using the JetBot immediately. This combination of advanced technologies in a ready-to-assemble package makes the SparkFun JetBot Kit a standout, delivering one of the strongest robotics platforms on the market. This guide serves as hardware assembly instructions for the two kits that SparkFun sells; Jetbot including Jetson Nano & the Jetbot add-on kit without the NVIDIA Jetson Nano. The SparkFun JetBot comes with a pre-flashed micro SD card image that includes the Nvidia JetBot base image with additional installations of the SparkFun Qwiic Python library, Edimax WiFi driver, Amazon Greengrass, and the JetBot ROS. Users only need to plug in the SD card and set up the WiFi connection to get started.

Completed SparkFun Jetbot

Note: We recommend that you read all of the directions first, before building your Jetbot. However, we empathize if you are just here for the pictures & a general feel for the SparkFun Jetbot. We are also those people who on occasion void warranties & recycle unopened instructions manuals. However, SparkFun can only provide support for the instructions laid out in the following pages.

Attention: The SD card in this kit comes pre-flashed to work with our hardware and has the all the modules installed (including the sample machine learning models needed for the collision avoidance and object following examples). The only software procedures needed to get your Jetbot running are steps 2-4 from the Nvidia instructions (i.e. setup the WiFi connection and then connect to the Jetbot using a browser). Please DO NOT format or flash a new image on the SD card; otherwise, you will need to flash our image back onto the card.

If you accidentally make this mistake, don’t worry. You can find instructions for re-flashing our image back onto the SD card in the software section of the guide

The Jetson Nano Developer Kit offers extensibility through an industry standard GPIO header and associated programming capabilities like the Jetson GPIO Python library. Building off this capability, the SparkFun kit includes the SparkFun Qwiic pHat for Raspberry Pi, enabling immediate access to the extensive SparkFun Qwiic ecosystem from within the Jetson Nano environment, which makes it easy to integrate more than 30 sensors (no soldering and daisy-chainable).


The SparkFun Qwiic Connect System is an ecosystem of I2C sensors, actuators, shields and cables that make prototyping faster and less prone to error. All Qwiic-enabled boards use a common 1mm pitch, 4-pin JST connector. This reduces the amount of required PCB space, and polarized connections mean you can’t hook it up wrong.


Materials

SparkFun Jetbot parts

The SparkFun Jetbot Kit contains the following pieces; roughly top to bottom, left to right.

PartQty
Circular Robotics Chassis Kit (Two-Layer)1
Lithium Ion Battery Pack – 10Ah (3A/1A USB Ports)1
Ball Caster Metal – 3/8″1
Edimax 2-in-1 WiFi and Bluetooth 4.0 Adapter1
Header – male – PTH – 40 pin – straight1
2 in – 22 gauge solid core hookup wire (red)1
Shadow Chassis Motor (pair)1
Jetson Dev Kit (Optional)1
SparkFun JetBot Acrylic Mounting Plate1
SparkFun Jetbot image (Pre Flashed)1
Leopard Imaging 145 FOV Camera1
Screw Terminals 2.54mm Pitch (2-Pin)2
SparkFun Micro OLED Breakout (Qwiic)1
SparkFun microB USB Breakout1
SparkFun Serial Controlled Motor Driver1
Breadboard Mini Self-Adhesive Red1
SparkFun Qwiic HAT for Raspberry Pi1
SparkFun JetBot Acrylic sidewall for camera mount2
SparkFun JetBot Acrylic Camera mount & 4x nylon mounting hardware1
Qwiic Cable – 100mm1
Qwiic Cable – Female Jumper (4-pin)1
Wheels & Tires – included as part of circular robotics chassis2
USB Micro-B Cable – 6″2
Dual Lock Velcro1
SparkFun Jetbot included hardware

The SparkFun Jetbot Kit contains the following hardware; roughly top to bottom, left to right.

PartQty
Hex Standoff #4-40 Alum 2-3/8″3
Standoff – Nylon (4-40; 3/8in.)10
1/4″ Phillips Screw with 4-40 Thread20
Machine Screw Nut – 4-4010
Circular Robotics Chassis Kit (Two-Layer) Hardware1

Recommended Tools

We did not include any tools in this kit because if you are like us you are looking for an excuse to use the tools you have more than needing new tools to work on your projects. That said, the following tools will be required to assemble your SparkFun Jetbot.

  • Small phillips & small flat head head screwdriver will be needed for chassis assembly & to tighten the screw terminal connections for each motor. We reccomend the Pocket Screwdriver Set; TOL-12268.
  • Pair of scissors will be needed to cut the adhesive Dual Lock Velcro strap to desired size; recommended, but not essential..
  • Soldering kit for assembly & configuration of the SparkFun Serial Controlled Motor Driver – example TOL-14681
  • Optional– adjustable wrench or pliers to hold small components (nuts & standoffs) in place while tightening screws; your finger grip is usually enough to hold these in place while tightening screws & helps to ensure nothing is over tightened.A Note About Directions

When we talk about the ”front,” or ”forward” of the JetBot, we are referring to direction the camera is pointed when the Jetbot is fully assembled. ”Left” and ”Right” will be from the perspective of the SparkFun Jetbot.

Front of Jetbot

1. Circular Robotics Chassis Kit (Two-Layer) Assembly

If you prefer to follow along with a video, check out this feature from the chassis product page. You do not need to use the included ball caster as a larger option has been provided for smoother operation.

Start by attaching the chassis motor mount tabs to each of the ”Shadow Chassis Motors (pair)” using the long threaded machine screws & nuts included with the Circular Robotics Chassis Kit.

Hobby motor and mount

Fit the rubber wheels onto the hubs, install the wheel onto each motor, & fix them into position using the self tapping screws included with the Circular Robotics Chassis Kit.

hobby motor with wheel

Install the brass colored standoffs included with the Circular Robotics Chassis Kit; two in the rear and one in the front. The rear of the SparkFun Jetbot will be on the side of the plate with the two ”+” sign cut outs. The rear of the motor will be opposite the wheel where the spindle extends. This orientation ensures the widest base & most stable set up for your Jetbot.

motor mount to plate

The motor mounts fit into two mirrored inlets in each base plate as shown. Install the motors opposite of one another.

install standoffs

Depending on how you install the motor mounts to each motor will dictate how the motor can be installed on the base plate. Note: Do not worry about the motor orientation as you will determine proper motor operation in how you connect the motor leads to the SparkFun Serial Controlled Motor Driver. Notice how in the picture below one motor has the label facing up, while the other has the label facing down.

both motors on plate and standoffs

Place the other circular robot chassis plate on top of and align the two ”+” and the motor mount tab recesses. Hold the sandwiched chassis together with one hand and install the remaining Phillips head screws included with the Circular Robotics Chassis Kit through the top plate & into the threaded standoffs.

install top plate

Your main chassis is now assembled! The Circular Robotics Chassis Kit also contains a very small caster wheel assembly, but we have included a larger metal caster ball to increase the stability of the SparkFun Jetbot. We will cover the installation of this caster ball later in the tutorial.

screw install top plate

Utilize three of the included 1/4 in 4-40 Phillips Screws through the top chassis plate with threads facing up & install the 2-3/8 in #4-40 Aluminum Hex Standoff until they are finger tight.

install tall standoffs

The aluminum stand offs should be pointing up as shown below.

Standoff installed

The SparkFun JetBot acrylic mounting plate is designed to have two of these aluminum standoffs in the front & one in the rear. We recommend the rear standoff on the left side of the chassis (as shown) so the 6 in microB usb cables that will be installed later can more easily span the gap needed to power the JetBot.

all standoffs installed

Un-package the 3/8 in Metal Caster Ball and thread the mounting screws through all pieces as shown. Note the full stack height will help balance the Jetbot in a stable position.

caster wheel assembly
more caster wheel assembly

Install the caster wheel using the Phillips head screws and nuts included with the 3/8 in caster ball assembly. The holes on the caster assembly are spaced to fit snug on the innermost segment of the angular slots near the rear of the lower plate on the JetBot chassis. Again, hand tight is just fine. Note: if you over tighten these screws it will prevent the ball from easily rotating in the plastic assembly. However, too loose and it may un-thread; go for what feels right

caster install to chassis

After you have installed the caster & aluminum standoffs, thread the motor wires through the back of the chassis standoffs for use later.

Completed chassis

2. Camera Assembly & Installation

Unpackage the Leopard Imaging camera & align the four holes in the acrylic mounting plate with those on the camera.

Note: ensure that the ribbon cable is extending over the acrylic plate on the edge that does not have mounting holes near the edge; as shown below.

Place all four nylon flathead screws through the camera & acrylic mounting plate prior to fully tightening the nylon nuts. This will ensure equal alignment across all four screws. Tighten the screws while holding the nuts with finger pressure in a rotating criss cross pattern; similar to how you tighten lug nuts on a car rim.

Camera to mount

Align one acrylic sidewall with the camera mounting plate as shown below ensuring that the widest section of the sidewall is oriented to the top of the camera mount where the ribbon cable extends.

camera sidewall install

Apply even pressure on each piece until they fit together. Note: these pieces are designed to have an interference fit and will have a nice, satisfying ”click” when they fit together.

camera sidewall complete

Repeat this process on the other side to fully assemble the camera mount.

fully assembled camera

The camera mount should now be installed to the SparkFun Jetbot acrylic mounting plate using the overlapping groove joints. Ensure that the cut out on the acrylic mounting plate is facing towards the front/right of the Jetbot as shown. This will ensure that there is plenty of room for the camera ribbon cable to pass around the assembly and up to the Jetson nano camera connector.

camera mount to plate

Install four of the nylon standoffs to the top of the SparkFun Jetbot acrylic mounting plate using four of the included 1/4 in 4-40 Phillips head screws as shown below.

Jetson Nano standoffs to plate
all standoffs on plate

Utilize three more of the 1/4 in 4-40 Phillips head screws to install the SparkFun Jetbot acrylic mounting plate to the aluminum standoffs extending from the Two-layer circular robotics chassis as shown below.

install camera plate to chassis

3. Motor Driver Assembly & Configuration

To get started, make sure that you are familiar with the SparkFun Serial Controlled Motor Driver Hookup Guide.

We also recommend a detailed review of the Hardware Overview of the SparkFun Serial Controlled Motor Driver Here.

Annotated front SparkFun Serial Controlled Motor Driver

You will need to solder both triple jumpers labeled below as ”I2C pull-up enable jumpers” as the SparkFun pHat utilizes the I2C protocol. The default I2C address that is used by the pre-flashed SparkFun Jetbot image is 0x5D which is equavalent to soldering pad #3 noted as ”configuration bits” on the back of the SparkFun serial controlled motor driver; see below. You will need to create a solder jumper on pad #3 only for the SparkFun Jetbot Image to work properly.

Annotated rear SparkFun Serial Controlled Motor Driver

Layout of jumpers on the Serial Controlled Motor Driver.

Properly Jumpered SCMD

Jumper 3 of theConfiguration Bitsproperly soldered.

Your completed Serial Controlled motor drive should look somewhat similar to the board shown below.

  • The 2-pin screw terminals are soldered to the ”Motor Connections.”
  • Break off 4 Male PTH straight headers and solder into the ”Power (VIN) connection” points.
  • Break off 5 Male PTH straight headers and solder into the ”Expansion port” points. These will not be used, but will provide additional board stability when installed into the mini breadboard.
  • Break off 5 Male PTH straight headers and solder into the ”User port” points for connection into the included Female Jumper Qwiic cables.
completed motor driver
completed motor driver 2

Break off 5 Male PTH straight headers and solder into the breakout points on the SparkFun microB USB Breakout.

Install both the SparkFun Serial Controlled Motor Driver & the SparkFun microB Breakout board on the included mini breadboard so the ”GRD” terminals for each unit share a bridge on one side of the breadboard.

Utilize the included 2 in – 22 gauge solid core hookup wire (red) to bridge the ”VCC” pin for the SparkFun microB Breakout to either (VIN) connection point on the SparkFun Serial Controlled Motor Driver as shown below.

motor driver and usb to breadboard

Required power connections between the micro-USB breakout and the Serial Controlled Motor Driver.

motor driver and usb to breadboard

Competed assembly of the micro-USB breakout and Serial Controlled Motor Driver on the breadboard.

Utilize a small flat head screwdriver to loosen the four connection points on the screw terminals. When inserting the motor connection wires, note the desired output given the caution noted in section #1 of this assembly guide.

Note from section #1: Do not worry about the motor orientation as you will determine proper motor operation in how you connect the motor leads to the SparkFun Serial Controlled Motor Driver.

These connection points can be corrected when testing the robot functionality. If your Jetbot goes straight when you expect Jetbot to turn or vice versa, your leads need to be corrected.

motor cables to motor driver

Set this assembly aside for full installation later.

4. Accessory Installation to Main Chassis

Align the mounting holes on the SparkFun Micro OLED (Qwiic) with those on the back of the SparkFun Jetbot acrylic mounting plate. Install the Micro OLED using two 1/4 in 4-40 Phillips head screws and two 4-40 machine screw nuts.

qwiic oled to chassis
completed qwiic oled to chassis

Thread the ribbon cable of the Leopard imaging camera back through the acrylic mounting plate and half-helix towards the left side of the Jetbot.

camera ribbon cable threading

Install the Jetson Nano Dev kit to the nylon standoffs using four 1/4 in 4-40 Phillips head screws. Tighten each screw slightly in a criss-cross pattern to ensure the through holes do not bind during install until finger tight. Make sure you can still access the camera ribbon cable.

Jetson Nano install

Note: the camera connector is made from small plastic components & can break easier than you think. Please be careful with this next step.

Loosen the camera connector with a fingernail or small flathead screwdriver. Fit the ribbon cable into this connector and depress the plastic press fit piece of the connector to hold the ribbon cable in place.

camera attachment to Jetson Nano

Unpackage & install the USB Wifi adaptor into one of the USB ports on the Jetson nano Dev Kit. The drivers for this Wifi adaptor are pre-installed on the SparkFun Jetbot image. If you are making your own image, you will need to ensure you get these from Edimax.

USB wifi install to Jetson Nano

Align the SparkFun pHat with the GPIO headers on the Jetson Nano Dev Kit so that the pHat overhangs the right hand side of the Jetbot. For additional information on hardware assembly of the SparkFun pHat, please reference the hookup guide here.

Note: The heatsink on the Jetson Nano Dev Kit will only allow for one orientation of the SparkFun pHat.

PHat installation

Wrap the motor wires around the rear/left standoff to take up some of the slack; one or two passes should do. Peel the cover off the self adhesive backing on the mini breadboard you set aside at the end of section #3.

breadboard installation to chassis

Place the breadboard near the back of the Jetbot Acrylic mounting plate where there is good adhesion & access to all the components. Attach the (4-pin) Female Jumper Qwiic cable to the SparkFun Serial Controlled Motor Driver pins as shown. Yellow to ”SCL,” Blue to ”SDA,” Black to ”GND.”

breadboard placement on chassis and qwiic cable to motor driver

Daisy chain the polarized Qwiic connector on the other end of the (4-pin) Female Jumper Qwiic cable into the back of the SparkFun Micro OLED (Qwiic).

Qwiic cable installation

Using the 100mm Qwiic Cable attach the SparkFun Micro OLED front Qwiic connector to the SparkFun pHat as shown.

Qwiic install to PHat board

Cut the Dual Lock Velcro into two pieces and align them on the 10Ah battery & top plate of the Two-Layer Circular Robotics Chassis as shown below. Ensure that the USB ports on the battery pack are pointing out the back of the Jetbot. Additionally, the orange port (3A) will need to power the Jetson Nano Dev Kit & therefore will need to be on the right side of the Jetbot.

battery pack Velcro placement
Note high amp usb socket

Apply firm pressure to the battery pack to attach to the Jetbot chassis via the Dual Lock Velcro.

battery pack installation

Remove the micro SD card from the SD card adapter.

micro SD card

Insert the micro SD card facing down into the micro SD card slot on the front of the Jetson Nano Dev Kit. Please see the next three pictures for additional details.

install image into SD card slot on Jetson
Card in SD slot
Card in SD clost underview

The USB ports on the back of the 10Ah battery pack has two differently colored ports. The black port (1A) is used to power the motor driver via the SparkFun microB breakout. Utilize one of the 6 in micro-B USB cables to supply power to the microB breakout.

USB power motor drivers low amp
Note high amp usb socket

Note: Once you plug the Jetson Nano Dev Kit into the 3A power port, this will ”Boot Jetson Nano” which is not covered in detail until the links in section #5 of this assembly guide. Do not proceed unless you are ready to move forward with the software setup & examples provided by NVIDIA.

The orange port (3A) is used to power the Jetson Nano Dev Kit. Utilize the remaining 6 in micro-B USB cable to supply power to the Jetson Nano Dev Kit.

Final usb cable install

Congratulations! You have fully assembled your SparkFun JetBot AI Kit!

5. Software Setup Guide from NVIDIA

Attention: The SD card in this kit comes pre-flashed to work with our hardware and has the all the modules installed (including the sample machine learning models needed for the collision avoidance and object following examples). The only software procedures needed to get your Jetbot running are steps 2-4 from the Nvidia instructions (i.e. setup the WiFi connection and then connect to the Jetbot using a browser). Please DO NOT format or flash a new image on the SD card; otherwise, you will need to flash our image back onto the card (instructions below).

Your SparkFun Jetbot comes with a Pre-Flashed micro SD card. Users only need to plug in the SD card and set up the WiFi connection to get started.

  • The default password on everything (i.e. login/user, jupyter notebook, and superuser) is ”jetbot”.
  • We recommend that users change their passwords after initial setup. These are typically covered on the first boot of your Jetson Nano as detailed in the NVIDIA Getting Started with Jetson Nano walkthrough

Software Setup

The only steps needed to get your Jetbot kit up and running is to log into the Jetbot and setup your WiFi connection. Once that is done, you are now ready to connect to the Jetbot wirelessly. If you need instructions for doing so, you can use the link below.However, please take note of our instructions below. You will want to skip steps 1 and 5 to avoid erasing the image on the card or undoing the hardware configuration.NVIDIA JETBOT WIKI SOFTWARE SETUP

Instructions

  1. Skip step 1 of Nvidia’s instructions: It references how to flash your SD card, so feel free to skip to Step 2 – Boot Jetson Nano.

Note: Following Step 1 will erase the pre-flashed image and make a lot of extra work for yourself.

  1. Skip step 5 of Nvidia’s instructions: This step should already be setup on the pre-flashed SD card.

Get and install the latest JetBot repository from GitHub by entering the following commands

COPY CODEgit clone https://github.com/NVIDIA-AI-IOT/jetbot
cd jetbot
sudo python3 setup.py install

Note:Running sudo python3 setup.py install in the command line will overwrite the software modifications for SparkFun’s hardware in the kit.

Troubleshooting

In the event that you accidentally missed the instructions above, here are instructions to get back on track.

Re-Flashing the SD card

If you need to re-flash your SD card, follow the instructions from Step 1 Nvidia’s guide. However, download and use our image instead (click link below).DOWNLOAD SPARKFUN’S JETBOT IMAGENote: Don’t forget to uncompress (i.e. unzip, extract, or expand) the file from the .zip file/folder first. You should be pointing the ”flashing” software to an ~62GB .img file to flash the image (sparkfun_jetbot_v01-00.img) onto the SD card.

Alternatively, there are other options for flashing images onto an SD card. If you have a preferred method, feel free to use the option you are most comfortable with.

Re-Applying the Software Modifications

If you have accidentally, overwritten the software modifications for the hardware included in your kit, you will need to repeat Step 5 from Nvidia’s guide from the desktop interface (if you are comfortable performing the following steps from the command line, feel free to do so).

Skip steps 1 and 2: Plug in a keyboard, mouse, and monitor. Then log in to the desktop interface (if you haven’t changed your password, the default password is: jetbot).

Follow step 3: Launch the terminal. There is an icon on sidebar on the left hand side. Otherwise, you can use the keyboard short cut (Ctrl + Alt + T).

Follow step 4: However, before you execute sudo python3 setup.py install you will want to copy in our file modifications to the jetbot directory you are in.

  1. Begin by downloading our files (click link below).

DOWNLOAD MODIFICATION FILES

  1. Next, extract the file.
  2. Next, replace the files in the jetbot folder. The file paths must be the same, so make sure to overwrite files exactly.

Click on the icon that looks like a filing cabinet on the left hand side of the GUI. This is your Home directory. From here, you will need to proceed into the jetbot folder. There you will find a jetbot folder with similar files to the ones you just extracted. Delete the folder and copy in our files (you can also just overwrite the files as well).

  1. Now, you can execute sudo python3 setup.py install in the terminal.

Follow step 5: Finish up by following step 5. Now you are back on track to getting your Jetbot running again!

6. Examples

The ”object following” jupyter notebook example won’t work due to the required dependencies that had not been released by NVIDIA prior to the creation of the SparkFun JetBot image. These updates can be manually installed on your Jetson Nano with the JetPack 4.2.1 release.

Update: The engine generated for the example utilized a previous version of TensorRT and is therefore, not compatible with the latest release. For more details on this issue, check out the following GitHub issue.NVIDIA JETBOT WIKI EXAMPLES

Resources and Going Further

Now that you’ve successfully got your JetBot AI up and running, it’s time to incorporate it into your own project!

For more information, check out the resources below:

Need some inspiration for your next project? Check out some of these related tutorials:

Easy Driver Hook-up Guide

Get started using the SparkFun Easy Driver for those project that need a little motion.

Servo Trigger Hookup Guide

How to use the SparkFun Servo Trigger to control a vast array of Servo Motors, without any programming!

SparkFun 5V/1A LiPo Charger/Booster Hookup Guide

This tutorial shows you how to hook up and use the SparkFun 5V/1A LiPo Charger/Booster circuit.

Wireless Remote Control with micro:bit

In this tutorial, we will utilize the MakeCode radio blocks to have the one micro:bit transmit a signal to a receiving micro:bit on the same channel. Eventually, we will control a micro:bot wirelessly using parts from the arcade:kit!

Webinar om Nvidia Jetson Nano

Join us for this engaging, informative webinar and live Q&A session to find out more about the hardware and software behind Jetson Nano. See how you can create and deploy your own deep learning models along with building autonomous robots and smart devices powered by AI. Find more resources for Jetson Nano at https://developer.nvidia.com/embedded…


Hello, AI World. Meet Jetson Nano (1:20:13)

Hur går det med programmeringen i skolan?

13 sep 2019 21:24

I somras hörde en journalist från UR av sig med frågor gällande programmering i skolan. En vecka i början av september fick jag och mina elever på Getingeskolan ett trevligt besök under en tekniklektion. I bifogad länk nedan går det nu i efterhand att lyssna på radioprogrammet.

Programmering i JavaScript på tekniklektion med årskurs 6 på Getingeskolan.

I reportaget finns en hel del bra tips till lärare, skolledare och huvudmän!

Skolministeriet : Hur går det med programmeringen?

SkolministerietAvsnitt 22 av 37 · Säsong 13 · 28 min
Ladda ner

Har lärarna hunnit lära sig det de ska lära ut?

Sedan hösten 2018 ska alla skolor undervisa i programmering. Inför omställningen fanns en oro att skolorna inte skulle hinna med att fortbilda sina lärare. Det fanns också en osäkerhet kring hur undervisningen i programmering egentligen skulle gå till. Så hur ser det ut ett år efter införandet av programmering på schemat?
Vad är det eleverna får? Och har lärarna hunnit lära sig det de ska lära ut?

https://urplay.se/program/212786-skolministeriet-hur-gar-det-med-programmeringen

MiniBit Entry-Level Robot for Microbit

Overview

MiniBit is a ready-assembled simple and inexpensive robot for the BBC micro:bit.

It has the following features:

  • Ready-assembled*. Just push on the wheels
  • Edge connector to easily insert the Microbit
  • Micro metal gear motors with fully-enclosed gearbox (no grit or fluff can enter)
  • Wire-free battery holder for 3 x AA batteries
  • 4 x Smart RGB LEDs (neopixel compatible)
  • Integrated Pen holder for 10mm diameter pens (eg. Sharpie felt tips)
  • Robust On/Off switch with Blue indicator LED
  • Wide chunky wheels with lots of grip
  • Metal ball front caster
  • Connector for optional ultrasonic sensor or I2C breakouts (fully compatible with Pimoroni’s Breakout Garden range)
  • The Microbit pins 0, 1, 2, Gnd and 3V are available for use with croc clips etc.
  • Lots of mounting holes to create your own “body” for the robot or additional sensors etc.
  • Makecode extension and micropython examples available

* Wheels need pushing on and optional pen-holder needs screwing in if purchased

Assembly Instructions

  1. Push on the wheels
  2. If you have the pen holder, then use 2 screws to screw the two pillars into the main board from the bottom, then use the remaining 2 screws to screw the top holder into the pillars

Coding Your MiniBit

Microsoft MakeCode

Click any image to enlarge.

To load the extension, select Advanced, then Extensions. Then enter “Minibit” into the search box and press Enter. If that doesn’t find it (there are sometimes earch glitches) you can enter the full URL into the search box: “https://github.com/4tronix/MiniBit”

Once loaded, you will have a MiniBit menu item with 4 sub-folders:

Motor Blocks

The first command “Drive at speed 600” will set both motors to speed 600. If you do nothing more, the MinBit will continue going forward forever.

The speed value can be from -1023 (full speed reverse) to 1023 (full speed forward). Setting the speed to 0 will stop the motors

There is also a block for spinning – left motor and right motor turn at the same speed but in opposite directions.

Both the drive and spin blocks have a paired block that will drive (or spin) for a selected amopunt of time and then stop

There are two ways of stopping. Coasting to a stop or braking. If you set the speed to 0 or use the “stop with no brake” command, then it will stop gently over the coourse of a second or so 9depending on initial speed). If you use the “stop with brake” block (or the drive/spin for a time block) then it will stop almost immediately.

Finally, you can drive each motor individually. For instance if you set the left motor to drive at 600 and the right motor to drive at 1000, then it will perform an arc towards the left

LED Blocks

You can use these blocks to set and clear one or all the LEDs.

Note that the MiniBit defaults to automatically updating the LEDs whenever any change is made see the “more…” section to learn how and why to change this behaviour

The LEDs on the MiniBit are labelled from 0 to 3. Use these numbers in the Makecode blocks to change the colour. eg setting LED 1 to Purple could be done like this:

The default brightness level is 40. This is plenty bright enough for most uses, saves damaging eyes, and reduces battery consumption. If required you can change the brightness from 0 up to 255

Sensor Blocks

Only one sensor in here; the ultrasonic distance sensor. You can get the values to the nearest object in cm, inches or microseconds

More Blocks

These are the advanced usage blocks. Most students will not need to use them.

  • Set update mode is used to switch between automatic LED updates or manual LED updates. The default is for automatic updates: every change to the LEDs results in all the LEDs being written to with the updated values. This is easy to understand, but it does mean that when making a lot of changes it can slow things down considerably. If doing that, it is best to use Manual update mode, make all the changes required, then use the show LED changes block to make all the updates in one go.
  • Rotate LEDs block will move the colour in LED 0 to LED 1, LED1 to LED2, LED2 to LED3 and LED3 to LED0. If done repeatedly, with a delay between each one, it will show the lED colours rotating around all the 4 LEDs.
  • Shift LEDs block will move LED0 to LED1, LED1 to LED2 and LED2 to LED3. It will blank LED0. So all the colours will disappear one at a time from 0 to 3
  • You can also create your own colours and replace the fixed list of colours in any command using the convert from red, green, blue block. For example, to set LED0 to a blue-green colour:

Programming in microPython

Driving Motors

The motors use 2 pins each to determine the speed and direction. In microPython we use write_analog ( ) to set the first pin to a value between 0 and 1023 and the second pin to 0 in order to go forward. To reverse, we swap the pins so that the first pin is set to 0 and the second pin is set to the value.

On the MiniBit the left motor uses pins 12 and 8, and the right motor uses pins 16 and 14.

So to move the left motor forwards at speed 600:

pin12.write_analog(600)
pin8.write_digital(0)

And to move the right motor in reverse at speed 450:

pin16.write_digital(0)
pin14.write_analog(450)

To stop with no brake, use write_digital ( ) to set both pins to 0. To stop with brake, set both pins to 1.
eg. stop left motor with coasting and right motor with brake:

pin12.write_digital(0)
pin8.write_digital(0)

pin16.write_digital(1)
pin14.write_digital(1)

So a complete, but fairly useless, program to drive the motors for 2 seconds and then stop quickly, would look like this:

from microbit import *
pin12.write_analog(600)
pin8.write_digital(0)
pin16.write_analog(600)
pin14.write_digital(0)
sleep(2000)
pin12.write_analog(0) # temporary fix for python bug
pin12.write_digital(1)
pin8.write_digital(1)
pin16.write_analog(0) # temporary fix for python bug
pin16.write_digital(1)
pin14.write_digital(1)

Note the 2 lines that write_analog(0) before swapping a pin from analog to digital. These are required until a fix is obtained for the python PWM driver continually updating the pin type to analog

Lighting the LEDs

This uses the standard neopixel code, with the LEDs connected to Pin 13.

At the top of your program add import neopixel then:

leds = neopixel.NeoPixel(13, 4)

leds is then an array of all 4 LEDs. leds[0] refers to the LED 0 and leds[3] refers to LED3. Each element of the array is a set of 3 numbers representing the Red, Green and Blue values (each 0..255) for that LED. So to set LED2 to Blue:

leds[2] = (0, 0, 255)

All this does is update the array. To show the new value of the array, we need to call the show ( ) function as follows:

leds.show ( )

Reading the Ultrasonic Distance Sensor

The ultrasonic sensor breakout is on pin15.

The concept is simple: send an ultrasonic pulse out, then time how long it takes to return. Using the speed of sound and some maths, we can then work out the distance. The following complete program has 2 parts to it: a function sonar ( ) which returns the distance to the object, and the main code in a loop which continually prints the distance. We also need to import the utime library:

from microbit import *
from utime import ticks_us, sleep_us

def sonar():
    pin15.write_digital(1) # Send 10us Ping pulse
    sleep_us(10)
    pin15.write_digital(0)
    pin15.set_pull(pin15, NO_PULL)
while pin15.read_digital() == 0: # ensure Ping pulse has cleared
        pass
    start = ticks_us() # define starting time
    while pin15.read_digital() == 1: # wait for Echo pulse to return
        pass
    end = ticks_us() # define ending time
    echo = end-start
    distance = int(0.01715 * echo) # Calculate cm distance
    return distance

while True:
    display.scroll(sonar())
    sleep(1000)

Robotbyggsatser för att bygga en egen robot rover

Skapa en egen robot baserat på t ex en mBot wifi, Velleman Allbot Four Legged Robot, eller Pi2Go.

Det finns många olika byggsatser att köpa om du vill bygga en egen programmerbar robot eller en robotbil.
Ett chassi till ett fordon är en ram, stomme eller bottenplatta med tillhörande hjul, hjulupphängning och motorer. För att få önskad funktion på din robot behöver du komplettera chassit med motordrivkretsar, styrelektronik och strömförsörjning.
Det finns en hel del att ta hänsyn till när du ska välja vilka komponenter din robot ska bestå av. Enklast är att välja något som andra redan testat, så att du vet att delarna fungerar ihop och kan hitta instruktioner för hur man bygger ihop allt.

Här nedan visar vi ett antal exempel på byggsatser med chassi, motorer och hjul samt några lite mer kompletta lösningar där även alla elektronik-komponenter medföljer.
När du har ett färdigt chassi kan du designa och bygga en egen kaross eller hölje till det. Varför inte t ex göra så att det ser ut som ett djur?
Du kan givetvis även konstruera och bygga ett helt eget chassi som liknar något av dessa i valfritt material (t ex trä, plast, kartong eller metall). För att spara pengar och skona miljön kanske du kan hitta och använda något lämpligt återbruksmaterial? (Skolans läromedelsbudget är ju begränsad).
Du skulle kunna göra det som ett riktigt bra ämnesövergripande skolprojekt som handlar om hållbar utveckling, uppfinningar, konstruktion, design, elektronik, mekanik, ekonomi, kommunikation, samarbete, materialkunskap, verktyg och bearbetning, skisser och ritningar, 3D-CAD och 3D-printing och programmering. Inte bara för att det är väldigt lärorikt, utan även för att det är kreativt, utmanande och kul!
Skolämnen som berörs är i huvudsak teknik, bild och slöjd, men även matematik, fysik, samhällskunskap, hem- och konsumentkunskap, svenska, engelska och kemi.

Här är ett antal exempel på färdiga robot-kit:

Mini Robot Rover Chassis Kit

Mini Robot Rover Chassis Kit

Kit för att bygga en egen robot med två hjul. Innehåller chassi, motorer och hjul. Komplettera med motordrivning, en Arduino eller Micro:bit och strömförsörjning.
Innehåll: 2 DC-motorer (4-6 V) med hjul, stödhjul, metallchassi och topplatta för tillbehör. Mått monterad: 103x74x156 mm. Pris ca 250:- på Kjell & Co

Robotbyggsats med hjul och motor

Robotbyggsats med hjul och motor

Kit för att bygga en egen robot med två hjul. Innehåller chassi, motorer och hjul. Komplettera med motordrivning, en Arduino eller Micro:bit och strömförsörjning. Gör roboten smart med t.ex. optisk linjespårning (87064) eller avståndsmätning (87059). Chassit har hål för montering med skruv. Spänning motorer: 5 – 10 V.

  • Chassi, motorer och växellådor
  • Två drivhjul med stödhjul

Pris ca 300:- på Kjell & Co

Robo:Bit Buggy MK2

Robo:Bit Byggy MK2 ihopmonterad

En liten buggy som enkelt monteras med bara en skruvmejsel, ingen lödning krävs.

Innehåll
Robo:Bit robotik-kontroller (kretskort)
monteringsdetaljer (batterihållare, skruv, distanser, osv)
2 gula hjul med däck
2 motorer med anslutningskabel (ingen lödning)
notera att micro:bit inte ingår!

Med den här byggsatsen kan man lära sig om att:
Styra motorer med enkla fram/bak-kommandon.
Styra motorernas hastighet i båda riktningarna med PWM.
Med hjälp av en till micro:bit radiostyra buggyn.
Använda rörelsesensorn hos micro:bit för att detektera krockar med hinder och undvika dem.
Priset för detta kit är ca 480:- på Electrokit

Med en ultraljudsavståndsmätare (ingår ej) även:
Upptäcka hinder när de kommer nära och undvika dem
”följa John”-program som försöker hålla ett konstant avstånd till föremål

Med en linjeföljare (ingår ej) även:

Använda linjesensorerna för att få buggyn att hålla sig i ”spåret”
Skriva mer komplicerade program för när roboten stöter på korsningar av olika slag
Jämföra olika strategier för att följa linjer
Tillsammans med ultraljudsavståndsmätaren kan du få roboten att undvika hinder på banan och, efter att ha rundat den, upptäcka den igen.


Robo:Bit Buggy MK2 delar
Robo:Bit Buggy MK2 ihopmonterad inklusive ultraljudsdetektorer

Olimex Robotplattform 3 hjul

Olimex Robotplattform 3 hjul monterad

Olimex Robotplattform 3 hjul är en robotbyggsats med chassie, motorer, hjul och batterihållare. Chassiet består av en 3mm akrylplastskiva med en mängd fästpunkter för motorer, sensorer och övrig elektronik. Byggsatsen innehåller två utväxlade DC-motorer som skruvas fast i chassiet och två hjul med gummidäck som enkelt trycks fast direkt på motoraxlarna. Utöver de två drivhjulen medföljer även en stödkula som följer rörelser i alla riktningar samt en batterihållare för 4st AA-batterier. Komplettera med valfri mikrokontroller, motordrivare samt sensorer och du har en komplett autonom robot!

Motorspecifikationer:
* Spänning: 6VDC
* Ström: 240mA
* Hastighet: 230rpm
* Utväxling: 1:48
* Vridmoment: 0.078Nm (0.8kgf-cm)

Innehåll:
* 1st chassie
* 2st motorer
* 2st hjul 65 x 25mm
* 1st stödkula
* 2st monteringssatser för motor
* 1st batterihållare 4xAA
Pris för detta kit är ca 280:- på Electrokit

Olimex Robotplattform 3 hjul delar

AlphaBot2 – Robot kit för Raspberry Pi

AlphaBot2 – Robot kit för Raspberry Pi

AlphaBot2 är en robotbyggsats gjord för Raspberry Pi Zero/Zero W, och klarar bland annat av att följa en linje, undvika föremål, mäta avstånd med ultraljud, kommunicera över Bluetooth/IR/WiFi (Bluetooth och WiFi kräver Pi Zero W) och har en inbyggd kamera som gåra att vinkla i höjdled.
Monteringen är enkelt avklarad utan någon lödning eller kabeldragning; det är klart på några minuter och det finns gott om exempelkod för att komma igång snabbt.

Funktioner:
* 5-kanals infraröd sensor, med analog utgång och PID-algorithm för stabil linjeföljning
* Moduler för linjeföljning och för att undvika hinder, utan kabeldragning
* TB6612FNG dubbel H-brygga motordrivare
* N20 minimotor med metallkugghjul i växellådan.
* Inbyggda RGB LEDs

På det övre kortet finns:
* LM2596 spänningsregulator, levererar stabil ström (5V) till Raspberry Pi Zero
* TLC1543 10 bitars AD-omvandlare, för integration med analoga givare och sensorer
* PCA9685 servocontroller för jämn rörelse av kameraservot
* CP2102 UART-konverterare, för att styra Pi över UART
* USB HUB chip, så du kan använda fler USB-anslutningar (fyra stycken)
* En summer
* IR-mottagare

Mått: 220 x 165 x 70mm

Innehåll:
AlphaBot2-PiZero (adapterkort)
AlphaBot2-Base (chassi)
RPi Camera (B)
Ultraljudssensor
Micro SD kort 16GB
SG90 servo
2 DOF pan and tilt kit
IR fjärrkontroll
FC-20P kabel 8cm
Micro USB-kontakt
RPi Zero V1.3 Camerasladd 30cm
USB-kabel typ A hane till microB hane
AlphaBot2-PiZero skruvar
skruvmejsel
Pris ca 1200:- på Electrokit

Rover 5 Robotplattform

Rover 5 Robotplattform

Rover 5 är en robotplattform av modell stridsvagn (tank) och använder 4 individuellt oberoende motorer, var och en med en halleffekt-kvadraturkodare och växellåda. Hela växellådsaggregatet kan roteras i steg om 5 grader för olika markfrigångskonfigurationer. Du kan även byta ut robotens larvfötter mot traditionella hjul.

Funktioner:

Justerbara växellådsvinklar
4 oberoende likströmsmotorer
4 oberoende hall-effektkodare
Tjocka gummitankar
6x AA batterihållare
10 kg / cm stallmoment per motor
Pris ca 800:- på Elektrokit

mBot Blue/Wifi från Makeblock

mBot Blue från Makeblock

mBot Blue och mBot wifi från Makeblock är robotbyggsatser speciellt framtagna för barn och utbildning. Roboten monteras enkelt ihop, ingen lödning krävs, och programmeras i Arduino eller Scratch. En modul för 2.4GHz eller Bluetooth kommunikation medföljer och kan användas för att styra roboten trådlöst från en dator eller mobil. App för iPhone och Android finns gratis i Appstore och Google Play, sök efter namnet mBot. Det medföljer även en IR-fjärrkontroll som redan från start kan användas för att styra roboten manuellt.
Med i paketet finns alla mekaniska delar som behövs för att bygga ihop roboten, styrkort, hjul och motorer, ultraljudssensor, linjeföljarsensor, kablar, batterihållare, fjärrkontroll samt skruvmejslar.

mBot är en komplett lösning för elever som vill lära sig mer om programmering, elektronik och robotar. Att arbeta med mBlock, inspirerad av Scratch 2.0 och kontrollerad av en Bluetooth-modul ger detta robotkit elever en oändlig massa möjligheter att lära sig vetenskap, teknologi, ingenjörskunskap och matematk.

Dra och släpp grafiskt programmeringsmjukvara som baseras på Scratch 2.0 ger barnen ett snabbt sätt att lära sig programmering, att kontrollera roboten, och att möjliggöra multipla funktioner från roboten. mBot bygger på lek och kreativitet.

Den mekaniska aluminiumkroppen av mBot är kompatibel med Makeblock plattformen och många Legodelar, medan elektroniken är utvecklad med Arduinos open source ekosystem. Detta gör att mBot har en nästan oändlig utökningsmöjlighet genom att använda många olika elektroniska moduler som du kan behöva för att bygga din ”drömrobot”.

• Mjukvara och programmering: mBlock (Grafisk) för Mac och Windows, iPad mBlocky, Arduino IDE
• Microcontroller: Baserad på Arduino Uno
• Strömförsörjning: 3,7V DC Lithium batteri eller fyra 1,5V AA batterier (säljes separat)
• Trådlös kommunikation: Bluetooth eller 2,4 GHz wifi

I paketet ingår:2x Micro TT motor
1x Universal hjul
1x Me Ultraljud sensor
1x mCore
15x M4 x8 skruvar
1xME Line follower
2x Tyre 90T B
8x M3 muttrar
2x Velcro
4x M2.2 x 9.5 skruvar
1x Line follower map
4x M2 x 25
2x 6P6C RJ25-kablar 0,2m
1x IR fjärrkontroll (Knappcellsbatteri CR2025, medföljer ej)
1x Chassi
1x USB Typ A – Typ B kabel 1m
1x Batterihållare för 4 AA-batterier (batterier medföljer ej)
1x skruvmejsel
1x Skyddslock Mått(BxDxH): 170x130x90mm
Längd 17 cm
Fyra AA batterier köps separat
1 st knappcellsbatteri CR2025 köps separat 
Priser från ca 900:- beroende på modell och kan köpas från t ex Hands On Science
mBot Blue och mBot wifi kan programmeras med Scratch
mBot Blue från Makeblock i delar
mBot Wifi monteras enkelt ihop till en komplett fungerande robot
mBot Blue kan styrs från en mobiltelefon

mBot Ranger Robot kit från Makeblock

Produktbild
mBot Ranger Robot Kit från Makeblock

mbot Ranger Robot Kit är ett 3-i-1 robotkit som stöder tre byggutföranden: Off-Road Land Raider, två-hjulig självbalanserande bil och Dashing Raptor, Predator.

Programmera och kontrollera mbot Ranger via smartphone, surfplatta, Mac eller PC.
Trådlös komunikation via Bluetooth och WiFi 2,4G.

mBot Ranger är fullt kompatibel med mBlock som är en grafisk programmeringsmiljö baserad på Scratch 2.0 open-source kod. Den gör programmeringsprojekt och interaktiva projekt enklare genom drag-and-drop funktionsblock. Utöver stöd för programmering via en PC har mBot Ranger även stöd för att bli programmerad från en iPad och andra surfplattor med en enkelanvänd app: Makeblock HD.

Programmering:
PC – mBlock
iPad/Tablet – Makeblock
Arduino IDE 

Datorkort:
Arduino Mega 2560, 256 KB flash memory, 8 KB SRAM, 4KB EEPROM 

Sensorer:
2 ljussensorer
1 ljudsensor
1 gyroskop
1 temperatursensor
1 ultraljudssensor
1 linjeföljare

Ljudenhet:
1 Summer 

Motor: 2×400 RPM Encoder Motor

Storlek: 200x165x120 mm
Vikt: 1600 gram 

Drivs med 6 stycken AA batterier (ingår ej, köpes separat).
Pris ca 1500:- och kan köpas från t ex Hands On Science

Kolla in vad man kan göra med mBot Ranger Robot Kit

Läs mer om mBot Ranger på www.makeblock.com 

Bil med remdrift

Produktbild
Bilchassi med elmotor och remdrift

Bil med kraftöverföring via remdrift i serien Bilar och kraftöverföring.

Byggsatsen innehåller chassi av korrugerad plast, hjul, axlar och axelbockar med monteringskuddar, 2 remskivor, gummiband, elmotor, batterihållare och omkopplare.

Storlek 20x14cm. 
Batteri 2 st AA beställs separat.
Pris ca 80:- på Hands On Science

Enkla byggsatser där ni jämför effekten av olika kraftöverföringar från energikälla till rörelseenergi. Här är utväxling gjord med remskivor av olika diameter.

Remdrivning i fordon finns i lite olika varianter. I riktiga personbilar används det mest till att driva generatorn, vattenpumpen, AC-kompressorn, kylarfläkten eller servostyrningspumpen från bilens förbränningsmotor. Det finns dock några klassiska gamla exempel på bilar som hade remdrivning som kraftöverföring för att driva hjulen som t ex Daf/Volvo 343, även kallad Remjohan.
Vissa veteranmopeder hade kraftöverföring med en rem för länge sedan, men sedan blev det i princip standard med kedja på både mopeder och motorcyklar. Idag har remdrift blivit vanligare igen på Scooter-mopeder bl a pga ryckfri och behaglig gång samt möjlighet att justera utväxlingen dynamiskt i den automatiska växellådan mha en variator.
Andra remdrivna produkter är kvarnar, luftkompressorer och kapsågar.

Bilchassi med kugghjulsdrift

Bilchassi med kugghjulsdrift som kraftöverföring

Byggsatsen innehåller chassi av korrugerad plast, hjul, axlar och axelbockar med monteringskuddar, 2 kugghjul, elmotor, batterihållare och omkopplare.

Storlek 20x14cm. 
Batteri 2 st AA beställs separat.
Pris ca 80:- på Hands On Science

Enkla byggsatser där ni jämför effekten av olika kraftöverföringar från energikälla till rörelseenergi. 
Mellan drivkälla och hjul finns i allmänhet en växellåda med flera kugghjul.

Kugghjulsdrivna fordon är våra vanliga standardbilar, lastbilar och mopeder, cyklar traktorer samt även i borrmaskiner.