Main Site Documentation

Need some help


#1

Hi all,

I’m trying to determine the best hardware for my latest mad idea. I’m looking at hooking up an LED light bar to the under side of my saddle on my bike. The max width is 4 inches. I’d like to signal left, right and stopping. Left turn would be when I hold the left button down, right when I hold the right button down and stopping when I hold both. The buttons need to be low profile to fit under the hoods. The buttons would be wired to the front control unit under the stem, the wiring would go under the bar tape. The front unit would send a remote signal to the rear unit under the saddle which turns on the LED.

I’m looking for suggestions regarding the hardware for this. Or, does someone already have/know of an alternative?

thanks
Mike


#2

so do you really want to do this “wirelessly” ? If so, that’s a much harder task.

First up, none of this will be Gadgeteer module specific. Far too much “infrastructure” with PCBs and extra space consumed that you don’t have available. You’re going to have to go back to individual components and wires and the like.

Buttons. Sure, low-profile buttons are available and can be used under grips or tape. You’d need to find one that suits, but a button is about as simple a device as you can find :slight_smile: From commodity suppliers, an example is https://www.sparkfun.com/products/8720 or https://www.sparkfun.com/products/97 but both will require soldered wires onto the pins and may have varying degrees of waterproofness…

LEDs. Depending on how fancy you wanted to be, you could custom make some quick-and-simple PCBs and mount LEDs to them, or you could buy some PCB mounted LEDs and wire them up. Depends on how fancy you wanted to be with colours, flashing, and re-using LEDs for multiple purposes whether something like the bars they talk about in https://learn.sparkfun.com/tutorials/led-light-bar-hookup might suit or if a custom design is a better idea. Waterproofness again will be your challenge.

Wireless. Easy off the shelf options are available, like zigbee. Other cheaper options are also available. None of them are likely to result in a “small” package. I’d consider a wired solution here, doesn’t cost anything like a wireless solution might (and the biggest cost will likely be integrating a wireless module in the solution, in space and time, and a wire is just quick and easy). If you went with say zigbee or some other “transparent pipe” networked device, you could simply use two general IO pins to detect when a button is pressed and send that back to the other end; when both are pressed, send the status back at the same time, don’t try to differentiate.

