Smart Bike Seat

13. Final Project

The summary of the project can be found here:

This project was born after a couple of observations:

All these observations all together made me decide that I wanted to do something to solve this situation: to make a smart bike seat that could: After some web searches,

I finally thought that I would design from scratch my own bike seat and try to integrate it to my current bike. The following sections describe the system overall and the detailed process of the different steps (bike seat support creation, electronics design, electronics production, 3D printing...). But before starting I wanted to send a huge thank you to Dan Chen, who really helped me a lot !

a. System

A first sketch was helpful to visualize what I wanted to do, with the different components.

The following components were envisonned:

On the previous picture, we can see the different components before integration. From left to right: LED and LED support for the rear side, electronic board, Velcro to attach the board to the seat, batteries, cast seat with metallic rails as interface, pressure snensors (capacitive Tx/Rx and homemade resistive sensor), comfortable layer, bike seat heater, fabric layer and front light with light holder. The total cost of the board was approximatively $100, and could be splited between the different components:

Finally, the different processes used were:

The following sections goe in more details about the different processes involved in this project

b. Bike seat production

I wanted and needed to replace my old bike seat that was falling apart and create a new seat.

The first challenge of this part was to produce a comfortable and useable seat that was also a good interface with the bike. I studied some existing design and as well as my former interface and I saw that I wanted to reuse the metallic rails that were still rusted but in good conditions:

The different options for interface were:

For time (molding and casting was faster because I already had a design file and a mold), robustness (bolted composite would have been to brittle) and complexity (welding was to complex and MDF was not fancy enough), the option that was chosen was the Plastic urethane option. It is not the most robust one because the plastic cast might not be stromg enough to support a human weight but it was the most feasible one. It turned out that this solution was actually strong enough because of the shape of the metallic bars.

I thus decided to produce two layers: one comfortable and one hard that would be the interface with the bike. The description of the comfortable layer is describe in more details in the Molding and Casting page. The process was basically to design the a mold in Rhino using an existing 3D model in Solidworks of a bike seat that was adapted to my bike, and after having milled the mold in MDF, I cast the rubber urethane (or OOMOO) in the mold and I had the comfortable layer:

For the solid layer, I had to modify the original Rhino file used for the OOMOO layer and change the size to have a good 1 sided mold for the solid part. I would then incorporate the metallic bars to the mold on the top. I thus needed a resized bottom of the mold. I figured out that I could also simply resuse the OOMOO layer as a mold in addition to the MDF mold. The process was first to clean the metallic bars:

Then to prepare the urethane plastic liquid by mixing the two components (A and B) and then the color additive to have a black seat:

I then waited overnight that the mold was solid:

After decasting the solid layer I could see that it was a solid part and integrated well the metallic bars. It was not sure if it would be perfectly solid, especially since the metallic bars in the front did not have a lot of plastic covering them and thus sustaining the weight.

Finally, I had the 2 layers I wanted through this process.

The last layer I added was a fabric layer (I replaced the lether layer seen in the picture) to cover the heater and the comfortable layer and give a better rendering. For that process, I saw the fabric layer to the OOMOO layer using a strong string.

The integrate OOMOO+heater+fabric layer is as follows:

c. Light holders

For the light holder, a requirement was that it could be directly integrated to the bike and would be difficult to remove to avoid being stolen. I thus chose to use a 3D printed holder. After having selected the LED I wanted to use (I actually changed the type of LED I used after), I took the right measurement to make the design using Antimony.

I then combined my own design with Antimony (see file here),

with an existing design of interface with a bike handle that I could find on Thingverse, here,

that would allow to use some permanent attachments to the bike to prevent the lights to be stolen. It was a combination of a simple and desired design

The 3D print was actually not perfectly successful for different reasons: first, Antimony did not have units and thus, the arbitrary units I chose were a little off, especially, in the design the thickness of the "tube" was to thin to be printed properly. Another reason was also that I used a configurated Makerbot software that was configurated for a 2-head printer and was planning in the default settings to print the support (needed for the interface with the handle that was "floating in the air") with the second head while the first head was printing the actual object. The result was thus the following:

Even though the design was not perfect, I tested it with the actual LED:

This design was successful. At the end I reprinted the light with a thicker tube but I still had the issue of the support (it is only after that I realised that I was off for the support), but in the same time I also decided to use different LED that I have that I found were brigher. At the end, the design was as follows

d. Electronics Design and Production

This part was probably the part of the project that asked the most iterations and where I maybe struggled the most. First, I tried to be inspired from the previous board designs. I used the input devices boards: temperature, light and step response, as well as the output like the DC motor one. To summarize, the different parts of the board were:

