2019-09-29

2019-09-29 Seeker Of Ways-B Test DC Motors

>>>Seeker Of Ways B: Test DC Motors<<<



 1Seeker Of Ways-B Test Motors

With the Regulator, Microcontroller and Raspberry of Seeker Of Ways-B operational the next step is to test the DC Motors.
The H-Bridge used by the board is a BD62321, an integrated full half bridge that handles up to 3A with a PWM frequency up to 100KHz. Perfect for small DC motors like the ones installed in Seeker Of Ways-B



2Wiring

Upgrade the wiring of Seeker Of Ways-B


2.1Motor Wirings

The motors installed have been through a lot and the wires are worn out and the colors made no sense.

The wires of the motors have been replaced.
  • Thicker red and black wires for the actual windings
  • 4x2.54mm female connector for the integrated encoder

2.2Cable Management

Routing of wires on the platform. use zipties to hold the wires in place. Label the wires based on the motor (Left/Right)




3Test Power

A power test was conducted and failed. The regulator died again for unknown reasons.
This PCB is too compromised so the on board regulator has been replaced by a few switching regulator modules I had laying around. The regulator was due to a redesign anyway for the next platform.

With the regulator replaced, everything was working again thanks to the embedded protections inside the RPI Hat.

4PWM Test

With power sorted out, next step was to write a test firmware and test both motors in both directions with a soft bidirectional PWM ramp.

4.1Firmware

The AT644 is capable of generating a phase corrected PWM signal at about 39KHz, well above ultrasound, ensuring a silent operation of the motors.

This program uses the Timer0 to schedule both the led blinking and the update of the PWM signal.
Timer1 and Timer2 are used to generate a two slope, eight bit, 39.06KHz PWM signal on two channels, connected to the H-Bridges.

A general I/O is used to connect or remove the H-Bridges from power.


The full firmware can be found in this GitHub Repository
>>>Firmware GitHub Repository<<<

The test failed failed for the right motor counter-clockwise direction. The problem was a cold solder on a protection resistor that was easily fixed.

With the cold solder taken care of, both motors run in both directions safely.




5Conclusions

The H-Bridges work as intended.
Next steps are:
  • Acquisition of two quadrature encoders
  • Speed PID control
  • Control from UART from the Raspberry Pi

2019-09-22

2019-09-22 Seeker Of Ways B: Raspberry Pi Hat Disaster Fix

1Raspberry Pi Hat Disaster Fix

PROBLEM: During testing, it became obvious that the onboard regulators of the custom Raspberry Pi Hat meant as upgrade for Seeker Of Ways B weren't working at all, having an output voltage ranging from 3V to 15V





2Problem: Flux

After much debugging, it turns out the problem was the new flux I used during soldering. MB. I didn't check the washability when I bought it. This new flux is harder to wash, leaving residues that unbalance slightly the value of components.

Debugging the issue was a nightmare, in the end I had to desolder, clean up the residue underneath and resolder pretty much every component on the board. If it wasn't for the good quality of PCB from Eurocircuit, I probably would have had to replace the whole board.

2.1Voltage Divider

The parasitic current caused by the flux was minor: on the order of 10 to 100uA. Such a current isn't a catastrophic problem in the majority of components, except where the exact values of components are needed. Aka the feedback voltage divider for the switching and the linear regulators.

After cleaning and resoldering the components, the onboard regulators were finally operating as intended with the SEPIC regulator generating 5.8V and the LDO generating a clean 5.0V for the Raspberry Pi and other 5V components on the board.

2.2Reset

With the board assembled, it was finally time to test the microcontroller. It didn't work.
This was a problem identified by previous tests and was caused by the transistor that allows the RPI to reset the microcontroller non doing its job and keeping the reset line asserted to 0V.

Solution was simply to replace the original IRLML2803 with a 2N7002.
With the reset line reading the correct 5V in the default condition, the programmer was able to correctly read the signature of the device and the status of the fuses.


2.3Crystal Oscillator

More problems with the microcontroller: device signature and basic programming went on without an hitch, but the device failed on programming larger binaries and became bricked after changing the clock from the internal 8MHz RC oscillator to the external 20MHz crystal.

Replacing he crystal didn't help. Replacing the microcontroller didn't help.
Injecting a 2.5MHz clock from a donor source was enough to bring the microcontroller back to life, restricting the problem to the crystal itself.

More through testing with an oscilloscope revealed that it was the crystal failing to start up. This usually happens when the capacitors are too big. I tried simply removing the capacitors altogether to rely on the parasitic capacitance to make the crystal work: success!



3Test Firmware

With the electronics apparently in working order, I made a small led blink program to test the microcontroller and programming. Success!

>>>Firmware<<<


4Test Raspberry Pi

Next step was to test whatever the hat was able to dock and power the Raspberry Pi and whatever the RPI and the custom OS image worked properly.
The power test went on without an hitch.

The same OS image that powers Maze Runner was flashed on an SD card and used to boot SoW-B taking care of moving the IP address from 192.168.0.202 to 192.168.1.203. Remote access to the raspberry pi via ethernet works like a charm. Success!


5Conclusions

The custom Raspberry Pi Hat looks like a disaster field after all the debug, the desolder and the resolder of the components.
This is not a problem for Seeker Of Ways B, since this board was always meant to root out all issues for the redesign of the next revision of the board planned for OrangeBot and the PiWars 2020.

6Follow Up

With the mechanical and electronic side of SoW-B sorted out, the next steps are:
  1. Add DC Motor+Encoder support to the firmware inside the At644
  2. Add Raspicam video streaming support to the NODE.JS streaming server running inside the Raspberry Pi
  3. Add access point functionality to the Raspberry Pi so that the robot can be controlled via Wi-Fi
This version of the RPI Hat is much closer to the version that might take part in the Pi Wars 2020 featuring two DC motors with encoders instead of servomotors.
A major difference is that the Pi Wars RPI Hat will run on the AT4809, the newest revision of the AT line of microcontrollers. Effort will be required to port the firmware to the new hardware.


2019-09-15

2019-09-15 Garage Door Fail

1Garage Door Fail

The automated garage door recently had an intermittent failure: Sometimes, it would not close all the way.




2Fix

Several steps were taken to identify the problem and fix it


2.1Clean Up Gears

A through clean of the rails was conducted to no avail.
A more through clean up of the internal gear mechanism was conducted to no avail.


2.2Check Open/close switch

A close check of the board and photodetectors was conducted to no avail.
A close check of the open close switches was conducted to no avail.


2.3Check Trimmers

The problem was transiently solved after modifying the trimmer settings of the motor strength.
This indicates that the problem maybe was just a failing trimmer.
Trimmers were extracted from a random donor board and implanted on the garage door controller board.

NOTE: Original trimmers were 4.7KOhm. One of the trimmer is now 10KOhm, but it shouldn't make much of a difference.

3Manual

For reference this is the manual page for the settings of the trimmers and the dip switch


4Conclusions

The problem was apparently solved by replacing the faulty trimmers. Since the problem was transiently solved before for a short time, an observation period will begin to see if the problem reappears or if it has been solved for good.
NOTE: The board has resin of terrible quality that degrades badly after soldering.











2019-09-11

2019-09-11 Robot Platforms Performance Details

>>>Robot Platforms Performance Details<<<

Brief description and detailed performance of the robotic platforms built over time

2019-09-11 Online Robot Performance Calculator by FOM

>>>Online Robot Performance Calculator by FOM<<<

This tool is meant to make it easier to chooce components for a robotic platform and is designed to quickly assess the performance of a platform based on the specifications of the motor, wheel and battery combination.