Category: Mini Pathfinder

  • Sojourner Final Blog Post

    Sojourner Final Blog Post

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=”]

    [av_textblock size=’35’ font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Generation 4
    Summary Blog Post

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ font=’entypo-fontello’ admin_preview_bg=”]

    [av_textblock size=” font_color=’custom’ color=’#bfbfbf’ av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Authors:

    Robert Francis Pearson (Project Manager), David Garcia (MST Engineer), Alex Dalton (EC Engineer)
    Verification:Robert Francis Pearson
    Approval:Robert Francis Pearson

    Table of Contents

    [/av_textblock]

    [av_hr class=’short’ height=’50’ shadow=’no-shadow’ position=’left’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ font=’entypo-fontello’ admin_preview_bg=”]

    [av_textblock size=” font_color=” color=”]

    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Executive Summary’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Space the final frontier. All from the joy of your home. Meet Sojourner a smaller, lovable version of the JPL Pathfinder. This robot implements a novel method of monitoring its own speed to adapt and overcome its environment. To perform this task, Sojourner implements the latest in sensorless rpm encoding through monitoring commutator noise and back EMF.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Program and Project Objectives’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”]
    Stuff we will put here woohoo…
    [/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Program Objectives

    The Robot Company (TRC) will be debuting its 2020 line-up of toy robots and associated games at the Toy-Invasion 2020 convention in Long Beach CA on May 11, 2020. Your team’s assignment is to make the 3D printed and/or laser-cut prototypes to be showcased at the convention, prior to production starting in the second quarter of 2020. The robots will feature our new ArxRobot smart phone application and the Arxterra internet applications allowing children to interact and play games around the world. Sojourner should be able to complete an obstacle course autonomously in game mode.  To decrease electronics cost, all TRC robots will be maintained by incorporation of the 3DoT board, developed by our Electronics R&D Section. Modification of downloadable content is limited to software switch setting and robot unique graphics of the smart phone and Arxterra applications.  Modifications of electronics is limited to custom 3DoT shields as required by the unique project objectives of your robot.  The Marketing Division has set our target demographic as children between the ages of 7 and 13, with a median (target) age of 11. To decrease production costs, please keep robots as small as possible, consistent with our other objectives. As with all our products, all safety, environmental, and other applicable standards shall be met. Remember, all children, including the disabled are our most important stakeholders. Our Manufacturing Division has also asked me to remind you that Manufacturability and Repairability best practices must be followed. Any current iteration of products must maintain or improve on features following their prior iterations.

    Project Objectives

    Mars, a new frontier devoid of life. Yet, over the horizon, a robot rolls up an incline, driving forward a new path for mankind. Now any child can enjoy the experience of their own Martian Rover, all thanks to the community that brings it to Earth.

    The AoSA Sojourner is a small version of the JPL Mars Rover. Sojourner will be used as a testbed for an in depth research opportunity into sensorless rotary encoders. To determine rpm, the Sojourner project will research techniques including back emf and commutator noise. As a minimum, these two methods will be two methods will be compared with one or both (hybrid) implemented.

    The primary goal of this semester is to eliminate the rotary shaft encoders and attendant wires, through researching and designing of a sensorless shaft encoder 3DoT shield. Encoders add around $10 dollars per encoder, coming to a total $60 dollars for the build. The capabilities of the sensorless shaft encoder shield will be demonstrated by software implementation of a slip differential and automatic speed control.

    An ancillary goals of the sensorless RPM project is streamlining and organizing the AoSA Sojourner’s wiring system.  Reduced complexity has the added benefit of significantly reducing costs. Another goal is to independently set the speed of each wheel based on the turning radius (differential drive). Through sensorless rotary encoders, the Sojourner should be able to run all motors at same speed on different surface types as well as inclines.

    The AoSA Sojourner includes ; three solar panels will be able to charge the LiPo batteries which Sojourner uses to charge its LiIon battery and allow long term use, and control via the Arxterra app (ArxRobot)  which sends/recieves information through the 3DoT board.  Sojourner also features the classic six wheel chassis and the rocker-bogie suspension system which should allow the Sojourner to handle terrain similar to the surface of Mars that the Spirit and Opportunity Rovers have faced. The AoSA Sojourner allows for more user interactivity by placing a phone inside the chassis. Once set inside a built in periscope allows for a first person POV when operating the rover from the Arxterra control panel giving a more user friendly experience and replicating the cameras that the Mars Rovers used.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Mission Profile’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    A track selected to approximate a martian terrain will be used to test the capabilities of the Sojourner robot. 

    The course will be designed in Electronics & Control Engineer Alex Dalton’s yard. Sojourner’s path will be plotted along a loop containing rocks and pebbles similar to the rough martian surface. From a natural and uneasy terrain, Sojourner will demonstrate the sensorless rotary encoders working to adjust the speed of each individual motor and look damn fine while it does. 

    Dependent on the validation of Sojourner’s research, Sojourner’s motors will be tested individually to test the accuracy of their sensorless encoding methods.  Sensorless Encoding for Back EMF and Commutator Noise methods with the Polulu Motors will be compared against the Hall Effect Sensors designed for the Polulu Motors.

    Any rocks along the path simulate a high-side event (slip), in which Sojourner reacts by diverting the power and energy of the unloaded wheel(s). The track will include an incline and a decline.  

    The above Sojourner Mission will be verified in early May on the test track and will be recorded and put into a demonstration video.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Project Features’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Sojourner Body

    The four parts that split Sojourner into are the solar tray, phone holder, main chasis, and rocker bogie.

    The solar tray holds the solar panels in the proper position to provide them with sunlight. This part also provides a cover for the phone holder. The phone holder has clips to keep the phone in the correct position to get video that can be displayed to the control panel. The main chasis holds the 3DoT microcontroller and has holes for the wires to connect to the wheels and servos.

    It holds the gearbox which keeps the two rocker bogies connected to the main chasis and moving in sync. The rocker bogie keeps are wheels in place and has mounts to connect the servos to the motors for steering. It is designed to help Sojourner overcome difficult terrain. 
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Fusion1.png’ attachment=’162622′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 1- Sojourner Fusion Blowup View
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Sensorless Encoding

    The commutator noise circuit starts with current sensing, which is then filtered by a band pass filter. There is a gain stage that also does some suppression of a large time constant introduced by the band pass filter. The use of a comparator configured for hysteresis is what allows for a clean transition at the spikes and avoids miscounting of peaks caused by standard noise in any system.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/comm-noise-labeled.jpg’ attachment=’162623′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 2- Commutator Noise Sensorless Encoding Circuit
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Requirements’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Sojourner’s Requirements reflect the 5 main aspects of the project’s design. That being: the basic operations of Sojourner to match and iterate on prior generations, mission operation, the build of Sojourner, project logistics and research.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Engineering Standards and Constraints ‘ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The Spring 2020 Sojourner team is aware of higher bodies of organization and the standards, codes and regulations they give when building a toy product. Below are those that apply to the Sojourner Project.

    Applicable Engineering Standards

    • Systems and Software Engineering — Life Cycle Processes –Requirements Engineering
    • IEEE SCC21 – IEEE Approved Standard for Fuel Cells, Photovoltaics, Dispersed Generation, and Energy Storage
    • NASA/SP-2007-6105 Rev1 – Systems Engineering Handbook
    • Bluetooth Special Interest Group (SIG) Standard (supersedes IEEE 802.15.1)
    • American Wire Gauge (AWG) Standard
    • C++ standard (ISO/IEC 14882:1998
    • NXP Semiconductor, UM10204, I2C-bus specification and user manual.
    • ATmega16U4/ATmega32U4, 8-bit Microcontroller with 16/32K bytes of ISP Flash and USB Controller datasheet section datasheet, Section 18, USART.
    • USB 2.0 Specification released on April 27, 2000, usb_20_20180904.zip
    • IEEE 29148-2018 – ISO/IEC/IEEE Approved Draft International Standard –
    • Arduino De facto Standard scripting language and/or using the GCC C++ programming language, which is implements the ISO C++ standard (ISO/IEC 14882:1998) published in 1998, and the 2011 and 2014 revisions.

    Environmental, Health, and Safety (EH&S) Standards

    • CSULB COE Lab Safety
    • CSULB Environmental Health & Safety
    • IEEE National Electrical Safety Code
    • NCEES Fundamental Handbook
    • ASTM F963-17, compliant for Toy Safety

    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Program Level 1 Requirements’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Basic Operations

    L1.1 Sojourner shall employ a custom PCB, to extend the capabilities of the 3DoT board to meet the Sojourner project and mission objectives including 4 DC motor drivers, and a method of sensorless encoding.

    Criteria:

    Aside from the 2 DC Motor and Servo Motor Spots on the 3DoT v9 shield, the Sojourner PCB shall add for the implementation of 4 extra DC Motors as well as 2 extra Servo Motors, as well as a method to take rpm data without the use of encoders.

    L1.3 The ArxRobot App shall display the battery level of Sojourner.

    Criteria:

    The percentage of the battery level of Sojourner will be displayed on the ArxRobot App by selecting the widget.

    Mission Operation

    L1.5 Sojourner will be placed in a faux Mars Test Track.

    Criteria:

    Sojourner’s track to be tested on shall be composed of gravel, dirt and sand.

    Sojourner Build

    L1.4 Sojourner will be a scaled down version of the JPL mars rover in a scale of 4:1 for length, 7:2 for width, and 18:5 for height.

    Criteria:

    The Sojourner’s design is based on the JPL Mars Pathfinder. The dimensions of the pathfinder according to NASA JPL are: 65cm x 48 cm x 30 cm. Tolerance for this scale shall not exceed 10%.

    L1.10 Sojourner will be designed so no wires are exposed.

    Criteria:

    Wires for the motors are fed through the holes in the PCB Compartment and are securely strapped onto the rocker bogie suspension using Zip Ties and electrical tape.

    L1.11 The Sojourner will have any parts securely placed when given to the customer.

    Criteria: All parts are screwed in and bolted down properly. No part will dismantle under a slight pull, when handed to the customer for submission.

    L1.12 Assembly and reassembly in order to access the PCB of Sojourner will not take longer than 5 minutes, respectively.

    Criteria:

    Sojourners Solar Tray and Phone Cradle shall be able to be removed within 5 minutes to access the pcb) from a top-down perspective.

    L1.17 Sojourner’s chassis will be 3D printed.

    Criteria:

    A 3D printed chassis, rocker bogie, phone cradle and phone tray, with material being PETG.

    Project Logistics

    L1.14 This Sojourner project shall not exceed $600.

    Criteria:

    To complete a functional Sojourner the cost shall not exceed $600.

    L1.15

    Sojourner will be compliant with applicable engineering standards, codes and regulations for software and documentation.

    Criteria:

    Sojourner code will be written in C++ in the Arduino app in order to meet the de facto C standard, while documentation meets the NASA Handbook.

    L1.16 Sojourner will be compliant regarding environmental health and safety standards.

    Criteria:

    Sojourner will be compliant with also meet IEEE SCC21 proper fuel Storage methods and CSULB COE Lab Safety/Environmental Health and Safety. When not in use Sojourner’s battery shall be stored in a plastic bag, goggles will be worn while soldering.

    Research

    L1.22 Commutator Noise Sensorless Encoding shall be designed for a custom PCB.

    Criteria:

    PCB design is completed in EAGLE CAD, Cost should be minimized to under $30, assembled before May 12, 2020.

    L1.25 Updated Motor Driver PCB shall add 5% more wire clearance on the edge.

    Criteria:

    Reduction of the size of the pcb on the side near the access of the on board DC Motors of the 3DoT should be reduced by at least 1 mm.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Project Level 1 Functional Requirements’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Basic Operations

    L1.2 Sojourner’s DC Motors shall be able to be controlled by the ArxRobot App.

    Criteria:

    Through use of the Sliders on the Arxterra app, Sojourner’s DC motors will be able to turn 180 degrees forward and 180 degrees backward.

    L1.26 Servo motors shall be able to turn 90 degrees.

    Criteria:

    User is to use the sliders on the ArxRobot App to turn a Servo Motor from rest to a 90-degree position.

    Mission Operation

    L1.6 Sojourner shall travel for 3 minutes

    Criteria:

    Sojourner shall not dismantle or pause for longer than 15 seconds within this time frame.

    L1.7  Sojourner shall travel 10 feet.

    Criteria:

    10 Feet of consecutive motion.

    L1.8 Sojourner shall travel an incline of 20 degrees.

    Criteria:

    Sojourner shall be able to travel up and down and incline of 20 degrees, this will be simulated on a ramp.

    L1.9 Sojourner shall traverse a high side event.

    Criteria:

    Sojourner will divert power from rocker bogie in air to side with contact with the ground using Sensorless encoders without overturning the robot.

    Research

    L1.18 Back EMF measurements shall estimate RPM +- 15% compared to external tachometer.

    Criteria:

    The measurements shall be taken as the motor runs in forward position; the Back EMF measurements use the L298 Motor Driver to accept ADC Values.

    L1.19 Commutator noise circuit shall translate commutator spikes into a square wave with a unique frequency as a function of RPM.

    Criteria:

    If frequency changes relative to rpm, the square wave should be able to be scaled in relation to this.

    L1.20 Circular buffer code shall enable shaft encoder values to match external tachometer +-5%.

    Criteria:

    Encoder values are comparable to +- 5% of the tachometer values.

    L1.21 Commutator Noise Circuit shall operate with compatible 3DoT Voltage Levels.

    Criteria:

    Circuit shall work on 5 Volts with a single 3.3 bias in their components.

    L1.23 Motor Driver and Back EMF implantation on the Sojourner shall allow for stackable commutator noise PCB.

    Criteria:

    JST Headers have been changed to standard headers.

    L1.24 Implementation of the Back EMF PCB design shall allow for bi-directional testing.

    Criteria:

    The design involves using 3 OPA 350 Operational Amplifiers, in the back EMF. This should theoretically let the ADC takes values of forward/backwards.

    L1.27 Motor Driver Shield shall implement a method to minimize pins needed on 3DoT.

    Criteria: Multiplexer uses 1 ADC pin to get reading from 4 motors, PWM Driver pin controls Multiplexer.

    L1.28 The compatibility of sensorless encoding methods will be analyzed regarding motor driver diodes.

    Criteria: Back EMF circuit is compatible with fly back diodes.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’System/Subsystem/Specifications Level 2 Requirements’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The following Level 2 requirements are derived from the further needs of our level 1 requirements. As Level 1 requirements crossed into the territory of derived requirements, due to a changed Verification and Validation plan; Level 1 requirements covered a lot of what was intended for level 2.
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    L2.1 Sojourner’s PCB will cost less then $10 (price per unit).

    L2.2.1 The ArxRobot App will be able to interface with the Arxterra Control Panel.

    L2.2.2 Sojourner’s motors will be able to be controlled by the Arxterra Control Panel.

    L2.6 Sojourner will be able to be controlled by the user for 3 minutes

    L2.8 Sojourner will be able to travel 8 feet up an incline of 20 degrees.

    L2.10 Sojourner’s wires will be able to be fed and placed in the notches in the rocker bogie suspension.

    L2.17.1 Sojourner’s 3D printed parts shall be durable and survive 3 mission tests.

    L2.17.2 Sojourner’s 3D printed parts shall take no longer than 9 hours for a complete print.

    L2.22 Sojourner’s commutator noise circuit will be tested on a breadboard before PCB implementation.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Allocated Requirements / System Resource Reports’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_heading tag=’h3′ padding=’10’ heading=’Mass Shared Resource Report / Allocation’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/mass-report.jpg’ attachment=’162625′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 3 – Mass Report
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The estimated weight of our sojourned was repeated from previous versions as we were only printing the files that we were given without any change in the design. We measured each part after getting them from the printers as well as measured the loose  nuts and bolts as a lump sum as. Our robot was very close to what we expected which confirmed our design fell well within spec and no obvious mistakes were made in the transition from one generation to another.
    [/av_textblock]

    [av_heading tag=’h3′ padding=’10’ heading=’Power Shared Resource Report / Allocation’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Figure 4 –Power Report

    The equation for setting the current limiter of the 3DoT is 23950/(100*(N/128))^0.977mA, where N is the number of steps written to MCP4017 between 0 and 128. Our current N value is 64, which gives us a current limiter value of 524.1 mA. To increase the amount of current we can provide to our motors and servos we would want to lower this N value, but setting this value too low could cause the amount of current to damage the board.

    When working with our robot, we noticed that the servos seem to be taking the most current when trying to move the gears connect to Sojourner’s wheels. Having this heavier load causes them to draw current past the current limiter. The same is also true for the motors in extreme circumstances, going from max speed in one direction to max speed in the opposite direction caused the current to reach its limit.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Project Report’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The PBS and WBS are shown below. Considering how the engineering method and structure for the work is set up, ours are quite different.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Project WBS and PBS’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The following diagram below shows our Project Work Breakdown Structure (WBS).

    Figure 5 – WBS

    The following diagram below shows our Project Breakdown Structure (PBS).

    Figure 6 – PBS
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Considering our project focused heavily on research, the normal structure of the WBS and PBS would not suffice. In order to solve this problem, we initially split off the work load to fit into methods of encoding. Alex would research and start to implement the Back EMF method, while also focusing on Telemetry. Robert would analyze the Polulu Encoders while working on the management of the project, while David would set up the mission while working on Commutator Noise.

    The PBS also better suited our need as it became clear which specific task of the project would be applied to whom. There was crossover between Alex’s code and David’s implementation of the circuits. As David had the oscilloscope and power supply it fell on him to test and have the circuits built.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Cost’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Figure 7 – Budget Spreadsheet

    Sojourner’s cost reached a total of $577.56 with a contingency of $22.44 for a total of $600. One of the extra costs that came up later in the semester was buying a USB oscilloscope for David to continue testing. The total before the USB oscilloscope was $474.90 with a contingency of $125.10. For our project we had two members who are members of the Embedded Application Technology club and we would like to give a special thank you to them for funding our project.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Schedule’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Final-Schedule-May-9.jpg’ attachment=’162584′ attachment_size=’full’ align=’center’ styling=” hover=’av-hover-grow’ link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 8 – Schedule
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For this project, we had 3 critical paths for our project. These paths considered: Back EMF Sensorless Encoding, Commutator Noise Sensorless Encoding and the Main Sojourner Build/Code. These 3 tasks were designed around the idea of the 3 team members who were to work on these, David for Commutator Noise, Robert for Main Sojourner Build and Alex for Back EMF. Although as our project went into March the Stay At Home order was put into place. This order forced us to redesign the schedule for the project. Unfortunately, the schedule would face alot of tasks being pushed back. For example, since our team could not access oscilloscopes owned by the University, our team had to research and order one of our own. This pushed our testing back weeks. If parts broke during testing, shipping times also caused delays. We ran into this problem during the last weeks due to these unexpected delays, and were not able to fully complete the trade-off study as we had expected to. Our team had to base the trade-off study more so on cost and analog values than digital values.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Burndown and/or Percent Complete’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/burndown.jpg’ attachment=’162585′ attachment_size=’full’ align=’center’ styling=” hover=’av-hover-grow’ link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 9 – Burndown Chart
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The burndown schedule displays the gaps in April in which we had to wait on receiving parts in order to get our circuits tested. Without them testing was stalled in this period of time. Because of this the final tests and the trade off study for the sensorless encoding were not formally completed.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Concept and Preliminary Design’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    To adapt sensorless encoding to Sojourner, multiple iterations of the commutator noise and back EMF circuits had to be built. When testing these circuits, we would take note of the hardware complexity of the circuit, for the cost of implementation. We would also take a look at the accuracy and difficulty to implement the software to use the ADC properly

    Commutator Noise

    Unlike the method for back EMF sensing, commutator spikes need no special timing to monitor whether the motor is being supplied power or not. As long as the motor is spinning there will be commutator spikes inherent in the design and physical construction of the brushed DC motor. The challenge for this method was to get a way to reliably catch the sparks, filter the peaks in such a way as to be able to relate the frequency of the peaks to a number for RPM. Due to limitation of pins being allocated to motor sensing then we will have to also implement a MUX that can be used to reduce 10 lines to only 3 lines needed for each method. 

    Back EMF Circuit

    As we began this project an initial stumbling block was the misnomer of back EMF. Back EMF, properly described, is the voltage generated while the motor is being supplied with a voltage. What we were actually tempting to do was to operate our motor as a generator. This meant we have to achieve several steps before anything like success could be reached. First, we had to be able to sense when the motor was being supplied with a voltage and when the motor was spinning due to inertia. Once that trigger was in place, we must devise a delay scheme such that we can reliably avoid sampling the initial voltage spikes caused by the motor suddenly switching from motoring to generating mode. Then, the ADC had to be connected to our motor and a sample was to be buffered and averaged. This process can then be repeated through a MUX and used to poll each motor during operation. 
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Literature Review’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The two main areas for this project were coding the 3Dot to control the Sojourner robot and designing a circuit which could be used for reading RPM without the need of encoders. The Arxterra section on using the 3Dot provided a lot of information to get us started on the app and coding for the 3Dot. Having a detailed list of the registers on the controller was absolutely required when coding accurate delays and sampling functions. In addition, having a map of the pins of the 3dot informed much of what had to be done with the design of our PCB 

    When it came time to start dealing with the motor controls of the 3Dot some resources from Adafruit provided a lot of guidance. They even had some example code which acted as much to seed for what we were doing in this project. The library provided for the chip was also used extensively to control the speed and direction of our motor being used. 

    The two main documents guiding our research and work was the Texas Instruments Ripple Counter Design guide,  The Precision MicroDrives article of back EMF  measurements. The Texas Instruments design guide was the basis for the ripple counting breadboard circuit as well the pcb built for testing. The TI design guide provided equations and examples of what you would need to fully flesh out what would be needed to translate spikes to a countable frequency. 

    The precision microdrives article provided a lot of information for the process of how to calculate RPM from turning the motor off and on. In addition, the first circuit used for testing was provided by this site. Eventually we replaced much of the switching mechanism with a different board but much of the sensing section of our testing circuit was based on what we learned from working with their circuit.

    1.Precision Microdrives

    2.Texas Instruments

    3. Adafruit
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Design Innovation’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    1. Pin Reduction Scheme – Implementation of a multiplexer capable of switching two lines at a time is the only way to make both BEMF and Commutator noise measurements possible. By using a Texas Instruments CD4052 analog multiplexer, we can minimize the lines needed to be run from the motors to the sensors by placing the MUX physically close to the motor lines and only running four lines when previously we would need 2 lines per motor and an entire circuit needed from each line. This way minimizes costs and complexity. 
    2. MUX configured PCD – This board implemented an active full bridge rectifier circuit on the existing motor board as well as connecting the MUX from the motor lines to the controller. The motor pins were also moved to the outer perimeter of the board to enable stacking in the future.

    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Conceptual Design / Proposed Solution’ color=” style=’blockquote modern-quote’ custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    A large problem with the choice to implement both back EMF and commutator noise was the space needed on any shield would have to be integrated into the existing motor controller board. Doing so poses several design obstacles. 

    • More complicated routing in design
    • Likely need to increase to more than a two layer board. 
    •  Possible excess parts for anyone not using this method. 

    Rather than attempt to fit the footprint of both boards onto the same size it was proposed to use two multiplexers and route the signals for one of the methods to an add on board. This method would also mean we can minimize the pins needed by either method and take on a scheme for polling the motor for RPM data at a predefined interval. While this polling may also increase the lag in response to torque needed at each motor it should be a problem for a toy to likely encounter.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’System Design / Final Design and Results’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The system design here discusses the code, 3D design and experimental results of our circuits. In this portion of the project we have implemented a method of sensorless encoding into our PCB, that being Back EMF.

    We have also expanded upon the interface Matrix in accordance to this implementation. The design of the PCB also furthers the possibility of sensorless encoding implementation as it is designed in order to accept a stacked commutator noise PCB onto it.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’System Block Diagram’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_horizontal_gallery ids=’162635,162637′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figures 10 and 11 – System Block Diagrams
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Our system block diagram separates the UI and battery features as parts that interface with the Sojourner DC and Servo Motors. These motors are controlled by the app and are researched was focused on eventually being able to send RPM data back from the motors to the control panel/Arxrobot app. The solar panels were planned to charge our robot’s battery similar to solar panels on JPL’s pathfinder robot. The robot’s battery level is then sent to the Arxrobot app. Motor speed control is to be enacted through sensorless encoding and the Arxrobot app’s sliders are used to control the speed and direction of our motors as well as the position of the servos.

    The servo controller specifically interfaces with the two servos located on the 3DoT microcontroller. Since our new servos on the shield are on the same side as these ones, we use the same command to move the new servos in sync with the ones already on the 3DoT. The same method is used to control the motors, the two motors already on the 3DoT are controlled with the sliders and the four motors on the shield follow the direction and speed of these motors with two shield motors corresponding to one 3DoT motor. These shield motors are controlled with a pwm driver on the motor driver shield.

    For our back emf pcb we included a multiplexer to control the signals sent to the full wave rectifier. This multiplexer is controlled through the Adafruit PCA9685 PWM driver IC. The multiplexer connects to the ADC on the 3DoT allowing us to receive rpm readings. All of these commands and telemetry are made possible with the use of the HM-11 on the 3DoT board.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Interface Definition’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/interface-matrix.jpg’ attachment=’162654′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 12- Interface Matrix
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For our interface matrix we are using the two header sections on the top of the 3DoT. We do not include the front headers because they are not used in this project.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Modeling/Experimental Results’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Much of the design process for the back EMF board was done simulating various configurations in LTSpice. Investigating the possibility of supplying a single supply to the op amps as opposed to a split supply. There was also investigation of some of the circuits found from the university of Northern Illinois. 

    Figure 13 – LT SPICE EMF Circuit

    One problem was the low supply available for the chips. In the simulation we would often see clipping to the supply rail. 

    Figure 14 – LT SPICE EMF Circuit Output

    One of the configurations that seemed to work well was from the university of northern Illinois. We needed a supply of 8 volts but with the right gain we could be a very even graph.

    Figure 14 – Full wave Rectifier

    Figure 15 – Full wave Rectifier Output

    We might consider feeding a full bridge rectified into a common emitter or common source configuration to give us a signal in the range of what we can achieve without a higher voltage. 
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Mission Command and Control’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Arxrobot_App.png’ attachment=’162657′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 16 – Arxrobot App Controls
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    #include
    #include // instantiated as ArxRobot at end of class header
    #include
    #include // I2C support
    //#define MCP4017_ADDRESS 0x2F

    Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
    //servodriver is used for the 4 motors and 2 servos on the pcb shield
    ArxRobot ArxRobot; // instantiated as ArxRobot at end of class header

    Servo servoA; // Instantiate new Servo object
    Servo servoB;
    Servo servoC;
    Servo servoD;

    #define SERVO_C 22
    #define SERVO_D 17
    //these are the two new commands we are adding, move is an old command that we are changing

    #define BLINK 0x40
    #define SERVO 0x41

    Motor motorA; //create motor A
    Motor motorB; //create motor B

    const uint8_t CMD_LIST_SIZE = 3; // we are adding 3 commands (MOVE, BLINK, SERVO)
    /*
    * User Defined Command BLINK (0x40) Example
    * A5 01 40 E4
    */
    void blinkHandler (uint8_t cmd, uint8_t param[], uint8_t n)
    {
    Serial1.write(cmd); // blink command = 0x40
    Serial1.write(n); // number of param = 0
    for (int i=0;i<n;i++) // param = none
    {
    // Serial.write (param[i]);
    }
    } // blinkHandler

    /*
    * Override MOVE (0x01) Command Example
    * A5 05 01 01 80 01 80 A1
    */
    void moveHandler (uint8_t cmd, uint8_t param[], uint8_t n)
    {
    // Serial.write(cmd); // move command = 0x01
    // Serial.write(n); // number of param = 4
    /* for (int i=0;i<n;i++) // param = 01 80 01 80
    {
    Serial.write (param[i]);
    }*/
    motorA.go(param[0],param[1]); //param[0]=direction: forward(0x01) backwards(0x02) brake(0x03) neutral(0x04)
    //param[1]=speed(0-255)
    motorB.go(param[2],param[3]);

    //The motors controlled by the pcb shield are controlled by uint16_t so we need to map our 8bit pwm signal to 16bits and then send it to the motors
    uint16_t pwmLeft = map(param[1],0,255,0,4096);
    uint16_t pwmRight = map(param[3],0,255,0,4096);

    //left side
    if (param[0]==0x01){
    forwardLeft(pwmLeft);
    }
    if (param[0]==0x02){
    backwardLeft(pwmLeft);
    }
    if (param[0]==0x04){
    neutralLeft();
    }
    //right side
    if (param[2]==0x01){
    forwardRight(pwmRight);
    }
    if (param[2]==0x02){
    backwardRight(pwmRight);
    }
    if (param[2]==0x04){
    neutralRight();
    }
    } // moveHandler

    void forwardLeft(uint16_t pwmSet){
    // Drive each PWM in a ‘wave’
    //pwm is set out of 4096
    //Motor J5
    pwm.setPWM(6, 0, pwmSet); //PWMA
    pwm.setPWM(7,0,4096); //AIN1
    pwm.setPWM(8,4096,0); //AIN2
    //Motor J4
    pwm.setPWM(5, 0, pwmSet); //PWMB
    pwm.setPWM(4,4096,0); //BIN1
    pwm.setPWM(3,0,4096); //BIN2
    }
    void forwardRight(uint16_t pwmSet){
    //Motor J6
    pwm.setPWM(11, 0, pwmSet); //PWMB
    pwm.setPWM(10,4096,0); //BIN1
    pwm.setPWM(9,0,4096); //BIN2
    //Motor J3
    pwm.setPWM(0, 0, pwmSet); //PWMB
    pwm.setPWM(1,0,4096); //BIN1
    pwm.setPWM(2,4096,0); //BIN2

    }

    void backwardLeft(uint16_t pwmSet){
    // Drive each PWM in a ‘wave’
    //pwm is set out of 4096
    //Motor J5
    pwm.setPWM(6, 0, pwmSet); //PWMA
    pwm.setPWM(8,0,4096); //AIN1
    pwm.setPWM(7,4096,0); //AIN2

    //Motor J4
    pwm.setPWM(5, 0, pwmSet); //PWMB
    pwm.setPWM(4,0,4096); //BIN1
    pwm.setPWM(3,4096,0); //BIN2

    }
    void backwardRight(uint16_t pwmSet){
    //Motor J6
    pwm.setPWM(11, 0, pwmSet); //PWMB
    pwm.setPWM(9,4096,0); //BIN1
    pwm.setPWM(10,0,4096); //BIN2
    //Motor J3
    pwm.setPWM(0, 0, pwmSet); //PWMB
    pwm.setPWM(1,4096,0); //BIN1
    pwm.setPWM(2,0,4096); //BIN2

    }

    void neutralLeft(){
    // Drive each PWM in a ‘wave’
    //pwm is set out of 4096
    //Motor J5
    pwm.setPWM(7,0,4096); //AIN1
    pwm.setPWM(8,0,4096); //AIN2

    //Motor J4
    pwm.setPWM(4,0,4096); //BIN1
    pwm.setPWM(3,0,4096); //BIN2
    }
    void neutralRight(){
    //Motor J3
    pwm.setPWM(1,0,4096); //BIN1
    pwm.setPWM(2,0,4096); //BIN2
    //Motor J6
    pwm.setPWM(9,0,4096); //BIN1
    pwm.setPWM(10,0,4096); //BIN2

    }
    /*
    * User Defined Command SERVO (0x41) Example
    * Rotate servo to 90 degrees
    * A5 02 41 90 76
    */
    void servoHandler (uint8_t cmd, uint8_t param[], uint8_t n)
    {
    /*//Serial.write(cmd); // servo command = 0x41
    //Serial.write(n); // number of param = 1
    for (int i=0;i<n;i++) // param = 90 degrees
    {
    // Serial.write (param[i]);
    }*/
    uint16_t servoPos=map(param[0],0,255,1000,2000);
    servoA.writeMicroseconds(servoPos);
    servoB.writeMicroseconds(servoPos);
    servoC.writeMicroseconds(servoPos);
    servoD.writeMicroseconds(servoPos);
    //1000 and 2000 are the min and max for the servo positions in the writeMicroseconds command

    return false; //return false since we are not intercepting a predefined command
    } // servoHandler

    /*
    * Command Example
    * Step 2: Register commands by linking IDs to their corresponding command handlers
    * In our example when the MOVE command is intercepted the moveHandler is to be run.
    * In a similar fashion the BLINK command calls the blinkHandler and SERVO the
    * servoHandler.
    */

    ArxRobot::cmdFunc_t onCommand[CMD_LIST_SIZE] = {{MOVE,moveHandler}, {BLINK,blinkHandler}, {SERVO,servoHandler}};

    /*
    * Telemetry Example
    * Step 1: Instantiate packet
    * In our example we simulate a current sensor wired to MOTOR 2. MOTOR2_CURRENT_ID
    * is defined as 0x02 in Configure.h
    * To simulate the data stream coming from the sensor we will read ATmega32U4
    * Register OCR4D which controls the duty cycle of MOTOR 2.
    */
    Packet motorPWM(MOTOR2_CURRENT_ID); // initialize the packet properties to default values

    void setup()
    {
    Serial.begin(9600); // default = 115200
    ArxRobot.begin();
    ArxRobot.setCurrentLimit(64); //set current limit to ~= 500mA per motor

    /*
    * Command Example
    * Step 3: Tell 3DoT Robot software about new commands
    */
    ArxRobot.setOnCommand(onCommand, CMD_LIST_SIZE);

    /* Telemetry Example
    * Step 2: Modify default values assigned to internal properties as needed.
    * Before a packet is created and sent, it is qualified. Specifically,
    * the data in a packet must change by some amount from the previous
    * packet and may not be sent with at a period less than some value.
    * In most cases you can leave these values at their default values.
    */
    motorPWM.setAccuracy(1); // change sensor accuracy from +/-2 DN to +/-1 DN (– this line is optional –)
    motorPWM.setSamplePeriod(500); // change sample period from 1 second to 0.5 seconds (– this line is optional –)
    motorA.begin(AIN1,AIN2,PWMA);
    motorB.begin(BIN1,BIN2,PWMB);

    //our new code for the other 4 motors. From pwmtest on adafruit
    pinMode(5,OUTPUT);
    pinMode(6,OUTPUT);
    pwm.begin();
    // In theory the internal oscillator is 25MHz but it really isn’t
    // that precise. You can ‘calibrate’ by tweaking this number till
    // you get the frequency you’re expecting!
    pwm.setOscillatorFrequency(27000000); // The int.osc. is closer to 27MHz
    pwm.setPWMFreq(1600); // This is the maximum PWM frequency

    //run the servos
    servoA.attach(SERVO_A);
    servoB.attach(SERVO_B);
    servoC.attach(SERVO_C);
    servoD.attach(SERVO_D);

    // if you want to really speed stuff up, you can go into ‘fast 400khz I2C’ mode
    // some i2c devices dont like this so much so if you’re sharing the bus, watch
    // out for this!
    Wire.setClock(400000);

    }

    void loop()
    {
    ArxRobot.loop();
    }
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For our commands we use a modified move command and a custom servo command.

    Move(0x01)- This command is prebuild into the the Arxrobot app. We are overriding this command by adding four more additional motors to be run. Each side has one motor directly connected to the 3DoT that receives commands telling it direction and speed as normal. The two additional motors on each side of the robot use the same command to determine direction and the speed value is converted to a value that is usable by the PCA9685PW to determine their speed. We use sliders for this command so we can change Sojourners speed and can unlink the two sliders to change direction.

    Servo(0x41)- This command is an unisgned 8 bit integer that determines the postion of the four servos on Sojourner. Similar to move, two of our servos are connected directly to the 3DoT while the two other servos are connect to the motor driver shield. This new command determines the position of the servos between 0 and 90 degrees. We use a slider so we can position the servos anywhere between these two values. 
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Electronic Design’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Out electronics Design consisted of working on two circuits, a Back EMF circuit and a Commutator noise circuit. The back EMF circuit was designed to be integrated on the existing 3 dot motor board while the commutator noise circuit was to be a board that could be turned into a stackable board for expansion in later generations.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’PCB Design’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_heading tag=’h3′ padding=’10’ heading=’Commutator Noise PCB’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Comm-noise-pcb.jpg’ attachment=’162648′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 17 – Commutator Noise PCB
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The final aim of this board was to be capable of being mounted onto 3Dot board as an expansion module. During the course of our work we realized trying to fit everything on one board would be impractical so there would have to be a second board that can deal with the commutator noise circuit and only pass back the square wave. The test board was designed to fit only a footprint similar to the 3 dot itself as to be easily adapted to an adapter board. 

    An advantage of building the circuit outlined in the TI design guide is that the voltages needed are the same as the native 3Dot voltages. Each chip runs on 5 volts with a single 3.3 volt bias needed at the output.
    [/av_textblock]

    [av_heading tag=’h3′ padding=’10’ heading=’Motor Driver/ Back EMF PCB’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/PCB-design.jpg’ attachment=’162659′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 18 – Motor Driver/ Back EMF PCB
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For the back EMF PCB we needed to send the motor data to the A4 pin which is one of the 3DoT’s ADC pins. To make more space on the board we added headers on the top for our four motors, replacing the larger jst motor headers. We also moved the cutout slightly higher up to give us more space to access the servo and motor headers on the 3DoT. Since we only had access to one ADC pin and we wanted to get readings from four motors we used a multiplexer connected to the PWM driver to switch between readings. Since our ADC was not able to get negative results we added in a full wave rectifier to the output of the multiplexer before the results were sent to the ADC. This allows us to determine the RPM of the motors when they are travelling in the opposite direction and to use our software to determine the direction. The original board that we were given to use with Sojourner is the motor driver shield design by Jaap from AoSA. This shield’s IC parts were reorganized and placed into the top part of the PCB to make more space for the full wave rectifier.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Firmware’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    #include
    #include <avr/io.h>
    #include “3DoTConfig.h”
    //#include “Averager.h”
    uint16_t sample;

    //average backEMF(sensor,8); //10 is the buffer depth and is adjustable

    void setup() {
    // put your setup code here, to run once:
    init3DoT();
    digitalWrite(AIN1,LOW);
    digitalWrite(AIN2,HIGH);
    pwmWrite(PWMA,100);
    initADC();
    }

    void loop() {
    // put your main code here, to run repeatedly:
    //FSM measure back EMF
    static int state=0;
    const uint32_t timeDelay = 50;

    switch(state) {
    case 0:
    //can also try the attachinterrupt method
    if(TCNT4 == OCR4D){
    state=1;
    }
    break;
    case 1:
    static uint32_t endOfDelay=micros()+ timeDelay;
    if (micros() > endOfDelay){
    state=2;
    uint16_t sample=get_Analog(A3);
    //grab ADC sample
    }
    break;
    case 2:
    Serial.println(sample);
    //can also add running averager
    /*
    * if (firstRun==1){grab 8 samples if still doing running averager}
    * sample=analogRead(A3) or readSensor(A3)
    */
    state=3;
    break;
    case 3:
    //getAvg();
    //Serial.println(sample);
    state=0;
    break;
    }
    }

    void pwmWrite(int motor, int value){
    if (motor==PWMA) {
    OCR4D=value;
    // Serial.println(“Right Side”);

    }
    else if (motor==PWMB) {
    // Serial.println(“Left Side”);
    OCR4B=value;
    }
    }

    int get_Analog(int pin) {
    uint8_t low, high;
    ADMUX=(1<<6)|(pin&0x0f);
    ADCSRA|=(1<<ADSC); //starts the conversion
    while ((ADCSRA, ADSC)); //ADSC is cleared after the conversion
    low=ADCL;
    high=ADCH;
    return (high<<8)|low; //combines the two bytes
    }
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Our firmware for this project involved creating code for testing the back emf circuit. To do this we went through multiple iterations on an FSM. The goal of this code was to be able to grab ADC readings within a narrow length of time to avoid damaging the ADC from an early reading during a voltage and before the next PWM cycle started. For this we also created a class based running averager to implement at the end for our RPM readings. For our initializations we used the timer and adc registers to avoid using arduino’s prewritten functions that were too slow for our project. For the control of Sojourner we created command handlers to interact with the Arxrobot app using the Arxterra libraries.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Mechanical/Hardware Design’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Fusion1.png’ attachment=’162622′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 19 – Sojourner Fusion 360 View
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/sojourner-1.jpg’ attachment=’162661′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 20 – Completed Sojourner
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The four parts that split Sojourner into are the solar tray, phone holder, main chasis, and rocker bogie. The solar tray holds the solar panels in the proper position to provide them with sunlight. This part also provides a cover for the phone holder. The phone holder has clips to keep the phone in the correct position to get video that can be displayed to the control panel. It also has space to include a periscope to get better vision. This part is screwed onto the main chasis to cover it and position the solar tray. The main chasis holds the 3DoT microcontroller and has holes for the wires to connect to the wheels and servos. It holds the gearbox which keeps the two rocker bogies connected to the main chasis and moving in sync. The rocker bogie keeps are wheels in place and has mounts to connect the servos to the motors for steering. It is designed to help Sojourner overcome difficult terrain. These are the four main parts that comprise our 3D model.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Verification & Validation Test Plan’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Our verification plan has 5 test cases. Each one holds the 5 portions of our project that being: Basic Operations, Mission Operation, Sojourner Build, Logistics and Research. Basic operations verifies Sojourner’s Telemetry and basic functions of turning the motors with the ArxRobot App. Originally planned to be demonstrated, many of the requirements here had to be pushed to video due to the failures (wearing down) of the 3D printed parts and no access/time to reassemble Sojourner before verification. Due to the failure of the 3D printed parts (what we were thinking to be the material PETG, being too soft for continual use), the mission operation requirements, initially intended for demonstration needed to be cut as well.

    For Sojourner’s build instructions, we found it easy to be done through inspection to make sure Sojourner was safe and accessible for the intended audience of children. Research verification was included to discuss the need of the sensorless encoding and its implementation. The verification plan can be found here.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Concluding Thoughts and Future Work’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Robert Pearson (Project Manager & Mechanical Engineer):

    This semester, as a project manager, I was required to do a lot of quick thinking. As the entirety of the project changed from being on campus to being at home, calendars, scheduling, individual tasks and budget all needed to be changed. For example, when ordering parts to test out the commutator noise circuit in April, it was found that the fastest shipping could be done in 1-2 weeks; as the parts weren’t viewed as a priority. At this point I had to work with my group mates to plan “if we can’t be working on this, what task can be switched to at this time.”

    A takeaway I would give to the next generation of Sojourner is to pinpoint the aspect of the project you want to focus and do well on. I believe our project turned out to be a sensorless rpm encoding generation #1 rather than a Sojourner generation #4. I would want the next iteration of Sojourner to continue working on the commutator noise circuit, as the circuit does work and is able to use ripple counting. I would say that the next step of this would be to properly write code similar to the Back EMF method. In turn one should be able to then implement the stacked PCB as intended onto the Back EMF/Motor Driver Shield.

    Alex Dalton (Electronics & Control Engineer):

    I would recommend to future teams working on coding for their 3DoT projects to read through the 3DoT libraries to understand what is going on behind the scenes. Doing this makes it much easier to make changes and add new code to the commands and telemetry of the robot. I also recommend always researching the ICs that you plan to use as the producers often have code to introduce how to use the components.

    Another important aspect to approaching a new project is to decide what the most important parts of your project are. Groups should decide to focus more on research or building from the very beginning. I believe that our team was off to a very good start at the beginning of the semester, but due to restrictions placed upon us due to the lockdown orders and the loss of access to the school’s resources we were not able to fully develop the class as much as we would want.

    David Garcia (Mission, System & Test Engineer):

    Looking back at this semester, there were some mistakes that could have been easily avoided. Attempting to order a PCB for the first validation test stands out as a big mistake. The largest misstep for our team was to start in two directions, one research and the design based and never get to bring those two paths together as closely as we would have. I think it would have been much better for us to have started as a purely research and experimentation team and work in design only once we got some experimental results. 

    I can not more strongly recommend not taking this class during a worldwide pandemic. Cooperation is difficult when your teammates are a possible source of death and destruction.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’References/Resources’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    1. Project Video 
    2. Design Review
    3. Initial Research Presentation
    4. Burndown
    5. Verification and Validation Plan
    6. Solidworks Files
    7. Version 2 Presentation
    8. EagleCAD files
    9. Firmware
    10. Bill of Materials
    11. Mechanical BOM
    12. Sojourner Spring 2020 Schedule

    [/av_textblock]

    [/av_one_full]

  • Sojourner Motor Functions and Telemetry

    Sojourner Motor Functions and Telemetry

    [av_one_full first min_height=” vertical_alignment=’av-align-top’ space=” margin=’0px’ margin_sync=’true’ padding=’0px’ padding_sync=’true’ border=” border_color=” radius=’0px’ radius_sync=’true’ background_color=” src=” attachment=” attachment_size=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Spring 2020

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Motor Functions & Telemetry

    Author: Alex Dalton

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn

     

    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Motor Background’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For Sojourner, we are using the Greartisan DC 6V 150RPM N20 High Torque Speed Reduction Motor with Metal Gearbox Motor for DIY RC Toys. These motors are small enough to fit into our motor mounts and provide enough force to move Sojourner.

    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Via the PCB’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For our PCB we reorganized the board we were given to make space for the addition of a multiplexer and a full wave rectifier. One way we made space was by changing the jst headers to standard pin headers. We also moved the headers and some of our ic chips towards the top of the board to avoid have large power lines taking up too much space. For our back emf circuit we added a full wave rectifier, which turns the negative values of our motor data into positives, on to the board so our rpm could be measured going forward and backward. We also added a multiplexer IC onto the board so that we could choose which motor we wanted to get our data from. The TB6612FNG motor drivers are the same as the ones on the 3DoT and we are controlling them with the PCA9685PW PWM driver by using the pwm signals with either 100% or 0% duty cycle to produce digital signals that control the direction of the motors. We also use some of the pins as regular pwm signals to control the speed of the motors. The same method we use to control motor direction is also used to control the multiplexer and choose which motor we are receiving data from.

    Figure 1: PCB schematic

    Figure 2: Board design
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’The Arxrobot App’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The two large sliders on the app determine the speed and direction of all 6 of our robot’s motors. The sliders can be unlinked to run them in different directions and with different speeds. The smaller slider above that determines the position of the servo. The servo command was created in the command section of the app. It is command 0x41 and is an unsigned 8-bit integer because that is the number of bits the servos needs to run. Our servos can move 90 degrees by completely moving the slider over to the right and moving it to the left will move them back to their original position. We chose a slider so that we could adjust how far the servos moved incase we wanted to move in a diagonal direction.

    Figure 3: Arxrobot app
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h2′ padding=’10’ heading=’Code’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    To run these motors we use the following code along with the arxterra robot app. Our complete code can be found here.
    We use the ArxRobot and Adafruit PWM driver libraries to control our robot. The beginning part of the code is setting up the servos and motors under their respective class objects and defining our pins and commands. We do not define a move command because we are overriding the existing ArxRobot move command rather than making a new one. The three commands we have in our code are move, blink, and servo.
    The next part of the code is the moveHandler. The four parameters we receive from the app are the direction and speed from the left and right slider. Two of our motors are on the 3DoT and are operated with the go method in the libraries. For controlling our remaining four motors we are using the PWMdriver with these parameters. The PWM signal sent to our motors determines their speed, the 3DoT works off an 8 bit integer speed, while the pwmDriver generates a 16 bit PWM signal. The map function converts our 8 bit speed values to 16 bit values so the motors will be going the same speed. The next part is multiple if statements to determine what direction the motors should be going.
    The if statements send the processor to a function that sets the direction and speed of the motor. To save on pins we are using the PWM pins as digital pins by sending a PWM signal with a duty cycle of 0% for a low signal and a duty cycle of 100% for a high signal.
    The third command in our code is the servoHandler. The servo command writeMicroseconds accepts a value between 1000 and 2000. Since our servo slider values are between 0 and 255 we need to map them to the correct values similar to what we did in the motor section of the code.

    In our setup code we set the current limit for the 3DoT this is important because the motors and servos can go above the currentlimit. The motors use the most current when quickly switching direction while going max speed.


    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Troubleshooting’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Before starting to work with the Arxterra app it is recommended to read through the getting started section on Arxterra. I would also recommend looking through the Arxterra libraries to have a deeper understanding on how to properly use them and to make sure your board is properly defined. We ran into issues with the servos, but were able to get them working with some help from Jaap from Arxterra, and we also weren’t able to get coolterm to work with the 3DoT, but were able to solve our software problems without it.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Conclusion’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    In conclusion, Sojourner can be run with the Arxrobot app providing commands to determine its direction. Sojourner’s DC and Servo Motors have been tested to work through basic Arduino inputs as well as setup for telemetry. This allow for an easy interface for the user.
    [/av_textblock]

    [/av_one_full]

  • Sojourner Sensorless RPM Firmware

    Sojourner Sensorless RPM Firmware

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Spring 2020

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Sensorless RPM Firmware

    Author: Alex Dalton

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn

     

    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Intro’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Editors Note: This code fills a traditional buffer using code that could be used to create a circular buffer.

    Sensorless encoding is a method of gathering rpm data without the use of shaft encoders. One way to do this is through measuring the back emf generated by the motor between pwm signals. This can save weight, space, pins, and power as the sensors are no longer required. This post will be explaining the software we used to measure back emf through the 3DoT microcontrollers ADC.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Finite State Machine’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For our testing code we use a finite state machine. The finite state machine let’s us add the code to our main code without stopping the processor on one part. The processor will only run the current state and then continue on to the rest of the code.

    State 1 of our FSM starts with reruning until the PWM signal falls, it then moves on to state 1. In state 1 we have a delay before moving on to the next state. In the figure below the green line is the PWM signal, while the red is our back emf. The back emf spikes once the pwm drops, these values are not the ones we want and are too high for our ADC to handle at around 12V. As can be seen in the figure this high voltage eventually stabilizes which is the point where we want to get our readings and is why we included our delay. We then get our sample from the ADC and move onto state 2. In state 2 we print our result. With the running averager we add another state between 1 and 2 where we fill up a circular buffer and get an average value so that our rpm speed will be more stable.

    Figure 1: Oscilloscope results from first back emf test
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Code’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For our test we wanted the ADC to be able to grab values as fast as possible. Arduino’s libraries include the function analogread() for getting readings from the ADC, but this function re initializes the ADC every time it is run so we decided to create code to initialize the ADC only once and get readings faster since our the back emf method requires fast readings. This code shows how to initialize timer4 in fast pwm mode and also how to initialize the ADC.

    Our setup code for reading back emf values starts with running our code to intialize the 3DoT and the ADC. We also setup the motor and send a PWM signal to start it. We used a fairly low speed of 100 so we would have more time for our ADC to grab readings.

    Case 0 of our finite state machine is an if statement to move to state 1 when the pwm signal switches from on to off. Another way to do this in a larger piece of code would be to use an interrupt attached to the drop of the pwm signal. The next part is creating a small delay so our motors will still run by using the micros() function. Micros() takes the current time on our timer and we use that value by adding the length of our desired delay to the current time. We then check if the timer has passed this value with our if statement and micros(). When the processor has passed this value we move into state 2 and grab a reading from our ADC. This was designed as an initial test so the running averager was not included and instead we use case 2 just to print the sample we took from the ADC. With the running averager we would grab enough values  in case 2 to completely fill our circular buffer the first time the code is run or just add the new value we got from case 1 and drop the oldest one before taking the average and printing that result. After this the state goes back to the beginning

    The last two functions of our code are pwmWrite and get_Analog. Pwmwrite sets our motor value and lets pick if we are going to be running motor A or motor B, although in this case we are only using motor A. The get_Analog function uses the ADC registers to start the conversion and get our back emf results.


    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’What is an Averager?’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    A running averager or circular buffer is an averager based on recent values. As a new valueis received, the oldest value is removed. A running averager is performed over a certain number of data points and one of the design challenges is deciding what to do before the required number of data points has been received. One potential solution is taking a number of samples equal to the point value of the running averager when it is first run. The number of points that are used for the averager determines how much a single data point affects the results. Averaging over only 3 points means a new data point will have more of an affect on the final result than a 20 point averager, which can be an issue if you want remove noise from the data.

    The code we wrote for our running averager uses a class based method. The average class is set up with two private properties: pin and buffer_depth, that are set when defined by the constructor. This allows us to use this method for multiple different pins and change the number of points we want to average over very easily. The three public methods we have are average, readSensor, and , getAvg. Average is our constructor which fills up our initial circular buffer values and defines the pin number and the depth of the buffer. The readSensor() method is a 3 step method that reads a new analog value, gets the oldest value, and adds the difference between our new value and old value to the sum of all values. We then replace the oldest value with the new one in our buffer and increment the pointer forward. The last method is getAvg() which is a simple one that divides the sum by the buffer_depth to determine the average value of our buffer.

    This is a short example of how these methods work in a main body of code. We include the averager class and define the pin we want to get readings from. The average method is used as our constructor outside of setup. For this example we are reading from A0 and are creating an 8 point moving averager. The loop for our code is just the readSensor method to get a new value and a serialprintln with getAvg() to display our moving averager result. We multiply the final result in this example since back emf results are proportional to the speed of the motors.


    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Design Parameters’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    To get the required data for our running averager we need to have access to the back emf generated by the motor. Since we only have access to one analog pin connected to the ADC and four motors that we want data from we need a way to switch between the motor we are getting results from. To do this we used a multiplexer(74HC4052D) that is controlled by the same PWM driver(PCA9685PW) used to control our motor drivers. We also needed to get our readings very quickly which is why we wrote our own alternative to analogRead().
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Conclusions’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    In conclusion, we created code to quickly get ADC readings to protect our ADC and improve accuracy. We included a finite state machine so we could properly implement delay and separated our code into states so that it could later be added into our main code. We created a class based running averager to get an average speed over a number of points that we could adjust to get proper results.
    [/av_textblock]

    [/av_one_full]

  • Sojourner Build Instructions

    Sojourner Build Instructions

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Spring 2020

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Building Instructions

    Author: Alex Dalton

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’The 4 Main Parts of Sojourner’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The four main parts of Sojourner are the rocker bogie, phone holder, solar tray, and main chasis. The rocker bogie attaches the wheels to our main chasis and keep our robot running when going over more difficult terrain. The phone holder is on top of the main chasis and positions the phone so that video can be streamed to the control panel. The solar tray is on top of the phone holder and keeps the solar panels in place.  The main chasis contains the 3DoT board and has a gearbox that keeps the rocker bogie legs aligned. These parts are 3D printed from fusion 360, which lets us view the 3D models. Changes to any of these need to be made in a software like solidworks.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Rocker Bogie’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Figure 1: The wheel

    The shaft of the motor should securely fit into the wheel and the nut and screw should keep the motor securely in the wheel. The motor mount connector should then slide into the motor mount and a 6mm alignment pin should be used to hold it in place.

    Figure 2: The wheel mount

    The motor mount connector is screwed into the rocker bogie with the following parts to keep it in place. The gear is used to connect with the servo gear for servo based steering as the servo moves the mounted wheel.  The servo mount will then slot into the rocker bogie leg and be screwed in. Keep in mind the size of the servos you plan to use, the servo mount will likely need to be redesigned to accommodate them.

    Figure 3: The wire holders

    These three smaller parts clip onto the legs of the rocker bogie and are used to keep the wires in place.

    Figure 4: The rocker bogie legs

    The last part of the rocker bogie is connecting the legs together as shown the 2 alignment pins are placed to keep the upper parts of the legs together. A screw is placed through this part of the rocker bogie that will be discussed in the chasis section. The lower leg is connected with a screw and a nut at the end to keep it in place. This lower leg is connected to two wheels. The one at the end is assembled the same as the previous wheel and the middle wheel’s servo mount connector slides into place.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Phone Cradle’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Figure 5: The phone holder

    The phone holder is designed for an iphone 4, to use it for a different model phone will require a redesign of the phone holders, which are highlighted in blue on the side. These are necessary if you want to use a phone to get video from Sojourner and they should be duplicated for the opposite side as well. The blue part in the hole connects the phone holder to the main chasis, this part needs to bend when being inserted so it recommended that a flexible material be used here. Four of these should be printed, one for each hole. They are inserted turned 90 degrees from where they are in the picture and then turned back to the correct position.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Solar Tray’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Figure 6: The solar tray

    The solar tray is connected on top of the phone holder by these parts highlighted in blue. Make sure to use a very flexible material for the anchor shaped parts because they need to bend to fit in and parts that small can very easily snap. The middle part fits in on the outside of the phone holder and should be secured with an alignment pin. Extra parts should be printed for the other side of the solar tray and in case any parts break during assembly.
    [/av_textblock]

    [av_heading heading=’Main Chassis’ tag=’h2′ style=” size=” subheading_active=” subheading_size=’15’ padding=’10’ color=” custom_font=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The rocker bogie connects to the main chasis as shown, with the screw going through the rocker bogie and into the main chasis, where a nut should be used to secure it in place at the end of the gear. This same process applies to the other side, just with a longer screw.

    Figure 7: Rocker bogie chasis screw and gearbox

    The gearbox can be tricky to fit in properly since the parts are so small. The two gears with square holes connect to the rocker bogie, while the two gears circular holes have a screw going through a cylindrical tube to hold them in place. Also note the washer next to the gear and the part labeled diff brush 240:1 that help keep the gears properly spaced. The horseshoe like should slot into the bottom of the gearbox and adds space between the gear and the edge of the box and also prevents it from being knocked out of place. In the bottom right corner, is where the phone holder is connected to the main chasis with a screw.

    Figure 8: The gearbox

    The last part of the main chassis the 3DoT holder, the two pcb rails should fit into the main chassis and connect to the holes on the bottom of the chasis with the pcb clip slotting into place to hold the pcb steady. The two holes at the back of the chasis should have enough space for you to turn on the 3DoT and plug in a micro usb to upload new code and charge it. When the 3DoT is in place the box and front cover can be slid into place.

    Figure 9: The front panel and 3DoT holder
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Mechanical BOM’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Before we go in depth with building, the cost and the amount of mechanical parts must be addressed. When purchasing parts such as the heat inserts for plastic, sources we used such as Fastenal and McMasterCarr did not have the parts available to buy individually. Reacting to this, while planning to the project in the beginning; we had to allocate more money to the mechanical parts as part of a contingency. Parts such as the Square Metal Tubing also brought their own problems later on the project. The square metal tubing had to be bought twice, as during the initial use, the tubing was cut too short, and since the tubing came in only about a foot of length; it needed to be reordered in order to create a tubing with the proper length.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/04/mechanical-bom.jpg’ attachment=’159342′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 10: Mechanical BOM
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’The Results’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Figure 11: Completed Sojourner
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’3D Printing’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For 3D printing the parts we went to the innovation space here at CSULB, located in the library. They offer many different materials for printing and offer a student discount so they were the best option for our initial print. The discount they offer is per print with a minimum cost of $5 so we had all of parts printed in 2 orders instead of doing each part individually. Some of our parts needed to be reprinted due to errors in printing and general wear and tear over the course of the semester. For getting a couple parts reprinted we went to Maker’s Society because they were able to get the parts printed very quickly and we did not want to slow down on constructing the robot. The discount from the innovation space would also not apply as these smaller parts were below the minimum for the discount.

    For our project we also received help from Jeff Gomes who generously helped us by redesigning and printing our servo mounts because our previous ones did not fit with the servos we had ordered.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Reflection’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Some problems with assembling Sojourner can appear when ordering parts, we ordered are parts from Fastenal, although other stores also likely have the parts. Some parts might be out of stock and will require substitutions. In our case the servo was no longer in production and our new servo did not fit into the servo mount, requiring us to ask for help in redesigning and printing a new servo mount. Small parts can break or have errors when printing, it is recommended to order multiple copies of these parts in case anything happens to prevent delays.
    [/av_textblock]

    [/av_one_full]

  • Sensorless Encoding Trade-off Study

    Sensorless Encoding Trade-off Study

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Spring 2020

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sensorless Encoding Trade off Study

    Author: David Garcia

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn


    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Methods of RPM Estimation’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Heading into this project we had to devise various ways to get RPM data as well a way to create a value assumed to be “true”. This “true” value was taken to be an external tachometer. This will give us a way to have a common variable between each method of calculating RPM data.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Neiko.png’ attachment=’162115′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 1 – Neiko Tachometer
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Encoders’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The first and most straightforward part was to get the encoders working with the motors we bought.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Encoders.png’ attachment=’162134′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 2 – Pololu Magnetic Encoder
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    While these encoders were utilized in previous Sojourner robots, each team also complained of the trouble with fitting the wires during construction.

    The way these encoders work is by connecting to the A and/or B lines which will generate a pulse at a rate of 12 per revolution. Using the know gear ratio of the motor and this we have come up with a constant to allow for accurate RPM values.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Pulses.png’ attachment=’162175′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The spring 2019 class had actually already written some code for using the encoders we were planning on using. It was written for a fully built Sojourner but we only needed to have a single motor for testing.

    There are only three variables needed to find RPM Data from the encoders. One variable is needed to for incrementing ticks, one variable is need to compare. If you increment the variable on each pulse of the encoder then and compare it in a loop that repeats at a known time you can know how often the shaft rotated in the time between loops.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Commutator Noise Circuit’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    This circuit was based upon translating Commutator Spikes into a frequency that relates to the RPM of the at the motor Shaft. A major advantage over this method would the elimination of all the wires that would have to be connected at the motors. A major disadvantage of how we wanted to do this method would be using polling versus interrupts.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/V1-PCB.png’ attachment=’161225′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”][/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Back EMF Circuit’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The accuracy of the BEMF circuit was largely related to the ability of our delay to accurately avoid reading the initial exaggerated sparks at the start and the ability of the our circular buffer to be large enough to average properly.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/PCB2-1.png’ attachment=’162331′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 3 – Back EMF Circuit
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”][/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Methodology’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    As stated before, each mode was to be tested against the tachometer over a the same range of analog write values starting from 15 and going to 255, as that would be the max value of the analog write function. At each value a reading from the tachometer and the estimate would be taken. The last thing would be to calculate a total percentage off from the readings.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/example.png’ attachment=’162321′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_heading tag=’h2′ padding=’10’ heading=’Costs’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Cost-Encoder.png’ attachment=’162305′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Cost-COmm-1.png’ attachment=’162307′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_heading tag=’h1′ padding=’10’ heading=’Comparisons’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    We were unable to perform a true examination of our methods
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Implementation’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Even by implementing both Back EMF and comm noise we are able to significantly  reduce the price of the project.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Compar.png’ attachment=’162309′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [/av_one_full][av_heading tag=’h1′ padding=’10’ heading=’Conclusion ‘ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Just as we were starting to get to the point of having all the circuits working we ran out of time and were unable to do the entire trade off study to compare the methods in a systematic way. What we did see was a promising for our results. Irregardless, either method has a vast cost saving over the encoders being used.

    The encoders themselves cost around $9, but they only function with the extended shaft motors which cost around $18. The hybrid-implementation of sensor-less encoding would be cheaper as the price per unit on a single board is $8.05, and they can be implemented without the costly extended shaft motors. Taking them together would still result in savings of $91.11.
    [/av_textblock]

  • Back EMF Initial Study

    Back EMF Initial Study

    [av_one_full first min_height=” vertical_alignment=’av-align-top’ space=” margin=’0px’ margin_sync=’true’ padding=’0px’ padding_sync=’true’ border=” border_color=” radius=’0px’ radius_sync=’true’ background_color=” src=” attachment=” attachment_size=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Spring 2020

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Back EMF Initial Study

    Author: Robert Pearson

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn

     

    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Background’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_heading tag=’h2′ padding=’10’ heading=’What is Back EMF?’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Editor: This post includes a number of errors. Please see an alternative post by David Garcia on the same subject. 

    When a motor spins, the coil inside produces a magnetic field. This magnetic field, in turn, creates a voltage, known as an Electromotive Force. The intensity and peak of Back EMF is speed-dependent, the higher the speed the greater the Back EMF. An electromotive force, or EMF, opposes the voltage that is applied to the motor which can reduce the overall current passing through the motor.

    For our project, Back EMF can be a viable method of sensorless rpm, as we can measure the voltage generated by the motor. Through experimentation, the measured Back EMF can be relayed into a digital value for the range of the Polulu DC motor we are using. Knowing the intended digital value we should be able to use that to create firmware where it can adjust the speed to the user’s intended settings, creating a more accurate and responsive robot.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Back EMF for Encoding’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The two methods for sensorless rpm that we initially considered are back emf and commutator noise. The commutator noise research blog post can be found here.

    The back emf method utilizes our motor as a generator to send a voltage to an ADC. A crucial part of using back emf is to allow for a sufficient latency period between the shutoff of the motor and data collection. Two notions to consider for back emf sensorless encoding are that: it can only be used for velocity unlike encoders, which could be used for the position as well and that it will only work for brushed DC motors, not brushless DC motors.

    The back emf makes use of the motor as a generator when the PWM signal is low. We measure the voltage produced by the motor during this time, this value is the back emf. The back emf is proportional to the speed of the motor. When we increase the voltage or duty cycle of the PWM signal, the back emf value increases as well. Through testing, we can calculate Kp to divide our back emf by to determine the rpm of the motor.

    A possible solution to measuring the back EMF, according to Precision Microdrives, would be putting a resistor in series to the motor which will, in turn, create thermal noise, and let the Voltage through the circuit vary.
    [/av_textblock]

    [/av_one_full][av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Circuit Design’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    While testing the Back EMF circuit, we used the schematic provided by Precision Microdrives in order to try to measure the Voltage Spikes. The Precision MicroDrives Circuit was decided on due to the availability of the components described in their schematic.

    When looking for Back EMF spikes of a motor, information on RPM data can be relayed by the number of voltage spikes per cycle. According to the circuit by Precision MicroDrives the number of spikes seen are double the amount of sectors in the commutator. For example, a four pole motor will see 8 voltage spikes per one full rotation.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/04/BACK-EMF.jpg’ attachment=’160270′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 1 – Precision MicroDrive’s Back EMF Test Circuit
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The Capacitor values weren’t given in the schematic so through trial and error, we ended up using 100uF for C1 and 100uF C2, below are our results.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Initial Testing’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Figure 2 – Scope Outputs

    The spikes were seen at a value of a peak value of 4.3 V when running the motor at full power, although for further testing we have to consider how the fly back diode in our motor driver could possibly reduce this spike, as the noise level would be brought down. This result could leave this method not viable for our project.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Motor Driver’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    When testing the motor initially, it was in a circuit with power directly connected to a voltage supply. This test could not be deemed as realistic to our circuit. When using any micro controller to control a motor, it only outputs current in a range inefficient to drive a dc motor properly. For example the Arduino Leonard has an output current of 40 – 50 mA on its pins. A motor driver is able to take the current from the micro controller and raises it for a larger load.

    The one glaring problem with motor drivers though is that the majority of them have built in fly back diodes. The motor drivers on the 3DoT board also have built in fly back diodes. This could clamp the voltage or possibly even suppress Back EMF to the point it is meaning less. To circumvent this problem, we looked for a motor driver that could let us compare Back EMF with or without a flyback diode.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’L298N’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The motor driver perfect to do a comparison the Back EMF value with and without a flyback diode turned out to be the L298N.

    Figure 3 – The L298N (Photo property of Tronixlabs)

    Unlike other motor drivers, the L298N chip itself does not have internal diodes. Rather, the flyback diodes are smd components on the module.

    Figure 4- Flyback Diodes

    Figure 5 – Wiring Diagram of the L298N Module (Property of Sunfounder.com)

    The L298N itself is a dual full-bridge driver, which is able to provide an output current of 2A when used for DC operations.  As the Polulu motors are able to provide 40 mA at a no load performance, the motor driver should be able to provide a more reliable current to the motor.

    The initial plan to test the module was to see how the value of the Back EMF could be read even with the fly back diodes. Which we discuss here.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’The ADC’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    When the L298N circuit was adapted and tested, the next phase of the project was to provide an analog to digital conversion of the Back EMF values. To properly do this the output voltage of the motor must be in the voltage range close to the adc chip. To perform this a low point for the motor must be run (by setting the motor to as low of a speed as possible in it’s PWM) as well as a high point (the highest speed as possible in the motor’s PWM). To do this a potentiometer is used to act as a variable controller to adjust the speed of the motor.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Conclusion’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    To get a proper Back EMF measurement, the time in between cycles must be extended for as long as a time as possible in order for our ADC to grab a reading. This time is needed to help dissipate any current leftover form that cycle in order to get a more accurate reading of the Back EMF. As load of the motors can change while running the Sojourner due to varying circumstances, we would want the Back EMF to by held constant. An example of this would be a high side event the Sojourner could face. Say the Sojourner’s left rocker bogie is left in air due to a slip and the wheels are left turning. With no load the Sojourner should be able to determine that the wheels are free-spinning and that the power should be diverted to the right rocker bogie. Back EMF should be held at a constant when running the motors at a set speed, as any jumps or changes with that Back EMF could disrupt the sensorless rpm encoding we would be trying to perform.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    References

    Bucccini, Mark. “Easy Cruise Control for Brushed Motors Using BEMF.” E2E, Texas Instruments, 25 Oct. 2013, e2e.ti.com/blogs_/b/industrial_strength/archive/2013/10/25/easy-cruise-control-for-brushed-motors-using-bemf.

    “Back-EMF Motion Feedback.” Acroname, acroname.com/articles/back-emf-motion-feedback.

    “Using DC Motor Commutation Spikes To Measure Motor Speed RPM.” Precision Microdrives, Precision Microdrives, 2AD, www.precisionmicrodrives.com/content/using-dc-motor-commutation-spikes-to-measure-motor-speed-rpm/.

    Sam. “Motor Drivers vs. Motor Controllers – Tutorial.” Core Electronics, 19 Aug. 2019, core-electronics.com.au/tutorials/motor-drivers-vs-motor-controllers.html.
    [/av_textblock]

  • Commutator Noise Experiment

    Commutator Noise Experiment

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Spring 2020

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Commutator Noise Experiment

    Author: David Garcia

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn

     

    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Circuit Background’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Our approach to catching commutator noise sparks was heavily influenced by an application note found on Texas Instruments website, Automotive Brushed-Motor Ripple Counter Reference Design for Sensorless Position Measurement. 

    A big plus to this board is that it works for both forward and reverse without having to worry about rectifying the wave as is a problem with the B-EMF technique.

    Below is a block diagram provided by TI.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Block-Diagram.png’ attachment=’161156′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 1 – Ripple Counting Block Diagram, Texas Instruments  
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The Circuit provided by Texas Instruments also included a very helpful design guide which took some time to wrap our heads around,  given our limited exposure to electronic applications up to this point in our education.

    The circuit diagram we were working with is shown below
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Circuit.png’ attachment=’161157′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 2 – TI Circuit Diagram
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Not shown here are the LDO’s for both a 5 volt and 3.3-volt lines needed to supply power to most of the chips as well as add a bias at certain junctions. This board was designed to work in an automotive environment with voltages ranging from 9 – 18 but the 3Dot board runs a native 3.3 voltage lines from most its chips as well as providing a boost converting to 5 volts if necessary.

    Getting into the operation of this circuit, the first place to start would be the resistor in line with the motor. This Sense Resistor has to be chosen to allow for the largest operating voltage. Based upon the motor we are using we have a stall current of 1.5 A and a no-load current of 100 mA with a max RPM of 220. The current sensing chip chosen has a gain of 50 and is biased via ground and 5-volt reference. The bias places the spikes on the 2.5 voltage DC bias which will be reintroduced at different sections of this analysis. All that allows us to calculate a range for the Resistor we need to use for sensing.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Rs.png’ attachment=’161164′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/BPF.png’ attachment=’161167′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 3 – Band Pass Filter Stage TI
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The output from the current sensing stages is then fed into an active inverting band-pass filter.

    The gain of this stage is determined by the two resistors R1 and R3. The lower cutoff frequency is defined by the C7 and R3 while the upper cutoff is defined by C1 and R1.

    The free spin RPM is 220 at the shaft but we have a gear ratio of 150:1 which will mean we have 150 turns of the smaller extended shaft for every one turn of the top. Since the commutation spikes will be caused by the turning of the driving motor we have to take that into consideration when determining output bandwidth. Finally, we have to remember that we are going to have a certain number of spikes depending on the # poles in the motor itself. Taking a magnet on a string we slowly rotated the motor near the magnet to find out how many times it’s attracted and repulsed. It was a crude method but we are pretty certain we’re dealing with a 2 pole permanent magnet motor.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/BPF-eq.png’ attachment=’161172′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Considering we’re not likely to every reach anything like free spin and that 220 RPM is probably a bit of marketing fluff we can probably stick the same values as used in the TI Circuit.

    After the Band pass filter comes the differential amplification stage. Both inverting and non-inverting inputs are fed from the same source with the bottom leg being slightly phase shifted by the RC filter. This has the effect of mitigating the fairly large time constant of the high pass section of the previous stage while resulting into a clean channel of spikes that can be used for the comparator stage. The comparator stage is actually working with positive feedback to create a hysteresis loop. That is what lets translate the spikes into a clean transitioning rectangle wave. The thresholds are determined by a formula in the design guide as well.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/TI-compare.png’ attachment=’161195′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 4 – TI Comparator Circuit 
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’PCB Design’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The circuit was an application of the ripple counter shown in the TI application note but the form was set to be similar in size the the 3Dot board. This consideration was so an second edition could be easily adapted from the prototype to the shield. Unfortunately, due to expended shipping times are lost time we were unable to have a fulled tested board working. KICAD was used to make this board.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Compare-2.png’ attachment=’161218′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 5 – PCB & 3Dot size comparison 
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The board has plenty of room needed for header pins that would be used in the next generation of a stacked ripply board used for sensor-less RPM readings.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/V1-PCB.png’ attachment=’161225′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 6 – Ripple Counter V01
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Multi.png’ attachment=’161694′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Implementing the circuit in the future could be done by adding a mutliplexer attached to each circuit and sending those signals above to separate board that can be stacked on the motor control board. We then use two signals to control the mutliplexer and the single line to get the frequency coming out of the top board.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Implementation’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Building this circuit turned out to be more difficult than originally predicted. Originally we had planned to use the PCB we ordered from OSh park but the first time soldering it together was a mess and the voltage regulator we placed on the wrong pads. Regardless of what I tried I couldn’t get  the thing de-soldered so we purchased many of the same components.

    While building the second circuit, I  realized the foot print of the comparator was different from the one i had used on the board and we had to abandon using the PCB.

    In order to recover from this we purchased some small boards we could use to mount SMD parts on for bread boarding. This was a task in itself to get the parts soldered onto such a small area. I also found that the labeled footprint for the two op-amps was not correct and had to resort to using general purpose uA741 op-amps I had on hand.
    [/av_textblock]

    [av_horizontal_gallery ids=’161180,161181,161182′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 6 – PCB problems 
    [/av_textblock]

    [av_horizontal_gallery ids=’161184,161185,161186′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 7 – Bread Boarded Comm Noise Circuit
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    In order to get a 3300 pF cap for the band pass filter I had to do some creative soldering. I got a piece of copper clad board and used a drill press with a hole cutter to make  some islands. I was able to solder 3 1000pF caps and a 330pF cap in parallel to get an equivalent capacitor. The one thing to remember is that capacitors in parallel add like resistor in series.
    [/av_textblock]

    [av_horizontal_gallery ids=’161187,161188′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure8 – Makeshift Capacitor
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    In putting this circuit together there was another part that we should pay close attention to. The resistors i had on hand for current sensing are a puny 1/4 W type. My worry is the worst case scenario of close to 6 volts at the motor and pumping 1.5 amps. We’re looking at near 9 Watts of pure circuit crashing, component frying, magic smoke releasing power being hatefully dropped onto my dainty 5 bands. If even 1/36th of that gets spent of my lil’ ol resistors then were looking at melted plastic and broken dreams. It’s advised you get resistors rated far above the nightmare scenario. Of course, these being the times we have, the experiment must proceed  and the power supply must be limited.

    Yet another limitation from a single power supply was the voltage needed to run the chips was different than the voltage needed to run the motor. Since I was using an Arduino to run the experiment anyways, I tried to use the on board 5 volt line to run my chips but once loaded down with the rest of the circuit, the voltage on the rails dropped down to around 3.3. I believe this was the reason most of the circuit was not functioning as cleanly we would have hoped.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Low-Voltage.jpg’ attachment=’161651′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_heading tag=’h2′ padding=’10’ heading=’Software’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    A very simple code was written, mostly to control the L298N used to drive the motor at 6 volts.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Code.png’ attachment=’161228′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Intended Results’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    According to the TI design guide we should expect to see a square wave generated at the output whose frequency is a function of the RPM of the motor in test. We can do some sanity check on the circuit by taking measurements are 2 other keys junctions. First we would want to test the output of the band pass filter. This should show us some ripple with a slow drop off between spikes. This large time constant is what we would expect to see introduced by the 3300pF cap of the band-pass stage. That is displayed by the yellow trace on the waveforms provided in the design guide. The next spot to check would be the output of the differential amplifier stage to make sure we have reduced the time constant distortion. This is the green trace of the provided waveform.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/TI-Scope.png’ attachment=’161191′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 9 – TI Design Guide Scope Outputs
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Conclusion’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    In conclusion, the commutator noise method is a viable way of measuring rpm. The commutator noise is capable of getting readings from the motor going forward and backwards which is an advantage over the back emf method. The commutator noise method was troublesome at first, but we were able to make more progress after finding the texas instruments design guide.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Results’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/150.png’ attachment=’161647′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”][/av_textblock]

    [/av_one_full][av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Square.png’ attachment=’161650′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_heading tag=’h1′ padding=’10’ heading=’References ‘ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    1. Electronic Design; Bob Pease – What’s all this copper clad stuff, anyhow?
    2. Electronics Tutorials – Active Band Pass Filter
    3. Electronics Tutorials – Differential Amplifier
    4. Electronics Tutorials – Operational Amplifier Comparator
    5. Electronics Tutorials – Capacitors in parallel and Parallel
    6. Texas Instruments – Automotive Brushed-Motor Ripple Counter
    7. Texas Instruments – uA741 Operational Amplifier

    [/av_textblock]

  • Commutator Noise Initial Study

    Commutator Noise Initial Study

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Spring 2020

    [/av_textblock]

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Commutator Noise Initial Study

    Author: Robert Pearson

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn

     

    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Commutator Noise’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Some of the risks for this method are if the motor is running constantly, especially for an advanced braking system, a capacitor is usually run across the motor to reduce noise and prevent spikes in the voltage. The spikes can reduce the lifespan of the motor, the sojourner uses fairly small motors so this affect on the motor is fairly small. This would be a bigger issue if we had bigger motors, but even with small motors we still need to consider it.
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    There are two methods to measure these commutator spikes, Ripple Counting and Transient Counting. Both of these methods require knowledge of the number of poles the motor has. Ripple Counting can be done through measuring fluctuation in the current, which is proportional to the magnetic field according to Lenz’s law. Ripple counting is better for a lower number of coils because the ripple has a much stronger effect. Motor speed, temperature, torque, and orientation are all factors for finding these spikes which can make it harder to determine which spikes are due to the external factors creating the excess noise.

    Transient Counting can be found all throughout the power supply wire, which means there is no need for a resistor in series to measure the current which Ripple Counting requires. When the commutator loses contact to the brush there is a voltage spike. The two types of transients are Kick Back Transient and Impedance Transient. For Kick Back Transient the waveform is periodic if the rpm is stable, so one should be able to determine where the brush engages and disengages with the commutator by observing the voltage. Impedance Transient  views the spikes due to the sudden change in impedance when the brush engages and disengages.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Background’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Commutator noise can control speed by looking at spectral components. This method is dependent on a higher amount of inductor coils. Current spectral components are easier to examine due to a larger amplitude in comparison to the DC voltage component. The spectral current can be calculate by (Vcc-Vm)/Rs. Vcc is the ideal voltage source, Vm is the voltage of the motor and Rs is the resistance. Another notion to consider is that to calculate a way to efficiently translate voltage spikes into RPM data is through commutator poles, and at this time Polulu does not document the number of poles in the Micro Gear line of motors.

    There are some risks posed when using commutator noise to measure sensor less encoding. The commutator noise effect is best seen when no diode is used in a circuit to limit voltage spikes. Running the motor with the noise created could possibly shorten the Micro Gear Motor’s lifespan.
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    When looking for a sensorless encoding circuit, we looked for a circuit that would be applicable for a Brushed DC motor. A brushed motor holds a set of magnets. These magnets are of opposite polarity so they are naturally attracted to each other, when powered the motor’s armature is rotated by the magnet’s draw toward each other.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Initial Testing’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    During our research, we came across a design for sensorless encoding  in regards to commutator noise that belongs to Roman Black.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/04/encoder.gif’ attachment=’159035′ attachment_size=’full’ align=’center’ styling=” hover=’av-hover-grow’ link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 1. “Encoder-less Encoder for Small DC Motors” – Designed and Owned by Roman Black
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Roman Black’s circuit was chosen due to the simplicity and availability of parts for initial testing. Further circuits we will discuss require specific SMD components. Roman Black’s circuit also requires no code, thus making it easier to breadboard and grab quick results. Although for our circuit, some adjustments were made.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/02/commutator-noise-ckt.jpg’ attachment=’154486′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 2. Commutator Noise Adapted Circuit Schematic
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Below is the commutator noise circuit we built for initial testing.  In this circuit, R1 scales the ripple voltage and current sensing with a tradeoff for a lackluster motor performance. C1 allows a pulse (on/off) to be passed through the circuit. C2 assists in smoothing the ripple voltage. For our circuit since Roman Black’s circuit was designed for larger motors, we had to experiment to find proper values that show results (voltage spikes). We adapted this circuit for use with Micro Gear motors, so we removed the Diode from the original design, as the diode is meant for use of motors that use 2 Amps or more.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/02/built-ckt.jpg’ attachment=’154492′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 3. Bread Board Commutator Noise Circuit Schematic
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Our results are displayed below. For this setup we used a value of 10K for Resistor 1, C1 had a value of 3.3uF while C2 had a value of 9pF.

    Depending on the duty cycle, we can see the voltage is periodic with its spikes. The voltage peaks when we see that a rotation of the Micro Gear Motor occurs. The voltage spike is dependent on speed, so the higher the peak the greater the speed. This data can be used further into a value for an ADC converter to use. From this we can calculate rpm of our motors.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/02/oscope.jpg’ attachment=’154493′ attachment_size=’full’ align=’center’ styling=” hover=’av-hover-grow’ link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 4. Oscilloscope Results
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Ripple Counting Circuit’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    As we continued our testing of the Commutator Noise Sensorless Encoding method, one thing that we wanted to test would be the ability to control the speed of the motor more efficiently. This method of control would be good for testing our commutator noise circuit with an Arduino Micro controller.

    To experiment with the viability of the Commutator Noise Sensorless Encoding method, we decided to test a PCB designed by Texas Instruments. We decided to change pace as this circuit could possibly reduce the time we spent in the testing phase of our project.  The Texas Instrument’s TIDA-01421 was designed to work with DC Motors that are implemented on retaining memory on distance such as windows, sliding doors and gates. The only downside to testing this circuit is the cost and lead-time on construction. The circuit must be designed to work with a PCB due to parts such as the INA240-Q1  Current Sense Amplifier being only available as SMD components. The TIDA-01421 is able to take in a current and measure it. From this step the signal is then filtered and converted as a 3.3V square wave logic output for a processor to count the position of the motor. Counting of motor’s position can then be adapted to counting the rpm. Figure 5 references these steps through a block diagram.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/04/block-diagram.jpg’ attachment=’159041′ attachment_size=’full’ align=’center’ styling=” hover=’av-hover-grow’ link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 5 TIDA-01421 Block Diagram, Property of Texas Instruments
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Texas Instrument’s TIDA-01421 begins by measuring the motor current that can be found by (Armature Voltage – Back EMF Voltage)/ Armature Resistance. The current sense amplifier can be used for bi-directional current sensing through the use of the full-bridge rectifier. The output of the current sense amplifier is sent to the Band-Pass Filter stage. The filter takes into account the ripple and is able to measure the frequency which can then be relayed into rpm data for the ADC converter to handle. The band-pass filter then removes any extraneous noise from the signal and gives it to a differential amplifier. The differential amplifier then gives the clean signal from a range of 0v – 3.3 v for the comparator to use.

    Further design and testing of the TIDA-01421 can be found here.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Conclusion’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The commutator noise, if setup properly, can provide accurate data through the ripple counting method. This method is applicable for Sojourner’s Brushed DC micro motors, and will be further expanded upon using the design from Texas Instruments.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’References’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    “Using DC Motor Commutation Spikes To Measure Motor Speed RPM.” Precision Microdrives, Precision Microdrives, 2AD, www.precisionmicrodrives.com/content/using-dc-motor-commutation-spikes-to-measure-motor-speed-rpm/.

    Vasquez-Sanchez, Ernesto, and Joseph Sottile. “A Novel Method for Sensorless Speed Detection of Brushed DC Motors.” Applied Sciences, 24 Dec. 2016.

    Nottelmann, Jan B. “Sensor‐Less Rotation Counting in Brush Commutated DC Motors.” IdeAdvance, 2011.

    Acaban, Aldrin, and Maria Canada. “Sensorless Position Control of Brushed DC Motor Using Ripple Counting Technique.” Microchip, 2019.

    Black, Roman. “DC Motor Speed Encoder.” www.RomanBlack.com, April 2001. https://www.romanblack.com/encoder.htm

    https://www.ti.com/tool/TIDA-01421

    www.electrical4u.com
    [/av_textblock]

    [/av_one_full][av_image_hotspot src=’https://www.arxterra.com/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/images/placeholder-full.jpg’ animation=’no-animation’ hotspot_layout=’numbered’ hotspot_tooltip_display=” hotspot_mobile=’true’ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”][/av_image_hotspot]

  • Back EMF Experiment

    Back EMF Experiment

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Generation 4
    Back EMF Experiment

    By: David Garcia

    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Comparing Designs’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    When we started this process, the first useful circuit we found was on a site called precision Microdrives. There was an article detailing gathering back EMF data. This article was very helpful in furthering our understanding of the actual process being used to gather our data. The first problem was in the name of the process when a more accurate description would have been a regenerative mode for RPM estimation.

    The actual description would be more like using the DC motor as a generator off and on rather than to couple the back EMF in some way.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Gen.png’ attachment=’161758′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 1 – Voltage Generation to RPM Theory
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    From this basic understanding of how the testing works, we start to move our way towards a way to capture the data in the RPM. Before we get to coding we ended up first trying to capture a scope picture of the BEMF data and see if we can find a way to deal with both directions of the motor rotating.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Rapid Prototyping’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The first circuit we tried ended up giving us very little and that was likely due to the inability to reliable trigger the BJT.
    [/av_textblock]

    [av_horizontal_gallery ids=’161699,161703′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure # – Precision MicroDrives unidirectional test circuit
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    As we analyzed the circuit it became clear that most of the circuit was simply used to trigger the motor to run and we could replace that with another circuit more easily controllable from an Arduino.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/L298N.png’ attachment=’161704′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 2 – L298N Unsuccessful  Test Circuit
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    This was the second attempt we ended up using for the testing. The L298N module is easily controllable and set up.

    While uncertain why testing across the capacitor in this way didn’t give us anything but noise. We also sometimes ended up with classic damped harmonic waveforms.

    Another Circuit we tried to remove the cap and instead add a resistor in line with the diode and measure cross the resistor. Repeated measurements of the terminals of the L298N and ground showed it was only a few millivolts above ground.

    This circuit still has the disadvantage of not being able to be run in both directions. Any solution implemented would have to be able to be run in both directions if it was going to be of any practical use.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/C3.png’ attachment=’161785′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 3 – L298N Test Circuit
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’A Final Design’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    We didn’t want to have to give up two lines from each motor in order to be able to use this method of encoding. In order to be able to do this, we needed to come up with a solution using a multiplexer and a polling method on the motors to take them individually.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Multi-1.png’ attachment=’161705′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 4 – MUX circuit block Diagram
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    A multiplexer which would work perfectly for the 8 lines we need for the motors and the line out to connect to the rectifier and then the ADC would be CD4051B
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/CD4052B.png’ attachment=’162044′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 5 – TI CD4052B Multiplexer
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    We wanted to make sure we could measure in both directions as the motor was being polled. Rather than use passive components such as a full bridge rectifier we did some research into active rectifier circuits. Northern Illinois University outlined, in a PowerPoint, some very useful resources on active rectifiers.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Ill-Rec.png’ attachment=’161919′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 6 – Full wave Rectifier from University of Illinois
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    We also found an application note from Texas Instruments on making a full wave side input rectifier.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Reftifier.png’ attachment=’161707′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 7 – TI Low Voltage Rectifier
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Iterative Code’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    A finite state machine was designed to deal with the initial spike of voltage after disconnecting voltage from the motor. The motors are controlled via a PWM wave so the sampling has to take place between when the motor is being supplied voltage and prior to the start of the next wave.

    This has to be triggered by an interrupt pin on the falling edge of the PWM wave. The first FSM state deals with the delay. If the delay is not appropriately long then we would take samples of the initial voltage spike and our readings wouldn’t be accurate.

    The second stage is when we would implement a circular buffer and take a running average of the generated voltage which is proportional to the spinning of the motor. Once enough samples are taken we leave the sampling state and head to a state where the speed is updated.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/FSM.png’ attachment=’161697′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 8 – Finite State Machine Diagram 
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/FSM-table.png’ attachment=’161698′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    For testing purposes, the normal stage jumps between printing the RPM value and recalculating the RPM from the buffer. Because serial print takes so much time, separating it from the data collection and delay is the only way to get an accurate value out.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Testing’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Testing-Circuit.png’ attachment=’161735′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 9 – Fritzing Diagram Test Circuit
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    This circuit was used to test in a single direction. The next stage of this testing would be to move to the 3Dot board and write a code using assembly, in order to optimize the delay and sampling.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Results’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Before left campus, we did have some success with the circuit. We would have hoped to have taken more care with our measurements before leaving but we were somewhat set back when leaving. The green signal is the PWM wave that controls the voltage to the motor. You can see the yellow trace suddenly raise as the motor shuts off. We were able to get a similar result from our equipment.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/BackEMF-Feb24-Results.png’ attachment=’161825′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Here you can actually see the spikes that we have to avoid measuring by the software delay shown in the previous finite state machine picture.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/C3-Wave-01.png’ attachment=’161837′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_heading tag=’h1′ padding=’10’ heading=’Results With CE Gain Stage’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The Back EMF signal was approximately 200 mV before amplification, so in order to be picked up by the ADC properly the CE Amplifier was designed and chosen for use. The Common Emitter stage is used for amplification, and as we didn’t have MOSFET BJTs to implement our design in time. We decided to use the 3904 NPN transistor as our tool for amplification. To do this, we amplify Vin. Looking at the LTSpice model Vin goes into base of our Common Emitter Amplifier, the output is taken from our Collector (C1 to R5).
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/CE-gain-Stage.png’ attachment=’163720′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    In our LTSpice model to test our circuit properly, we have made use of a sinusoidal waveform for our input voltage. The CE Amplifier inverts the signal, so if fed into our actual circuit we are to design it would be acceptable. This is because we are already planning on using a full-wave rectifier before taking an ADC reading.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Design Parameters’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_horizontal_gallery ids=’163721,163722,163723,163724,163725′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Vcc was chosen to be 3 in order to center the supply. The wave should center on the supply in order to receive the maximum swing in our amplifier. With the design parameters of Ic=1mA and Vce=1v; we were then able to solve for the resistor values in our amplifier. Once the values were put into LTSpice, we were able to verify the calculations from above to the operating point in the LTSpice model.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/Operating-Point.png’ attachment=’163729′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    With the design parameters established, we were able to produce a working CE gain stage circuit into our Back EMF method. The pictures below show that the operating is biased properly against our simulation. To compare our values in simulation were Vc=2.89 Volts, Vb= 1.69 Volts and Ve=1.04 Volts. Our realistic values were  Vc=2.71 Volts, Vb=1.74 Volts and Ve= 1.11 Volts.
    [/av_textblock]

    [av_horizontal_gallery ids=’163734,163735,163736′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/CE-Built-CKT.jpg’ attachment=’163747′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Above is the built CE circuit use for testing.
    [/av_textblock]

    [av_horizontal_gallery ids=’163750,163751,163752′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The above pictures are placed through the CE Gain Stage, making it easier to send the voltage to an ADC. Before the ADC stage, our voltage value was around 0.2 Volts. The output values of our waveform now have a value of around 1.75 Volts. This gain we saw was a value of 8.75. We took three scope pictures to help see the different speeds of our motor and how the output would look. From left to right we have: 200 PWM, 150 PWM and 100 PWM.

    These scope pictures were also much more well aligned with a major grid line. Previous scope pictures were wildly inconsistent and difficult to interpret. This was a major lesson learned from the past.

    Inclusion of this simple gain stage will make our BEMF output much more readable when heading into an ADC. Further amplification might include using a cascode configuration of biasing the base of our transistor with a specific valued Zener diode being reverse biases. Depending the ease of implementation, an op amp would work to provided a highly tailored gain.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Conclusion’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Although proving to be troublesome in theory at first, the Back EMF method was quite practical for sensorless encoding. The Back EMF method proved to be viable in which code could be planned around the distance and delay between the two spikes after the PWM signal. We were able to test the Back EMF method of sensorless encoding for the motor running forwards, to run it backwards, we would implement a way to know when the voltage hits zero, as this would be a turning point for the voltage running in a negative direction. Since the spikes would be negative, we would need the active full-wave rectifier to solve this problem.
    [/av_textblock]

    [av_heading tag=’h3′ padding=’10’ heading=’References’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [/av_one_full][av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    1. Precision MicroDrives – Measuring RPM from Back EMF
    2. L298N Driver Board
    3. University of Northern Illinois – Wave rectifiers 
    4. Texas Instruments – Single-Supply Low input Voltage Full Wave Rectifier

    [/av_textblock]

  • So You Want to Buy A USB Oscilloscope?

    So You Want to Buy A USB Oscilloscope?

    [av_one_full first min_height=” vertical_alignment=” space=” custom_margin=” margin=’0px’ padding=’0px’ border=” border_color=” radius=’0px’ background_color=” src=” background_position=’top left’ background_repeat=’no-repeat’ animation=” mobile_breaking=” mobile_display=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    Sojourner Generation 4 Spring 2020

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    So You Want to Buy a USB Oscilloscope?

    Author: Robert Pearson

    Verification: Robert Pearson

    Approval: Chris Hirunthanakorn
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ font=’entypo-fontello’ admin_preview_bg=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]

    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Why USB Oscilloscopes?’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    This is a blog post regarding the troubles of looking for an Oscilloscope for home use. Considering the current crisis that forces us to be at home, a USB Osiclloscope is a great alternative to a costly physical device. USB Oscilloscopes also are portable allowing for anywhere to become your personal EE Lab. One of the biggest concerns was purchasing a proper oscilloscope at the right cost that would serve us well. Considering this O-scope is completely digital, there is a trade off. Digital O-Scopes have a Maximally Flat Envelope Delay  that the manufacturer must achieve with their frequency response. If the waveform is not sinusoidal for digital O-Scopes, their can be higher amplitude noise which can lead to a 29% loss. Other trade offs to consider just as any other oscilloscope is the Bandwidth. For digital Oscilloscope by increasing the bandwidth by a factor of 25 MHz, you can see an increase in the cost by about $50.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Application for Sojourner’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Although oscilloscopes and voltage supplies are provided by CSULB throughout the semester, our project came across a major problem of being able to access campus. This issue came from the the stay-at-home order given by the State of California.

    Our project is heavily reliant on the testing phase and rapid prototyping of sensorless encoding circuits. For the Back EMF method, in order to find our proper results, it is necessary to use an oscilloscope. The Back EMF method requires us to view the first two voltage spikes after their rotation. To do this we have to measure the spikes themselves in relation to the motor speed. Another point that we need to consider is the distance of time between these spikes. In order to properly see these values, an oscilloscope is necessary. The same method of analyzing our test circuits would also be necessary to use for the commutator noise method.

    Considering the fact that the cost would be factored into our project mid-semester (post budget proposal), in order to keep our costs down, and to get cheaper as well as faster shipping; it was decided a USB Oscilloscope would be the solution.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/available.jpg’ attachment=’161024′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 1– Available Oscilloscope and Voltage Supply on Campus
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Oscilloscope Background’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    One of the first aspects of an oscilloscope to consider is the amount of channels that can be displayed. Channels in oscilloscopes represent the amount of signals you can be display with a USB Oscilloscope. In a desk model of an oscilloscope, it is common to have two channels. For USB, oscilloscopes some of the cheaper models only use one channel. For the purpose of the Back EMF method, we need to view the motor running in forward and compare it to running in reverse. In order to take a proper value with the ADC, we would need to rectify the voltage output of our sample from the motor running in reverse. To do this properly would require two channels.

    The oscilloscope has a set range based on frequency, this is called the oscilloscope bandwidth. Bandwidth allows us to take in an analog signal into the oscilloscope up to a certain defined frequency. The certain point is defined as the cutoff frequency, and the quality of the signals past this range come out distorted and more thermal noise can be produced. Considering that one of our methods has us focus on the noise of the commutator noise, excess internal noise from exceeding the range of frequencies would put our project at a disadvantage. Although there can be cons to an excessive amount of bandwidth in your oscilloscope. Too much bandwidth can provide you with noise from 0 Hz all the way up to the range of the oscilloscope, so even if your circuit does not have those frequency values, noise from the entire bandwidth would still be present. Our Polulu Motors run at about 20 KHz.

    One final aspect to discuss is the sampling rate. Sampling rate helps give you visual clarity when looking at your waveform. It is best to go with the “5-times rule” which means using an oscilloscope who’s sampling rate is five times the highest frequency of your circuit you are currently testing.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’The Options’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Our original budget for Sojourner was close to $425, considering that we had to buy a Voltage Supply (which cost around $50), one of driving factors for the purchase of the power supply was the cost. Another fact to consider was that the USB Oscilloscope had to be compatible with Linux as well as a Windows 10 Virtual Machine, as the team member who would be working with the oscilloscope only had access to these Operating Systems.

    Option 1

    The Owon V1022I

    Figure 2-Owon VDS1022I

    Analysis:

    Although the rise time of the Owon was pretty low compared to other USB oscilloscopes at a value less than 14ns and a recording of a circuit up to 120 Volts being compatible with the circuit the overall bandwidth of this oscilloscope was deemed to low considering the price of $100. The software that comes with the circuit was also described as not being user friendly, as it was stated to only run exclusively with drop down menus.

    Option 2

    The Hantek IDSO170A

    Figure 3-Hantek IDSO170A

    Analysis:

    The Hantek was built better than alot of other oscilloscopes according to its specs. The rise time on the Hantek was described to be less than 5 ns. It was with the Hantek oscilloscope that we found that increasing the bandwidth by 50 MHz would be a near $100 rise in oscilloscope prices. The Hantek oscilloscope also had an application to run off the Ipad as well. Unfortunately, when trying to order the oscilloscopes it was around early April. The estimated time to ship the Hantek Oscilloscope was April 27th. This was not a viable option, as it did not allow us any time to test any of our circuits.

    Option 3

    The Analog Discovery 2

    Figure 4-Digilent’s Analog Discovery 2

    If cost was not an option, the Analog Discovery 2 would be the definite choice of oscilloscope. While the bandwidth of the Analog Discovery is relatively low for the price (30 MHz), the versatility of this oscilloscope is impressive. The Discovery comes packaged with a logic analyzer as well as programmable power supplies (5 Volt rails). For a student in Electrical Engineering, the Analog Discovery has features that go well beyond circuit and power analysis.
    [/av_textblock]

    [av_hr class=’default’ height=’50’ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=”]

    [av_heading tag=’h1′ padding=’10’ heading=’Implementation’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    While the other options were considered the oscilloscope we decided on was the Perytech DSO-U2200. The Amazon listing can be found here.
    [/av_textblock]

    [av_horizontal_gallery ids=’161037,161038,161040′ height=’25’ size=’large’ links=’active’ lightbox_text=” link_dest=” gap=’large’ active=’enlarge’ initial=” control_layout=’av-control-default’ id=”]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 5-7 – Perytech DSO-U2200
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The Perytech DSO-U2200 was an interesting case. Unlike the Hantek oscilloscope priced at around $160, the Perytech oscilloscope was priced at $110, even though its bandwidth was 60MHz (10 less than the Hantek). The sampling rate of the Perytech oscilloscope has a sampling rate of 240 Ms/s compared to Hantek’s (250 Ms/s). The Perytech seemed to be a budget version of what was offered in the Hantek oscilloscope, although similar to the Analog Discovery, the Perytech also comes packaged in with a Logic Analyzer which adds a second use for the better price.

    What was not considered when buying was the support documentation for the oscilloscopes, which caused us trouble whilst trying to set up the Perytech oscilloscope.
    [/av_textblock]

    [av_heading tag=’h2′ padding=’10’ heading=’Documentation on the Use’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    The manual for the use of a Perytek Oscilloscope can be found here.
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    To power on your Perytech Oscilloscope, it must be connected with a standard USB 2.0 cable to your computer. Once connected a red light for power will turn on.

    The software for the Perytech can either be installed on disc or through their website, a link can be found within the User-Manual given earlier. It is critical that you if you are to use the Oscilloscope feature you install the file listed under DSO_Install_V2.09.exe. If installing from the disc, the Logic Analyzer is mislabeled under the DSO_Install_LV2.09.exe, so it can be pretty easy to mix them up.

    Once launched the Window for the digital oscilloscope is pretty similar to how a regular oscilloscope looks.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/O-Scope_Interface.png’ attachment=’161045′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 8 – Perytech User Interface
    [/av_textblock]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    To use the probes properly the BNC cables must be hooked up properly, such as in Figure 6. Once active, a green light will appear, showing that the signal is triggered. At this point the channels can be enabled by selecting the CH1 and CH2 buttons. CH1 appears in green, while CH2 appears in red. From this point the trigger must be set by going from >slope to: >auto for the automatic wave pattern, >normal for the wave pattern to appear only when triggered, or >single to stop the wave cycle after one trigger.
    [/av_textblock]

    [av_image src=’https://www.arxterra.com/wp-content/uploads/2020/05/backemf-spikes.jpg’ attachment=’161047′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’ admin_preview_bg=”][/av_image]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Figure 9 -Back EMF Generated Voltage (Red)
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’Conclusion’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    Once your triggers are setup, you should be able to properly view your waveform. For the Sojourner project, the Perytech Oscilloscope was critical in finding the delay time of the voltage created due to the back emf. Sojourner’s digital values had to be implemented through carefully observing the time within these delays, as running tests through ADC and trying to guess our way through that would give us inaccurate and insufficient information.
    [/av_textblock]

    [av_heading tag=’h1′ padding=’10’ heading=’References’ color=” style=” custom_font=” size=” subheading_active=” subheading_size=’15’ custom_class=” admin_preview_bg=” av-desktop-hide=” av-medium-hide=” av-small-hide=” av-mini-hide=” av-medium-font-size-title=” av-small-font-size-title=” av-mini-font-size-title=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=”][/av_heading]

    [av_textblock size=” font_color=” color=” av-medium-font-size=” av-small-font-size=” av-mini-font-size=” admin_preview_bg=”]
    https://www.perytech.com/Product/USB-Oscilloscope/Doc/DSO%20Manual-En.pdf
    [/av_textblock]

    [/av_one_full]