The following pictures shows the design in Eagle:

First board designed with some different sub-function:

But the actually sinplified design was this following one (without the mistake made on the MOSFETs (see after) and on the Voltage regulator and the FTDI VCC).

The mistake I made with the MOSFET was to invert the direction of sourcing and draining. Originally, I thought I should plug them like this:

But I should have actually done like that

Thus the following pictures show the components used in the different version of the boards milled

Finally, the following picture shows the different iterations in the board and how, with experience, I used less 0k Ohm jumpers and I could reduce the size of the board

The following pictures show the integration of the board to the saddle with Velcro, and with the batteries

e. Sensors choice

A lot of iterations have been made on the sensor choice, especially to sense the pressure. I tried different types of step response sensor, something relying on the loading model, sometime relying on the Tx/Rx model where I would have the Tx electrode outside englobing the Rx electrode inside a sandwich made of the Tx electrode and foam. I used different material

The video shows the different behavior of the capacitive pressure sensor. I tested them with my hand and I noticed that when I used some non skin material, their behavior was much more altered and less sensitive and I needed to use more programming to actually sense the pressure (the change in step response due to the "loading" of the homemade capacitor). I actually decided to use a resistive pressure sensor that we are developing in my lab:

More description can be found in the input page. Those sensors worked very well and I wanted to combine the two sensors: Tx/Rx and resistive pressure sensor in the saddle to sense pressure and actually see their difference in terms of sensitivity and efficiency (the resistive sensor were small so needed to be distributed in the saddle for example):

But finally, the resistor pressure sensor broke (it is actually very fragile, especially the connection between the wire and the elastomer and the liquid metal inside), and I did not have time to figure out how to code the capacitive pressure sensor, so, instead I chose a last solution: using a push button, and more exactly a printed board with 3 push buttons in parallel to sense the pressure. I forgot to take a picture of the PCB with the push button integrated to the saddle but the traces in Eagle were:

f. Embedded Programming

This part was not trivial neither since I first needed to "calibrate" the different sensors. But to be short I used the Arduino IDE environment to program the board. The Arduino IDE Serial plotter and Serial viewer were actually very convenient to use. The video on the top describe the calibration process nicely and how to plug the different cables.

The goal of the calibration part was to detemrine the values of the input devices that wold make the difference between warm/cold, night/day, pressure/no pressure. I thus tested the device separetely going outside when it was day and then when it was night, when it was warm and then when it was cold... I also wanted to have the light and the heater on, even after a few seconds when the biker was standing up. I chose 5 seconds but could have chosen much more. I also tried a blinking LED code if the biker was pushing the bike seat twice. I also needed to determine the Arduino pin number in the Arduino IDE environment (in brown) that are actually different than the Attiny44 pins.

At the end, a simple version of the code is as follows:

#include <SoftwareSerial.h>

int lightPin = A0; // photo transistor (pin 13)
int lightVal = 0;
int tempPin = A1; // temp transistor (pin 12)
int tempVal = 0;
int buttonPin = A3; // temp transistor (pin 10)
int buttonVal = 0;
int resPin = A2; // temp transistor (pin 11)
int resVal = 0;
int LedPin = 9; // LED actuator (pin 3)
int HeaterPin = 8; // heater actuator (pin 5)

const int tx = 6;//Transmit pin
const int rx = 10;//Receive pin

SoftwareSerial mySerial(tx, rx);

void setup() {
  pinMode(LedPin, OUTPUT);
  pinMode(HeaterPin, OUTPUT);

void loop()
  lightVal = analogRead(lightPin);
  tempVal = analogRead(tempPin);
  buttonVal = analogRead(buttonPin);
//  resVal = analogRead(resPin);

  //mySerial.println(int(map(tempVal, 400, 600, 1, 100)));
  //mySerial.print(" : ");
//  mySerial.println(tempVal);
  //  mySerial.print(" : ");
  //  mySerial.print(buttonVal);
  //  mySerial.print(" : ");
  //  mySerial.print(resVal);
  //  mySerial.println(" : ");

    if ((lightVal > 1000) && (buttonVal < 1019)) {//If dark and load
      digitalWrite(LedPin, HIGH);
//      mySerial.println("LED on");
    else {
    digitalWrite(LedPin, LOW);
//    mySerial.println("LED off");
    if ((tempVal > 585) && (buttonVal < 1019)) { //If dark and load
      digitalWrite(HeaterPin, HIGH);
//      mySerial.println("Heater on");
    else {
    digitalWrite(HeaterPin, LOW);


g. Conclusion

This project had to be produced in a relative short timeframe and could have been improved by many other ways. Here are some ideas for future work: