Scooter Speedometer

Or, perhaps the most whimsical thing I have made since the Covid Hat.  Although that may be debatable.

Bits needed

And some way to hook them all up.

Getting Ready


(Image credit: Tom's Hardware)

Click on “micropython-ssd1306” in the returned results and then click on Install. This will copy the library to a folder, lib on the Pico.

Wiring


 Reality part 1


Reality Part 2


Wire Wrapped

Software

Building the large characters

  1. Pick a monospaced sans serif font and increase the font size to a suitable  sized font
  2. Type 0-9 and a decimal
  3. Take a screen shot
  4. Use the Gimp to carve out the characters to 11 separate images
  5. Convert each character by running each of the 11 images through img2bytearray.py (https://github.com/novaspirit/img2bytearray)
  6. Copy and paste the byte arrays into the source code.

Calculate the speed

Code


Prototype 1


Everything in famous zip lock bag


One magnet

Prototype 2

How to build a box.

https://www.thingiverse.com/thing:2594893
Box template

// General Settings
comp_size_deep = 43; // Depth of compartments
comp_size_x = 65;        // Size of compartments, X
comp_size_y = 45;        // Size of compartments, Y
wall = 2.5;                 // Width of wall, see `internal_wall` below for alternate inner wall size.
repeat_x = 1;           // Number of compartments, X
repeat_y = 1;           // Number of compartments, Y
tolerance=.15;      // Tolerance around lid.  If it's too tight, increase this. If it's too loose, decrease it.

// Box Rounding
box_corner_radius=0; // Add a rounding affect to the corners of the box. Anything over `wall` will cause structure and lid problems.
internal_corner_radius=0; // Add a rounding affect to the inside.
mesh_corner_radius=0; // Leave a radius around each corner of the mesh. May hep with bridges.
corner_fn=30;

OpenSCAD


https://ultimaker.com/software/ultimaker-cura/

Ultimaker Cura  - slice the drawing to 3d printer layers


Assembly - notice the zap straps on the bottom. 
Especially the one pushing the BOOTSEL button.
This took us a while to figure out.


All together with the zap strap moved to not push the BOOTSEL button.


With the cover installed.  You will note that there are two ways to install the box.  Facing back (correct) and facing forward (wrong). We of course first installed incorrectly.  But actually we didn't because the steering will turn 180 degrees - and it was.  So we fixed it incorrectly.
Finally we had a coffee and then zap strapped it on correctly. Only two zap straps were sacrificed.











There are now 4 magnets and less electricians tape.


The hall sensor has been glued on in a holder.


Prototype 3

References

Raspberry Pi Pico Pinout

Hall effect sensor  A3144 pinout

  Note that for the scooter (Pico) the pullup resistor is connected to 3.3V.  This makes the sensor 3.3V friendly for the Pico

Links and thanks

A lot of thanks to Suzanne who helped with the mechanical and soldering.  She thinks in 3D.  I'm still working on plan view.

How to make the oled display work

Large characters