Skip to content

ENG 01 building

Hien TRAN-QUANG edited this page May 10, 2019 · 3 revisions

Building the RpiRoadbook

Component parts

To build your own RpiRoadbook, you will need:

  1. A Raspberry Pi Zero WH (wifi with GPIO adapter 2x20 pins already soldered):  

Or a raspberry PI zero W and the GPIO soldering adapters apart: [/images/adaptateur-gpio-2x20-male-pour-pi-zero.jpg|connecteurs à souder]]

  1. Adafruit Perma Proto Bonnet to weld and cleanly connect resistors and wires. The advantage is that you can also quickly disassemble the RpiZero without having to unsolder. It's 8 € more for our project, but I find it cleaner.

There are already double-sided tracks on the protobonnet. Access to the GPIO is thus facilitated: in the first photo, from the top, there are the 2 rows of the GPIO connector (2 rows of 20 pins), then remote tabs (from left to right: SDA, SCL, TXD, RXD, GPIO4, GPIO17, GPIO18, etc.). Below, we have in the center 19 rows of 3 tabs connected to each other to put our resistance, links with the buttons, etc. Then a small track connected to the 5V on the left (8 pellets with the red marking between them) and a large track connected to the 3.3V on the right (13 pellets). Then 21 pellets connected to the ground (GND). Finally new rows of 3 connected lozenges. On the left and on the right we have independent pellets, which I do not use. One can weld on one side or the other of the wafer, the pellets are communicating through the hole.

  1. 6 resistors 10kOhms (in 4 bands as below, it is brown / black / orange / gold, in 5 bands, it is brown / black / black / red / gold) for the pull-up of the entries: 1 for the wheel sensor and 1 for each of the 5 buttons on the remote control

  2. A DS3231 RTC clock (better accuracy than the DS1307):

  3. A 5-pin male adapter for connecting the clock to the protobonnet: simply cut 5 pins on a 20 bar.

  4. A 12V-5V 3A step down converter: Red = 12V input, yellow = 5V output, Black = ground.

  1. 24AWG type wire to make connections and wires to the connectors

  2. Connectors for the remote control and the wheel sensor: I let you choose according to your needs. Personally, I took JWPF 2 and 4-pole JSTs to connect to the sensor and the Trailtech remote I already had, but theu are quite expensive.

Or superseal 2 and 3 poles for the power supply and remote control of Roadbook:

Otherwise, there are also these connectors for led strips, from 2 to 5 poles, waterproof and cheap:

  1. For the roadbook remote control, I took this switch (momentary) / OFF / (Momentary): APEM 637H

I associate with the Trailtech remote control:

Other possibility, the Chinese remote control:

But you have to change the 3 middle buttons by 3 momentary buttons you have to purchase.

  1. For the wheel sensor, I already had a Trailtech sensor. You can put a passive Koso. It should even work with the Decathlon bike wire counter at € 10, provided you stick a magnet (neodymium for example) and place the sensor (check waterproof)

  2. A 7 inch HDMI touch screen. I use a very bright New Haven screen (Ref NHD-7.0-HDMI-N-RSXN-CTU) I used this one for the prototype (Adafruit backpack 7inch with touchscreen):

  3. An HDMI 90° cable to straight mini HDMI (C1-A2 model to be checked depending on the screen and the cable supplier), a 90° micro-usb cable and a short OTG micro-usb to connect and power the display:

  4. A DC Jack power connector for the New Haven display, or USB cords for the Adafruit

  5. Soldering equipment, time and patience.

Soldering

If you chose the RpiZeroW with the GPIO adapter apart, we will start soldering it. I do not give you the image of the RpiZeroWH already mounted.

Then we will set the protobonnet. To make space, do not starting with the protobonnet's female connector like I did. It is better to first implement the components and finish with the connector.

Let's start with the wheel sensor. As a reminder, each GPIO entry of the Raspberry Pi is mounted in a pull-up config:

We will therefore position a resistor and the wire between the GPIO17 port and the sensor cable. Here is the diagram:

In this drawing, the 10kOhm resistor appears above the plate. In reality, for the setup, I implanted it vertically, below the protobonnet. It will be "layered" between the cap and the Raspberry Pi. Moreover, I shift it to the right, to prevent the resistance being above the processor (the black rectangle on the PiZero). You never know the operating temperature. And so on for the connection wires to the speed sensor, I preferred to put them from below (welding above). They come out of the sandwich to the right. I get a thiner final assembly.

In the same way, we will connect the buttons of the remote control with a pull resistance, on GPIO 27,22,23,24 and 25 (respectively left, ok, right of the Trailtech, and up, down of the roadbook). Here is the wiring diagram for the first button (left button, GPIO27):

Just repeat for the other inputs / buttons. For the RTC clock, without protobonnet, it is thus connected to the pins 1,3,5,7 and 9 (or clearly on the interface i2c: 3,3V / SDA / SCL / Unused / GND):

As we will have the protobonnet on the Rpi, we will have to deport and position it in relation to our stack. I'm going to put it upside down, with the button cell part coming out of RpiZero. The pin on the left is on the right and vice versa. And we position everything to avoid the HDMI connector and the micro-usb. The male 5-pin connector is soldered downwards (solder on top) and the connecting wires in reverse order.

Here is the connection diagram:

Look at the finished montage below to see how I got the clock on the protobonnet.

Now we can connect the power source: the 12-5V DC-DC converter. Just solder the 5V and GND (on the left in the diagram above) yellow and black from the converter.

Finally, the 2x20 GPIO female connector of the protobonnet can be soldered.

The complete diagram (with a single ground for the Chinese remote control, otherwise separate into 3 and 2 buttons each with a ground for the Trailtech version + separate roadbook). I left the drawing for the PWM brightness, but after test, I always use the screen at its maximum brightness so this cable is no longer needed:

The final product

Bottom view (the middle of the sandwich), with all the GPIO input resistors, before wiring the clock, converter and brightness connections:

Top view (idem, before clock, converter and brightness connection wiring):

The stack, to validate the position of the RTC clock and to estimate the height of the setup:

In the case: we see the RTC clock that sticks out the stack, the red and blue wires go to screen for brightness adjustment. The power supply "comes" from the left, the buttons and sensor "come" on the right. I also added a main switch before the converter. The fuse is on the beam, under the saddle.

The prototype RpiRoadbook complete with the screen, integrated in a lunchbox found in Auchan (6 €):