Looking for a Mentor/Helper for a Wireless Lighting Project

I tried to keep this as short as possible while being thorough and clear to avoid confusion, bear with me. :slight_smile:

Hello, I’m a senior industrial design student working on my thesis project and I am looking to use an Arduino to make a working prototype. However, I have minimal knowledge in coding and basic knowledge of electronics, so I’m looking for someone to mentor/help me, or possibly hire someone to code. (I don’t know how large the scope of this project is or what rates are.)

Project Overview:

I’m designing a line of wearable products, clothing, and accessories for road and commuter cyclists. My design objective is to give cyclists the same signaling tools that the motor vehicles they share the road with have.

The flagship product of the line (and the one I will be making a physical prototype of) is a backpack that has built-in turn signals, a brake light, and driving lights that are controlled wirelessly from a controller mounted to the handlebars.

Needed Features:

  • Left/Right Turn Signals (slider switch or separate buttons on controller)
  • single press to activate blinking, another press to stop
  • pressing the opposite button cancels the original
  • Brake Signal (pressure switch that slides on to brake handle)
  • light turns on when button is held, and goes off when released
  • Driving Lights (additional set of lights that can be turned on and off at will aside from the signals)
  • Caution/Hazard lights
  • One button that makes all of the lights flash
  • Wireless transmission of commands from controller to receiver in backpack (bluetooth or radio, whichever is easier, can’t be IR because of lack of sightline)
  • Indicator lights on the controller itself to indicate which function is operating
  • preferably set up so that the backpack confirms that the lights are working and sends back that confirmation signal to allow the indicators to work

What I Already Have:

I already have the first two bullet points done in code and got it working with my Arduino. I had some help from this forum a few months ago. Here’s the code if you want to take a look at it. I’m curious if this code can just be kept and the extra features of the other bullets can be built into it? (instead of starting from scratch)

#include <SwitchManager.h>

typedef enum {
    NONE,
    LH_DOWN,
    RH_DOWN,
    LH_LIGHT_ON,
    RH_LIGHT_ON
};

const unsigned long BLINK_INTERVAL = 300; // ms

// pin assignments
const byte LH_SWITCH_PIN = 2;
const byte RH_SWITCH_PIN = 3;
const byte BRAKE_SWITCH_PIN = 4;
const byte LH_LIGHT = A3;
const byte RH_LIGHT = A4;
const byte BRAKE_LIGHT = A5; 

SwitchManager LHswitch; 
SwitchManager RHswitch; 
 
byte state = NONE;
 
void handleLHPress (const byte newState, const unsigned long interval, const byte whichPin)
  {
  // switch down?
  if (newState == LOW)
     {
     switch (state)
       {
       // if already on, turn all off
       case LH_LIGHT_ON:
         state = NONE;
         break;
         
       // otherwise switch is now down, but not yet released
       default:
         state = LH_DOWN;
         break;
       }  // end of switch
     return;
     }  // end of LH switch down
  
  // switch must be up

  if (state == LH_DOWN)  // if down, switch to down-and-released mode
    state = LH_LIGHT_ON;  
  }  // end of handleLHPress
 
void handleRHPress (const byte newState, const unsigned long interval, const byte whichPin)
  {
  // switch down?
  if (newState == LOW)
     {
     switch (state)
       {
         
       // if already on, turn all off
       case RH_LIGHT_ON:
         state = NONE;
         break;
         
       // otherwise switch is now down, but not yet released
       default:
         state = RH_DOWN;
         break;
       }  // end of switch
     return;
     }  // end of RH switch down
  
  // switch must be up

  if (state == RH_DOWN)  // if down, switch to down-and-released mode
    state = RH_LIGHT_ON;  
  }  // end of handleRHPress
  
 
void setup ()
  {
  LHswitch.begin (LH_SWITCH_PIN, handleLHPress);
  RHswitch.begin (RH_SWITCH_PIN, handleRHPress);
  pinMode (BRAKE_SWITCH_PIN, INPUT_PULLUP);
  pinMode (LH_LIGHT, OUTPUT);
  pinMode (RH_LIGHT, OUTPUT);
  pinMode (BRAKE_LIGHT, OUTPUT);
  }  // end of setup

unsigned long lastBlink;
bool onCycle;
 
