Xtreme STEM
DashX

RoboBloX

MagBlock

MagBlock

 

Theory

  • Hall Effect Sensors can detect a magnet field. If the magnet is the correct way around the sensor will send a signal to the Arduino.

    HallHall

 

 

 

Assembly

  1. Block
  2. SensorFront
    The sensor should be bent like the picture
    The wires should run past the back of the hall sensor.
  3. Hall
    Record the color of your 3 wires
  4. Pin
    Use a pin to bend the little black plastic "tongue" up

    Wire
    Gently slide the plastic housing off the ends of the wires
    Remove all 3 of the black plastic housings from the ends of the wires
  5. Wires
    Insert the ends of 2 of the wire into the block
    (From the inside of the block)
    You may need to push the ends of 2 wires through the hole before you can get the third through.

    Wires in
    Push the third wire through
  6. Pull
    Pull the wires through until the sensor is almost in the block
    Make sure it is the same way up as in the picture
    If you need to flip it over, pull it back to the ends of the wires, flip, and pull it back.
  7. Block
    Carefully position the sensor in the block
  8. Stop
    Check with Mr. Dash before continuing
  9. Glue
    Make sure you have all the materials in the picture before gluing
    (Extra Brick & Wax Paper)

    Glue
    Fill your block with hot glue
    Only use enough glue to cover the wires and sensor
    (too much and it will squish out the sides)
  10. Paper
    Cover the block with wax paper (baking paper)
  11. Gluing
    Place another block onto your MagBlock
    This makes sure the glue is squished down enough
  12. Wires
    Look back at the step you recorded your wire colors
    Place your 'V' wire in the middle of the connector
    Place your 'G' wire on either side and mark that side with a silver pen
    Place your 'S' wire in the remaining side position

 

 

Connection Diagram

Hall

The MagBlock can be connected to any digital pin.
(Don't use 0 or 1 as they are used for mBlock)

Remember the silver stripe always goes to G (Ground).

 

mBlock

Hints

  • mblock
    You can check the signal from the MagBlock using a read digital pin block
    Each time you click on the block it will show true or false

    Remember it will be backward (active high)
    True (High) = No Magnet
    False (Low) = Magnet
  • mblock
    You can use a not block to flip the signal the right way around
    True (High) = Magnet
    False (Low) = No Magnet
  • mblock
    You can use a loop to display the result without having to click on it over and over

 

Scroll to Top