Wired: I would run a single four-core wire (maybe just split off the required cores from something like this https://www.sparkfun.com/products/10648 ) that separates at the stem and goes to the left/right buttons. You could use 3-cores and share a GND wire between the two, but using 4-cores with two going left and two going right seems most sensible to me. You could use the same approach as the standard cabling methods for older speedos when they used to run the sensor wire for cadence pedal sensors back onto the frame via the brake cable itself. (I know, less than “clean” especially on a nice looking bike like yours is)

Processor. Depending on which way you approach it (wireless between front/back, or wired) might change the processing requirement, but a small micro would suffice (it is unlikely you’d need it to be anything powerful or running netmf, but you certainly could use a Cerb40 for instance).

If I was doing this: I’d make a PCB the way I wanted to for my LED bars. I’d probably have WS2812 multicolour LEDs on a small PCB that was shaped like a double-ended arrow, and have it flash orange arrow pointing left when turning left, flash orange arrow pointing right when going right, and flash a red bar when stopping. That could be done with a Cerb40, so I’d probably include the footprint for Cerb40 on the board to make it simple. Then I’d run wires to the buttons for simplicity.


#3

Thanks Brett.

I didn’t even think about a custom PCB for the LEDs, but I’ll look into it. I haven’t done any PCB work so maybe this would be a good time to learn.

I have a Cerb40 and thought it would be the best fit, power and size wise. I’d love a wireless option as the bike uses internal housing but I know it might not be the best. Originally I was thinking of using some bluetooth or RF modules for communication. I do have more room under the saddle to house some hardware.


#4

Where’s the fun in that? :smiley:


#5

you guys didn’t read the non-documented non-functional specs that said it had to be cool, which instantly implied flashing and a microcontroller.

A quick PCB with some WS2812’s and some cool code would be my vote. Making it waterproof is an exercise left to the reader - but be careful of protection from the elements because depending where you live and ride can make a big impact on simple electronics. I remember when I used to work in a steelworks plant and ride to work I was always getting bad gunk under my seat to the point where I’d be replacing the under-seat bags on a regular basis because they would get eaten away by some nasties. I can’t imagine a PCB without plenty of attention to sealing would have lasted long ! Oh and phase 1 would be wired, phase 2 a later examination of wireless :slight_smile:


#6

Sounds like a very cool KS project. If it is done right it can be very successful.


#7

Thanks guys.

I’ll look at the gate option from andre but that isn’t what I was thinking of either. That would be the cheap solution?

I’m opting for Brett’s idea on custom PCB with the WS2812s.

I’ve never done a PCB so I need to research that.

as for KS, that would be cool but we’ll see.

thanks


#8

PCBs are relatively easy to do these days.

There are two basic steps. Step 1 is the schematic and PCB layout, step 2 is getting that design produced.

There are many freeware tools for non-commercial uses and open source options - the two I’d consider are Eagle (freeware limited version, LOTS of training material and “starter” boards; even GHI provide Eagle files for their reference boards and OSHW designs) or Kicad (full open source). If you don’t know either, I’d suggest you try kicad, because it has no limitations and you really only want to learn one product not spread yourself over two. When I was learning there wasn’t a whole heap of resources to help learn Kicad, so I opted for Eagle and I can’t justify the time to unlearn it’s quirks and learn the quirks of Kicad (but I would love to if I had time, some times the 80mmx100mm limit on Eagle is a pain but I can’t justify paying for it to get around it)

Then there are many easy ways to get boards produced. The simplest is OSHPark, they will produce 3x copies of the board for you for a fixed fee of (I think) $5 per square inch. Other places like DFRobot and Seeed Studios and Itead Studios have set maximum board sizes that mean if your board was say 55mmx100mm you wouldn’t fit in the 50x100 board size and would have to pay for the 100x100 size - plus you buy in multiples of 10 copies. Most of them have paid options to get different services like solder mask colours etc, but OSHPark are purple mask and ENIG finish by default and have few options. Personally I have an ethical problem with buying 10 copies for a “one off” like this so prefer OSHPark for that reason alone, but if I wanted quantity I’d opt for one of the other houses as the cost can be high when the board size gets up there. All these houses take “gerber” exports of your board - OSHPark can take a raw Eagle board file and interpret it so that combination is really easy, but don’t let that sway you.


#9

Completely OT - nice bike


#10

Thanks.

here is the bike when I first got it earlier this year.

My third new bike in my life, and my first full carbon ride. I’ve got my old steel one still, and the one before that was steel as well. They never wore out, even when I raced them.


#11

@ mikef - FYI

http://arduinodev.com/arduino-on-bike-with-gps-and-ble/


#12

Thanks Architect. I prefer to use my Garmin for that sort of thing. Still it’s interesting to see folks trying that.


#13

I had a Trek, i forget if it was 2300 or 3000, when they first came out with their all carbons. Wonder what’s going to happen to Leopard next year, don’t think that the Schleck boys will be back. Got an Alu-Carbon Cannondale now.

Back on topic:
Here’s another project to check out for inspiration.


#14

That backpack would be good for commuting.

The Schleck boys are doing to be back with the Trek Cycling team. Trek bought the license from Leopard so Radioshack Leopard is no more.

I’ve a few friends riding Cannondales and they like them. Original Cannondales had the huge tubing, the newer ones are much nicer.


#15

This Thursday’s The Uninitialized Show (a show Andrew Duthie and I do on YouTube) will be about designing and getting your own PCBs manufactured. Join in live with your own feedback and comments/questions, or leave them in the comments ahead of time.

After wrestling with EAGLE forever and realizing the people who wrote it had obviously never used any normal apps on a PC, I went to DipTrace. It’s inexpensive and VERY easy to use, and works like a normal Windows program.
http://diptrace.com

Prior to that I had tried KiCad, EAGLE, DesignSpark PCB, and a few others.

All my recent PCBs have been manufactured through DFRobot.com . They have all the silkscreen colors, let you use the space more effectively, and still come out dirt cheap for boards (around $1.00 each for small green boards in quantity of 10). They also understand the hobby market.

As with most things in the far east, I encourage you to use DHL to ship, not some of the awful post systems they have out there.

Pete