• Summer update

    Martin Cejp08/07/2022 at 10:01 0 comments

    It's well-known that PLA is not a good material for withstanding direct sunlight... but just in case you needed proof, this is the result of a single afternoon of exposure:


  • Now with its own PCB

    Martin Cejp05/10/2022 at 19:36 0 comments

    Some months have passed since the last update, but I have not been idle. I was contacted by PCBWay with an offer of producing a circuit board for the project, free of charge. A custom PCB had been on the roadmap for a while, but this offer gave the necessary push to get it finished.

    Using KiCad 6, I designed a 6x6 cm, 2 layer PCB. It hosts the Arduino Connect RP2040 module, connections and power switches for accessories (1x MOSFET, 1x relay). I decided to experiment with connectors a bit, and opted for a combination of 2.54mm pitch screw terminals (smaller than you imagine!) and JST PH 2mm connectors.

    PCBWay didn't let me down and within a week of submitting the design files, I had the boards in my hand. They came packed pretty well, sealed in bubble wrap and padded with a soft foam inside a small box.

    It was not the first time I've had custom boards made, but the Christmas-y feeling of seeing your creation become real is still there. The boards had been made precisely with no visible quality issues.

    Nevertheless, there was a problem. Taking some measurements, I discovered a short between the +3v3 and GND nets. On the PCBWay website it is possible to re-download the Gerber files used for manufacturing (I had used PCBWay's one-click export plugin, so I had not actually submitted these files myself)

    And indeed, therein was the problem:

    It is clear the ground polygon fill was not reflowed after the last movement of this capacitor. I was pretty sure that my DRC was clean at time of submitting the design, so I wanted to blame the export plugin. However, I was not able to reproduce the error when consciously trying, so I cannot say anything with certainty.

    In any case, the problem was solved quite easily with a few strokes of a knife. I did not encounter any further issues during assembly or bring up, and soon enough the new board found its home in the 3D printed enclosure.

    I have also re-done some of the internal wiring in a neater way. My only regret is not getting an orange wire to fit with the color scheme of the project!

  • v2 housing & wiring

    Martin Cejp01/30/2022 at 19:04 0 comments

    After nearly 200 km with the initial version, the time has come for a redesign.
    The main control unit is now housed in a 3D-printed case.
    The Raspberry Pi Zero has been swapped for an Arduino RP2040 Connect. Same MCU, but can be powered directly from higher voltage (9 V at the moment, but a 2S Li-Po would work as well), and comes with some very interesting on-board peripherals. To facilitate experimentation and iteration, the internal electronics are mounted on a proto-board which has a grid of copper pads on the back side.

    The OLED display is no longer inseparable from the wiring harness; it can now be disconnected to take everything apart more easily.

    The wiring harness fans out into 3 branches: rear light, wheel speed sensor, OLED display.

    It is clear from the picture that the new housing is rather oversized. This is not a mistake, but rather a "conservative approach". In the next phase of the project, I would like to design a custom PCB for the control unit, and shrink the enclosure accordingly.

  • Some overdue upgrades

    Martin Cejp11/25/2021 at 22:45 0 comments

    In the initial prototype, the bare reed switch (its enclosure being made of glass!) was just taped to the frame next to where the magnet passes; fortunately there was not much rain or mud, since this 'solution' would have fallen apart pretty fast. The switch was soldered directly to the cable harness, with no possibility of disconnection. This is now history.

    I am now using a factory-sealed sensor and I crimped an IP67-compliant connector to ease maintenance.

    (Disclaimer: this project is not being sponsored by EDAC in any way :)The mounting of the sensor has also been greatly improved. A 3D-printed spacer now delimits the position of the sensor with respect to the bicycle frame. In retrospect, a rigid spacer was not a very good engineering solution, because it does not provide flexibility in fine-tuning the sensor head positioning at mounting time. But, for the time being, it will do.
    More news coming soon!

  • Connectors!

    Martin Cejp11/18/2021 at 21:16 0 comments

    While the initial cardboard-box prototype has been quite a success, clearly for long-term reliability, waterproof enclosures and connections will be required. I have ordered samples of several connectors to evaluate their fitness for this project.

    To connect the reed switch sensor, I decided to try out the EDAC 560. Rated IP67, this should provide more than sufficient protection from the environment -- assuming correct crimping. These are only available in a wire-to-wire variant, and they have a disadvantage: it is not really possible to apply strain relief for the individual wires near the connector.

    The second sample is the Weipu SP13, a wire-to-wire, soldered variant. Its clones are abundant on sites such as Aliexpress, but I decided to try the original due to its good availability. This is a 4-pin version, which I wanted to use for connecting the front I2C bus (which carries the OLED screen and, in the future, buttons via a port expander). It feels very well-made, however, as expected, it is quite large, so I will not use it at the moment. Instead, I will try to get my hands on a pair of Weipu's miniature SA6 series (these are 6mm aluminium connectors)

    Finally, a pair of 14-pin TE AMPSEAL connectors (1-776262-1 + 776273-1). And boy, are they massive. A wire-to-panel combination, these were candidates for the connection between the "ECU" and the cable harness, but I think I will instead go for the more compact SP21 (21mm round plastic connector). I will need about 10 pins for version 2 of the project, so the AMPSEAL would be an unnecessary overkill (the only smaller variant is 8 pins).

  • OLED housing print #1 -- review

    Martin Cejp10/16/2021 at 13:24 0 comments

    Printed with Prusa i3 MK3, eSUN PLA+ Filament 1.75mm, 0.2mm layer thickness.

    • LCD opening should be a bit larger (~0.5 mm each side) to accommodate viewing angles; probably should be chamfered as well
    • interior slightly too small (~0.5 mm in each axis), making the PCB rotate a bit
    • opening for connector should be 1.6 mm to match PCB thickness (instead of 1.0 mm)
    • opening for connector could be ~1 mm narrower
    • 2.0 mm thickness should be enough for walls (instead of 2.5 mm)
    • apparently STL was in millimeters. mistake in export from Blender?
    • next prototype should incorporate holes for screwing the PCB in
    • thanks, Nuno!