void blinkLights ()
  {
  lastBlink = millis ();
  onCycle = !onCycle;
  
  // default to off
  digitalWrite (LH_LIGHT, LOW);
  digitalWrite (RH_LIGHT, LOW);

  // every second time, turn them all off
  if (!onCycle)
    return;
    
  // blink light
  switch (state)
    {
    case NONE:
      break;
    
    case LH_DOWN:
    case LH_LIGHT_ON:
      digitalWrite (LH_LIGHT, HIGH);
      break;
      
    case RH_DOWN:
    case RH_LIGHT_ON:
      digitalWrite (RH_LIGHT, HIGH);
      break;
    
    }  // end of switch on state
    
  }  // end of blinkLights
  

void loop ()
  {
  LHswitch.check ();  // check for presses
  RHswitch.check ();  
  
  if (digitalRead (BRAKE_SWITCH_PIN) == LOW)
    digitalWrite (BRAKE_LIGHT, HIGH);
  else  
    digitalWrite (BRAKE_LIGHT, LOW);

  if (millis () - lastBlink >= BLINK_INTERVAL)
    blinkLights ();
    
  // other stuff
  }  // end of loop

Hardware:

I currently have one Arduino. Will I need a second Arduino in order to set up and test the wireless connectivity?

What exact modules do I need for the wireless functionality, whether BT or Radio?

How does one determine the voltage required for a project like this? I will need battery packs for both the backpack and the controller.


Other:

For my project I plan on either building a custom breadboard myself (might be a stretch) or getting boards made to be put into 3D printed housings that I am designing. I’ll also be wiring the lights into the backpack myself.

SO in reality, I just need help making sure this is doable and I need help with the coding!

This is all new to me, so any suggestions in regards to my ideas are very welcome. If you need more information or need to see any of my initial design sketches to get a better idea, please let me know.

P.S. - It’s probably hard to help with this kind of stuff over the internet (?), so does any type of thing exist that I could seek out in person? I would have to do some research to see if my city has anything, but I would be a lot easier if I knew where to look.

Thanks for looking.

P.S. - It's probably hard to help with this kind of stuff over the internet (?)

If your requirements are well defined, and the hardware is (relatively) standard, it can be done.

For help in person, it would be useful to know what part of the world you are in.

I currently have one Arduino. Will I need a second Arduino in order to set up and test the wireless connectivity?

Something needs to be on the receiving end...

What exact modules do I need for the wireless functionality, whether BT or Radio?

The NRF24 radios are probably the best bang for the buck. Personally, I like XBees, but they are not cheap. On the other hand, the sending end doesn't really need more microcontroller than what is built into the XBee.

PaulS:
The NRF24 radios are probably the best bang for the buck. Personally, I like XBees, but they are not cheap. On the other hand, the sending end doesn't really need more microcontroller than what is built into the XBee.

When I read the original post I also thought of nRF24L01+ transceivers. SparkFun used to sell these little fobs with five buttons. They use ATtiny24 with the Nordic transceiver. The fob program uses most of the ATtiny24's memory so if something similar were tried I'd use the ATtiny84.

I used the of these fobs to allow my niece to control LEDs hung in her hospital room. Here's a link to information on the project.

I think something similar to the fob would be all that's needed on the handle bar controller. The buttons should probably be different. But I think the fob design is a good starting point. It ran off a little coin cell.

I also like XBees. They're easy to use but they're expensive and large when compared with the little nRF24L01+ transceivers.

nRF24L01+ transceivers can be had for less than $2 on ebay and I've seen smaller modules than the size commonly used.

Thanks for the info on the transmitters!

PaulS:
If your requirements are well defined, and the hardware is (relatively) standard, it can be done.

Ok, I don't think it would be too hard to explain to anyone I would be working with.

PaulS:
For help in person, it would be useful to know what part of the world you are in.

Cincinnati, OH, USA

The word you are after is 'telemetry'. If your transmitter sends information about bike controls, why not also send speed, accelerometer, and gps information? Or at least - design your protocol with that possibility in mind. (you know, if you measure speed of the bike chain and the tension on it, then you can directly measure how much work the rider is doing at the pedals)

Bluetooth is a great option, because sure: send it to the backpack. But there's no reason why it can't also be sent to a mobile phone app. The main issue is that the controller must push notifications to the backpack, but I think bluetooth will accommodate this.

So you want to:

  • build telemetry equipment that can be fitted to a bike. That's the "industral design" part. Not just the usual speed sensor on the wheel - you also want info about what controls the rider is using.
  • build a backpack that accepts this telemetry and displays car-like turn signals (etc).

Both involve a microprocessor and some code.

you may want to have a look here:

i used those modules in the past and they work very well. nice part is that you dont need any controller on the transmitter side, just this module

hope this helps, send me a PM if you need help with coding