Close
0%
0%

Bike signaling

Signaling bike movements with inductive wireless system using detachable leds in the bike sweatwear.

Public Chat
Similar projects worth following
The concept

The idea is quite simple. A single board controls blinking leds, but instead of directly connect the pin with the led, I'm attaching a wireless conductive charger to the blinking pin in the ATmega328 (for testing and prototyping you could use UNO or NANO) so it will pass the information (blinking) to the led as long as the other coil, the one connected to the led, is close to the one connected to the PCB. This way, battery and circuit (the heavier parts) are in the bike and not in the fabric, and it's more comfortable and convenient. Also, I decided to suggest a sewing pattern for using the leds in a detachable pocket.

Introduction

I was suggested to create a project that allows people on bikes use leds to signalling their moves. This idea came to my attention as my dad is also a biker and I thought this could be useful. I recently tested wireless inductive coils for wereables in another project so I decided to make it more interesting. Let me explain.

The concept

The idea is quite simple. A single board controls blinking leds, but instead of directly connect the pin with the led, I'm attaching a wireless conductive charger to the blinking pin in the ATmega328 (for testing and prototyping you could use UNO or NANO) so it will pass the information (blinking) to the led as long as the other coil, the one connected to the led, is close to the one connected to the PCB. This way, battery and circuit (the heavier parts) are in the bike and not in the fabric, and it's more comfortable and convenient. Also, I decided to suggest a sewing pattern for using the leds in a detachable pocket so the biker can do the laundry without worrying about the components. The whole project is protected under SGPLv3, so anyone who uses it has to handle the code to the user and make it clear is open.

3D design

I used this wonderful 3D design for making a strap-held for the bike coils. Check it here:

Sketches before the design:

Code and PCB

The code is quite simple, and adjusted to the PCB design. Let's take a look at the PCB first:

The board uses a ATmega328, connected to a mini USB module (only using power). Additionally, I added two power and GND pins in case an alternate power source is needed. Main pins are A0 and A1, wich will be left and right leds, but in case you want to add more leds A2, A3 and A4 are ready to blink leds as well. All the leds blink with a 1 sec timing, in case the biker wanna changes this, I added a RX-TX so you can read the current timing and set a new one using an extra Arduino that sends the data to the board (through TX). As the PCB uses a mini USB for powering up, feel free to attach it to a solar powered battery in your bike! or any other fair powered. Let's explore the code to better understand:

/*
  Blinking wereable, this part goes in the bike
  Creator: terceranexus6
  
  LICENCE: GPL v3

  In this case, the inductive coil shall be conected by default in right and left, unless you want to use any other of the 
  analog inputs for convinience (or extra).

  default blinking time is one sec, that could be changed using the RX pin.

  This could work in arduin nano and UNO using the pinout:

  ARDUINO           

  A0                COIL 1 5V 
  A1                COIL 2 5V
  GND               COIL 1 AND COIL 2 GND
  

  but you can also print the PCB, check it here: gitlab.com/terceranexus6/komorebi
*/

//constant values for the board (minimun)

const int led_left=A0;
const int led_right=A1;

//const values for extra lights (extra)
const int extra_led_1=A2;
const int extra_led_2=A3;
const int extra_led_3=A4;

//values for RX and TX digital
int rx = 1;
int tx = 0;


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize pins as an output except from rx.
  pinMode(led_left, OUTPUT);
  pinMode(led_right, OUTPUT);
  
  pinMode(extra_led_1, OUTPUT);
  pinMode(extra_led_2, OUTPUT);
  pinMode(extra_led_3, OUTPUT);
  
  pinMode(rx, INPUT);
  pinMode(tx, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {


  //1 sec delay by default
  int my_time = 1000;

  //reading RX for changing light timing, in case of reading from another arduino
  int timing = digitalRead(rx);

  if ( timing > 0 ) {

    my_time = timing;
    
  }

  //sending the information back to tx for debugging, so you can check if it's either by default or rx
  digitalWrite(tx, my_time);

  //flashing left
  flash_light(led_left, my_time);

  //flashing right
  flash_light(led_right, my_time);

  //flashing extra led 1
  flash_light(extra_led_1, my_time);

  //flashing extra led 2
  flash_light(extra_led_2, my_time);

  //flashing extra led 3
 flash_light(extra_led_3, my_time);
...
Read more »

_buckle_body.cbddlp

printable buckle for the bike handler

cbddlp - 11.74 MB - 12/14/2020 at 19:22

Download

Schematics.png

Schematics

Portable Network Graphics (PNG) - 86.48 kB - 12/14/2020 at 19:22

Preview
Download

PCB_design.png

PCB design based in ATmega

Portable Network Graphics (PNG) - 14.38 kB - 12/14/2020 at 19:22

Preview
Download

bike_blink.ino

Arduino code, commented

x-arduino - 2.23 kB - 12/14/2020 at 19:22

Download

  • Posting the basic details

    Paula12/14/2020 at 19:35 0 comments

    These are some of the basic details, that I also published in my blog, repo and hackster.io. I expect to update soon with fabric patterns for the detachable parts for the sweatwear and some prototyping pictures.

    Stay around!

View project log

  • 1
    Step 1: testing the Wireless Charging

    Use an Arduino UNO. Program and upload a simple blinking:

    // We will connect 5V of the big wireless coil here
    int my_led =7;
    
    // the setup function runs once when you press reset or power the board
    void setup() {
      // initialize digital pin LED_BUILTIN as an output.
      pinMode(my_led, OUTPUT);
    }
    
    // the loop function runs over and over again forever
    void loop() {
      digitalWrite(my_led, HIGH);   // turn the LED on (HIGH is the voltage level)
      delay(1000);                       // wait for a second
      digitalWrite(my_led, LOW);    // turn the LED off by making the voltage LOW
      delay(1000);                       // wait for a second
    }

    You can also use Analog:

    // We will connect 5V of the big wireless coil here
    int my_led =A0;
    
    // the setup function runs once when you press reset or power the board
    void setup() {
      // initialize digital pin LED_BUILTIN as an output.
      pinMode(my_led, OUTPUT);
    }
    
    // the loop function runs over and over again forever
    void loop() {
      analogWrite(my_led, 255);   // turn the LED on (255 is the max voltage level)
      delay(1000);                       // wait for a second
      analogWrite(my_led, 0);    // turn the LED off by making the voltage 0  
      delay(1000);                       // wait for a second
    }

    Conect big Coil of the charger like this:

    GND -> GND

    5V -> pin 7 or pin A0

    We will be talking about big coil and small coil. Spot the difference before start!

  • 2
    Now connect the small coil to the led, 5V -> 5V and GND -> GND easy peasy!
  • 3
    Approach the Big coil connected in the arduino to the small coil connected to the led. Se if it works!

View all 4 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates