Extra LEDs For the Onewheel (Because RGB adds a 15% preformance boost)
-
Oh god, Loaffette's back and he's got another terrible ideaHello.
I've been working on something that may be described as possibly amazing, horrifying and with some possible utility and meme-ability.
I've had a problem of signaling to pedestrians or other vehicles while on my Onewheel when on campus. There's a bit of road that goes through the campus in front of two dorm buildings and the Rec Center. The speed limit is 15, and isn't too bad to drive on, but after going on a group ride in Dallas and having to rely on other riders to use their lights to signal to other cars, I got an idea.
We add LED strips, a battery bank and a microcontroller, a few 3D printed parts and boom, we have a system to control and power LEDs! Add a joystick or maybe a few buttons and some extra code, and you can do some funky stuff.
I'd like to mainly pair this system with a joystick to use it as a blinker/turning lights. There's two immediate problems:
1: I suck at programming. I'm horrible at it.
2: Where to mount the LEDs.I have a solution for the second problem, and not the first.
I present:
LED strip holders. These are supposed to go on the front or back of your onewheel on the rails. Just take some double-sided tape or some hotglue and slap them on there!
These are rough, horrible and probably won't last five minutes into a ride.
These have a few problems.
A lot of problems. For one, if I were to get too close to a sidewalk, wall or even a rock, these would get knocked off. If I were to nose-dive, they could get damaged by rough terrain or a rock, maybe even a stick. If the board lands on it's side, these would get crushed. Also, lots of people use rail guards (I don't because I'm psychotic). So, these wouldn't fit.
Oh, I should mention: The microcontroller and battery would probably be on the fender in an enclosure or in a seperate module on the person or something idk
So, these are getting scrapped.
I have some other ideas that I've been poking around with though.A: Under the fender: Just shove them under the edge of your fender, run the wires towards the battery and the micro controller, and boom! Gives the wheel a cool lighting effect and if the LEDs are bright enough, they could work! But not in daylight.
B: On the fender: This isn't a totally horrible idea. Just strap the lights onto your fender, put in the code to tell the board which light is the front and which is the back. The problem is that people have legs, and it would be in the way. Also some people don't ride with fenders (I think)
C: On the nose(s). This one is outlandish and came to me after getting bored of listening to a very bad lecture in class and staring at my professors nose. Don't ask why.
Literaly just put the LEDs on the nose on each side. No legs in the way, and it may look cool. Nosedives could cause damage, and some tricks may not work.This is just a post to show an idea I have, and to see if the masses of the forum may be able to pitch a better idea than what my crazy two-brain celled noggin can come up with.
So uh
ye -
@loaffette Nice job, it looks pretty cool! 15% performance boost, but at least 20% cooler.
Regarding the LEDs do you know what model they are? A lot of addressable LEDs just work with the Arduino Neopixel library and you can pretty much butcher the example code packs to get what you want (it's what I do lol).
What I reckon would be a cool idea is take a footpad that's got a really raised end and integrate another LED bar up there built into the pad. Bonus points for a complete integrated wrap around. Bet you could do some real funky stuff. That said I really like the rail light mounts you made.
-
@loaffette I agree with @Lia
Arduino is pretty easy to use... I felt like I should be able to write my own code for Arduino/LEDs but as someone said to me, if the code is already written, there's not much point rewriting your own... Once you start using it you can fairly easily get your head round what's going on and edit to your needs... So as long as you understand it that's good enough.
I made an infinity mirror with the programmable LEDs to great amusement of my family etc....Now, as you probably know, those LEDs are available as waterproof ones and can be cut to length and also have double sided adhesive built in....
Although that never lasts long does it.....Would stick ok to the rear footpad maybe ?
How best to control them that's the problem ;)
Over to you ;)
-
@puzz360
You're right lolControlling it would be done through a joystick and maybe a button. The complicated part is integrating that into the code itself.
-
After a day of classes and some riding around, I had an idea when installing my new bumpers
Or at least..
Three.All horrible in their own way, but could be useful.
Option one:
We could go back to the rail mounting system but look at it differently. Imagine if we had a clip and some double-sided tape. The clip could latch onto the rail near the motor, then you just stick your LED strips on it or something. Add some supports/ a durable diffuser to protect the lights then just wire it up. You still have the problem of curbs and falling off the board but I think we can work with it. Rail guards can be accounted for by adding a concave cutout to the inside of the mount.
Option Two:
This is a continuation of a previous ideas. We use either use two LED strips, one that goes on the far corner where your leg would be, and the other either on the far corner or just in the middle, or a strip down the middle on both sides, then a long strip that goes sideways. This isn't my favorite idea, as I feel like it's sort of cheating and isn't that innovative, but it works. Roll-overs on the board could destroy the LEDs.
Option Three (WACKY WARNING):
I think I had too many root beers when I came up with this one. I was thinking about the footpad, and thought, "Hey, why not just lift the footpad up and make space."
This could work, but then there would be figuring out how to mount the footpad, how to mount the "filler" and how the wire/cable for the footpad would hold up. I am also unsure if this would work on the back footpad. This is probably something that might turn into it's own project away from the LEDs if I decide it's worth the trouble. (Could sell the model or could just sell the idea to TFL or Craft & Ride, idk lol)
So, here are more horrible ideas. In about four days, I'll be able to order some more parts and when they arrive in the mmial, I'll start work on a physical model. For now, I'm using tinkercad's circuit thing to simulate the components, LEDs and the arduino code. Once I get that down, I can just build the actual thing them just shove the code into my Arduino when it arrives.
-
@lia I forgot which kind, though they have a 5V power line, a data, then ground line.
-
@loaffette Try them with the standard neopixel library, if they work they're likely something like WS2812B leds as they're super common.
They're addressable so you can send sequences of data to turn specific ones on/off and change the colour :)
-
@lia I'll give it a try then!
Also currently 3D printing and testing out the rail clips first to see if they would work out
-
@loaffette Alright hear me out. Get a Seeed Studio XIAO nRF52840 Sense. It has a built in IMU and could attach it to glove or wrist guard and have it detect when you stick your hand out one way or the other. Then you use the bluetooth radio to send a message to another controller that tells the lights to blink for turn signals. The XIAO also has a built in battery charge circuit for easy integration! https://amzn.to/3Rh30rc
-
@cheppy44 It's possible and would be cool but that's a huge leap
I'm still at the phase of trying to figure out where to mount all of this stuff and seeing if I can get the code down. Maybe when I have mounting down and I have code that works then I'll look into it.
You don't build the rocket if you don't know if it will take off
Thanks for the recommendation though!
-
The beauty of the engineering process!
So, I got the clips to stay on, found the right clip model that works, and it sticks pretty well!
So, I printed this puppy out!
LEDs would mainly face the ground but also back and fourth for the initial design. Need to add some more width so the LED strip and fit inside but it works for a proof of concept.
I stuck a pair on my board without the strips, and just rode through the day.
They looked fine
until..
...
...
...
...
...
...
...
...
Welp.
So, it got completely olbiterated. The clip also shifted around a lot, and the LED strip would have been shredded into little strips (hah) if I had them on there.The next idea could be under the fender actually.
Kind of like a lighting kit for a car or something.
The only problem would be leaves, dirt and water but I could probably put them in an enclosure or something.I've been thinking about the footpad idea and I might work on that later, maybe during the summer when I have some more time and I have a summer job.
Got the code down, but there's an issue with making the LEDs blink continuously.
No luck with making the code work with buttons and stuff, so I'll have to either ask a programmer friend to cook something up or just keep at it -
@loaffette what controller are you using with the LEDs? I am more than willing to try and help out with your code!
-
@cheppy44 probably an arduino Nano or something small.
I have an uno that I could use for testing if I can get a printer cable (Not serial/parell) but I wouldn't take it out on a ride and I'm unsure if it works.The code:
#include <Adafruit_NeoPixel.h> int buttonPin = 4; // momentary push button on pin 0 int oldButtonVal = 0; #define pixels 8 #define PIN 3 // Parameter 1 = number of pixels in strip Adafruit_NeoPixel strip = Adafruit_NeoPixel(pixels, PIN, NEO_GRB + NEO_KHZ800); int nPatterns = 2; int lightPattern = 1; uint16_t currentPixel = 0;// what pixel are we operating on uint16_t led=0; unsigned long previousmillis = 0; unsigned long time = 50; // the setup routine runs once when you press reset: void setup() { strip.begin(); strip.show(); // initialize all pixels to 'off' currentPixel=0; // initialize the BUTTON pin as an input pinMode(buttonPin, INPUT); digitalWrite(buttonPin, HIGH); // button pin is HIGH, so it drops to 0 if pressed } void pattern1() { strip.setPixelColor(0, 255,255,0); strip.setPixelColor(1, 255,255,0); strip.setPixelColor(2, 255,255,0); strip.setPixelColor(3, 255,255,0); strip.show(); delay(10); strip.setPixelColor(0, 0,0,0); strip.setPixelColor(1, 0,0,0); strip.setPixelColor(2, 0,0,0); strip.setPixelColor(3, 0,0,0); strip.show(); delay(10); } // Pattern 2 - Red light, all LEDs in the strip are red void pattern2() { strip.setPixelColor(led,0,0,255); strip.show(); led++; if(led == pixels){ led = 0; } currentPixel=0; } // the loop routine runs over and over again forever; void loop() { // read that state of the pushbutton value; int buttonVal = digitalRead(buttonPin); if (buttonVal == LOW && oldButtonVal == HIGH) {// button has just been pressed lightPattern = lightPattern + 1; } if (lightPattern > nPatterns) lightPattern = 1; oldButtonVal = buttonVal; switch(lightPattern) { case 1: if ((unsigned long)(millis() - previousmillis) >= time) { previousmillis = millis(); pattern1(); break; case 2: if ((unsigned long)(millis() - previousmillis) >= time) { previousmillis = millis(); pattern2(); break; } } } }
-
I figured the issue you are having with the lights strobing. In your pattern1 you have delay(10) which will only delay it for 10 milliseconds. I changed the 10 to 1000 for one second and here are the results.
I also recommend changing your "time" variable name to something else such as "timer". There are certain variable names that are reserved for other things.
Check out the Neopixel Uber Guide for a bunch of information about the leds and the library. For example you can set the whole "strip" to a color with a single line of code, instead of having to create a function to iterate through the addresses.
https://learn.adafruit.com/adafruit-neopixel-uberguide/arduino-library-use
-
@cheppy44 You are a life saver, holy crap
all I need to do is add a part so if I use a second button, I can control the other four LEDs
-
@cheppy44 good find…. 👍
Typical… NOT available on Amazon UK or EBay UK !!!
Edit…. Found it in RS;)
I think maybe sticking one on the helmet and using voice commands could be an idea, easy to keep PSU and device safe top end (hopefully). -
@puzz360 let me know how it goes! I am tempted to pick a few up to experiment with.
-
@cheppy44 struggling with the code currently. Trying to have two button inputs and two switch functions but nothing is working for the other LEDs
-
@loaffette what are you trying to have the buttons change?
-
@cheppy44 if I understand your question correctly, I want one LED to control half of the LEDs (for the left side), and another button control the other half (right side)