Hybrid Disk Encoder: A lasercut Analog / Quadrature encoder with more than 1 MILLION CPR
Switch branches/tags
Nothing to show
Clone or download
JamesNewton Start PWM 1 (sin). Outputs are currently P1.6 (onboard LED) and P2.6
Remove OpAmps from ADC 2 and 3 inputs. For some reason, they do not allow any input to pass through. Inputs now P2.2 ADC2 sin and P2.3 ADC3 cos

Also collect ADC 0 and 1 inputs for debugging
Latest commit 496c8d7 Dec 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Add files via upload Dec 5, 2018
firmware Start PWM 1 (sin). Outputs are currently P1.6 (onboard LED) and P2.6 Dec 15, 2018
.gitignore Initial commit Dec 14, 2018
README.md Update todo list Dec 14, 2018
encoderdisk.jscad

README.md

Hybrid Disk Encoder

This encoder is based on the Haddington Dynamic Analog / Digital Hybrid encoders used on the Dexter robot arm:
https://github.com/HaddingtonDynamics/Dexter/wiki/Encoders
Please take a moment to read and understand that revolutionary system before continuing here; many of the goals of this project won't make sense with out understanding it.

Laser cut: Instead of using 3D printed disks, this project will focus on laser cut parts. As laser cutters become more available and lower cost, their greater resolution and the simplicity of not supporting 3 dimisional objects may provide a cleaner signal and easy processing.

Firmware only, no FPGA required: Because the primary goal of this project is to enable a very low cost human input device, it will not depend on FPGA speed, as humans don't move that fast, and have builtin motion control systems that avoid the need for a high speed feedback loop.

OpenJSCAD: In keeping with the focus on Javascript in DDE (the Dexter IDE), node.js processing for remote control, and an upcoming Robotics class, this project uses
http://OpenJSCAD.com
as the CAD system of choice. This is unusual and may deter collaboration (hopefully not) but if you look at the code for a while, it becomes obvious that it just isn't that different from a regular cad system. The CAD system can be viewed and played with at:
https://openjscad.org/#https://raw.githubusercontent.com/JamesNewton/HybridDiskEncoder/master/encoderdisk.jscad
Use the mouse to turn the model (shift to shift, ctrl or scroll to zoom), scroll through the code on the right, and edit parameters in the control block lower left. Switch from "Assembly" to "Parts" (bottom control block) to generate DXF or SVG output for cutting.

Electronics At this point, we are focused on the Cypress PSoC 4 chips for the processor, with only opto sensors, and LEDs, (and USB serial interface).
http://www.cypress.com/part/cy8c4247azi-m485
This gives us:

  • 8 channel, 12 bit ADC 1-Msps,
  • programmable analog front end (no need for external opamps),
  • PWM output to adjust emmiter brightness (no need for manual adjust),
  • 128K FLASH, 16K RAM, 48 Mhz, 32 bit ARM Cortex-M0.

And if we want to include support for high speed slot counting in the future: 48 macrocells for some FPGA ability.

It is featured in this development system:
http://www.cypress.com/documentation/development-kitsboards/cy8ckit-043-psoc-4-m-series-prototyping-kit $10 WITH a debugger! The importance of a good debugger can not be overstated.

The IDE includes schematic capture FPGA designer, etc... But it is Windows only IDE. However it is open source and has been built on Linux
https://hackaday.io/project/18590-psoc-on-linux
https://github.com/clementleger/cypress_linux_tools

And can apparently be run under wine
https://appdb.winehq.org/objectManager.php?sClass=application&iId=16168

Layers
Encoder center hub layers:

  • base,
  • washer,
  • opaque disk support and code disk,
  • moving arm,
  • washer,
  • top support arm.

At edge:

  • emitter mount, (below base)
  • base w/ holes for M3 screws and emitters,
  • riser x2,
  • opaque mask,
  • detector mount,
  • top support arm (w/holes for detectors).

Building the Firmware

IDE: To start with the cy8ckit-043, you want this link:
http://www.cypress.com/file/199476
for both the Creator IDE and the support files for that hardware.

Questions:

Detector to support mount should be adjustable? Or will laser cut and assembly be accurate enough?

Status:

  • Done: CAD encoder, (some disks have been lasercut and appear to work well.)
  • Done: Order parts for electronics
  • Done: Order thin (1 or 2mm) acrylic and black / opaque cardstock. 110lb Cardstock with 3mm Acrylic seems to work
  • Done: Lasercut parts for test assembly, update CAD as needed
  • Done(ish): Write test firmware for A2D feedback to PC.
  • TODO: Connect LEDs / Sensors to dev board, test and update design
  • Done: Calculate ATAN2 on board and return degrees
  • TODO: Count slots with the hardware and combine with ATAN2 degrees
  • TODO: Add AGC (Automatic Gain Control) to update onboard opamp gain.
  • TODO: Produce and assemble multiple joints into a non-driven arm with the same physical characteristics as Dexter
  • TODO: Add DDE support for serial connected device as an input only Dexter
  • TODO: Count pulses with on board digital logic for high speed operation?
  • TODO: Develop cycloidal drive and add motor / drive support?