November 6, 20169 yr Author So to anyone who's interested I swapped the arduino out for a 2 bit D type flip flop, it consumed hardly any power and works a treat.
November 6, 20169 yr Author Would someone tell me what to do for my Oxygen CB city Bike? 2015 version. Go into the settings and change its wheel size to the lowest setting. I believe these bikes dont use a magnet sensor as its built into the hub. So changing the wheel size to a small value should give you some more speed.
November 6, 20169 yr So to anyone who's interested I swapped the arduino out for a 2 bit D type flip flop, it consumed hardly any power and works a treat. That seems like the best way forward, no need to use a sledgehammer (arduino) to crack a walnut.
November 9, 20169 yr Go into the settings and change its wheel size to the lowest setting. I believe these bikes dont use a magnet sensor as its built into the hub. So changing the wheel size to a small value should give you some more speed. Thank you. I will try that and let you know how I get on. Thanks (Thinks, hmmm, how do I get to settings and wheel size?)
January 14, 20179 yr Hey Festive Jelly, Just wanting to say thanks for your post, using your information provided i was able to build a similar set up to derestrict my Shimano Steps (E6001) powered bike. I opted for the arduino based approach as i wanted to clamp the detected speed just below the cutoff threshold instead of just halving the frequency to keep the DI2 automatic shifting on my bike. Build information to help anyone researching this. Bike: Merida Espresso 800 EQ Motor: Shimano Steps E6001 Parts used: - Arunino uno (plan on downsizing had a spare one) - Hall Sensor sheild https://www.jaycar.co.nz/arduino-compatible-hall-effect-sensor-module/p/XC4434 - Relay Sheild as electromagnet https://www.jaycar.co.nz/arduino-compatible-5v-relay-board/p/XC4419 [url=https://www.jaycar.co.nz/arduino-compatible-5v-relay-board/p/XC4419][/url] It was dead simple to put together just pull top of relay to get access to the electromagnet and remove relay contacts then just simply mount on top of existing sensor. Mount Hall senor and move existing magnet to trigger. For the Shimano Steps motor both the frequency divider method and the speed clamping derestricting method worked really well though with the frequency dividing my auto DI2 shifting bounced between gears endlessly. Placing the magnet on your crank does not work with the Steps motor and throws an error which is kind of annoying to clear. Just a quick question Doesn't using a flip flop instead of the arduino result in the magnet being on for one full revolution the off for one increasing your overall power consumption?
January 14, 20179 yr On Yamaha mid drives you can reposition the sensor and fit a magnet to the cranks to activate the sensor. Speedo doesn't work correctly but I don't have a problem with that. Panasonic too. .
January 14, 20179 yr Hey Festive Jelly, Just wanting to say thanks for your post.... Just a quick question Doesn't using a flip flop instead of the arduino result in the magnet being on for one full revolution the off for one increasing your overall power consumption? Rig it as a mono stable job jobed
January 14, 20179 yr Rig it as a mono stable job jobed ahhh knew there would be a simple solution, too used to doing everything in code. I was going to research it to get rid of the arduino but straight frequency division wasn't the answer for me. Thanks D8ve
January 14, 20179 yr With your Arduino the ratio is 1:1 up to 15 MPH then you keep it at what ever frequency equates to 15 MPH ? This then keeps your mileage and gear change information near as possible to correct ? The problem with the shift register is that everything is halved, and we all want to show how many miles we have ridden, except when we want to sell, do you have an automatic type gear box that is speed connected ?
January 15, 20179 yr With your Arduino the ratio is 1:1 up to 15 MPH then you keep it at what ever frequency equates to 15 MPH ? This then keeps your mileage and gear change information near as possible to correct ? The problem with the shift register is that everything is halved, and we all want to show how many miles we have ridden, except when we want to sell, do you have an automatic type gear box that is speed connected ? Yeah so it just passes on each pulse from my hall sensor to the bikes until i reach 15 MPH then it switches to generating its own signal while I'm above 15 MPH. I have an alfine 8s which does automatic shifting (works really well... just amazing) it seems to shift based on a combo of cadence and speed so when speed was halved it would switch up due to high cadence and then down shift for low speed. So by keeping the real speed signal to 15 MPH it still functions properly as its normally in the highest gear by then or shift to it due to higher cadence. Would say that the mileage still wont be anywhere near correct in the long term, most of the time during my commute its reading 15 MPH while i'm actually doing closer to 30 MPH. It will be closer than halving the signal but at least with that you can double your reading to see how much you have done. i mainly just implemented it this way for the auto shift and possibility of user define speed thresholds.
January 15, 20179 yr Author Just a quick question Doesn't using a flip flop instead of the arduino result in the magnet being on for one full revolution the off for one increasing your overall power consumption? If you create a parallel circuit off your hall effect sensor and invert the signal so that high is in and low is off you can then feed that into an AND gate. So you have this hall output plus the flipfip output and when both are on the and gate output will be high which feeds into a transistor thus switching the circuit on only when the hall has a magnet and the flippity flop is flipping.
January 15, 20179 yr Author Ps. Ill be adding my new design soon which uses a dual flipflop. Ill post schematics here. Ive also been working on a 3d printed case for it which houses all the components and also a 500mah lipo battery thats rechargable through USB. More info to come soon!
March 24, 20179 yr Hi, nice idea using an electromagnet, means you don't need to splice into the bike's wiring. I'm not really sure how you convert a relay into an electro magnet, is there a photo or video showing how it's done? Failing that could I just use a tiny speaker coil or something from e-bay? I don't really know how to wind my own! Also I'm tempted to try building this with a reed switch instead of a hall sensor, as it will use a little less power, I was hoping to use an ATTiny85 powered by a coin-cell as the brain, when it is in sleep mode it uses very little power. I'm not really sure how much current the electromagnet/relay would need. Would 4mA be enough as coin cells only output a small current.?
March 24, 20179 yr Author Hi, nice idea using an electromagnet, means you don't need to splice into the bike's wiring. I'm not really sure how you convert a relay into an electro magnet, is there a photo or video showing how it's done? Failing that could I just use a tiny speaker coil or something from e-bay? I don't really know how to wind my own! Also I'm tempted to try building this with a reed switch instead of a hall sensor, as it will use a little less power, I was hoping to use an ATTiny85 powered by a coin-cell as the brain, when it is in sleep mode it uses very little power. I'm not really sure how much current the electromagnet/relay would need. Would 4mA be enough as coin cells only output a small current.? I made a new design that uses a 4093 NAND gate IC and a 4013 D-Type flipflop IC. These uses tiny amounts of power. You still need an electromagnet as a reed switch or relay doesnt generate a big enough field. I've refined my electromagnet design by using a thinner wire (0.15mm) and making more coils. Every pulse is about 80 milliamps. I power my design with a 500mah lipo that can be recharged via USB. Im going to experiment with more coils in the magnet to raise its resistance which will lower the amount of current it draws per pulse. Its getting a lot more technical than I thought it would. But i'm on the cusp of figuring out how big a field my bike needs. To make a coil is pretty easy. I use an iron bolt and use a drill to wrap the wire around.
March 24, 20179 yr Author PS the hall sensor I use takes hardly any power at all. My multimeter cant even detect it because its so low.
March 24, 20179 yr Author So here's what the circuit looks like. When I get a bit more time i'll sort a proper schematic out. But based on this diagram you should be able to work it out. The VCC needs 5v. I havnt bothered building in a switch since the whole circuit takes such little power its not worth it. Here's some links to the IC's I used: 4013 D-Type Flip Flop http://www.electroschematics.com/6509/4013-datasheet/ 4093 NAND http://www.electroschematics.com/6454/ic-4093-datasheet/
March 25, 20179 yr As I said before, most bikes use a hall sensor for the speed sensor, so you don't need the hall sensor and coil. You just cut the three wires to it and join the signal wire to the pink wire in the schematic above, then take the output to the other side of the wire that you cut instead of to the transistor. I think there's a mistake in that schematic. it shows both pins 1 and 3 of the transistor joined to the 5v rail, so no possibility of switching.
March 25, 20179 yr Thanks for posting up the circuit for the flip-flop circuit, after reading up a little on logic gates it looks like the flip-flop halves the frequency, and I'm guessing the 4093 converts the long high signal back into a pulse? I'll order the parts to build the circuit, I like the fact I'm not cutting into the wiring of the bike means the risk of screwing something up is minimal. I'll have to try winding a few magnets, I've found an old motor that I can use the wire from, I will have to get the drill out EDIT: Quick question, does VCC have to be 5v? I have a connector for the lights that puts out 6v and was thinking about using this to power the dongle. Or if I want to keep it simple, maybe just a single 18650, would ~3.7v be anough? I must admit I have more experience with arduino type stuff so I am learning as I go along here. As I said before, most bikes use a hall sensor for the speed sensor, so you don't need the hall sensor and coil. You just cut the three wires to it and join the signal wire to the pink wire in the schematic above, then take the output to the other side of the wire that you cut instead of to the transistor. My Bosch gen1 bike only has 2 pins on the speed sensor, so I guess it uses a reed switch? Taken from the SX2 dongle manual: http://i.imgur.com/87Kihrc.png So I guess I need to use a coil here? Edited March 25, 20179 yr by HypnoToad
March 25, 20179 yr Ok, I've done a little more digging and it looks like the Bosch speed sensor is a hall sensor but with only 2 wires? Maybe there are some other parts in the speed sensor, I'll have to get a multimeter on it and see what is going on. The full manual for SX2 dongle is here, they show +5v on the speed sensor wires: http://support.maintronic.de/en/downloads/e-bike-tuning/category/27-bosch-classic.html?download=112%3Asx2-tuning-dongle-bosch-classic-cablekit-manual
May 25, 20178 yr Author So you can use a boost circuit to boost a 3.7v 18650 to 5v. They are pretty efficient these days to about 90%. Flip flips are the lowest power solution but if you wanted a simpler circuit you could use an AtTiny85 which consumes around 5ma of current. The great thing about the AtTiny85 is you can program it with the arduino IDE but also you can put it in sleep mode so it will literally be drawing micro amps. I'll upload a schematic when I get home. The one thing I havnt found an easy solution for yet is the electromagnet. I'm still winding my own, it seems 5v relays arnt quite powerful enough to trigger the hall effect sensor on my bike. Thanks for posting up the circuit for the flip-flop circuit, after reading up a little on logic gates it looks like the flip-flop halves the frequency, and I'm guessing the 4093 converts the long high signal back into a pulse? I'll order the parts to build the circuit, I like the fact I'm not cutting into the wiring of the bike means the risk of screwing something up is minimal. I'll have to try winding a few magnets, I've found an old motor that I can use the wire from, I will have to get the drill out EDIT: Quick question, does VCC have to be 5v? I have a connector for the lights that puts out 6v and was thinking about using this to power the dongle. Or if I want to keep it simple, maybe just a single 18650, would ~3.7v be anough? I must admit I have more experience with arduino type stuff so I am learning as I go along here. My Bosch gen1 bike only has 2 pins on the speed sensor, so I guess it uses a reed switch? So I guess I need to use a coil here?
May 25, 20178 yr Author I think there's a mistake in that schematic. it shows both pins 1 and 3 of the transistor joined to the 5v rail, so no possibility of switching. Thats my crappy diagram, if you expand it you'll see the wire is a different colour. The base isnt meant to be attached to the 5v.
May 25, 20178 yr Author Very good! Sounds like you've got a great solution going on there. I was unable to get the hall sensor on my bike to trigger with a 5v relay so im stuck with the electromagnet Maybe i'll try directing the fields. RE The arduino, you could easily control the whole circuit using an ATTiny85 and program it using the arduino IDE. What ive done with mine is put it into sleep mode if it doesnt detect a magnet in 30 seconds. This basically turns the whole thing off without the need for a power switch. Hey Festive Jelly, Just wanting to say thanks for your post, using your information provided i was able to build a similar set up to derestrict my Shimano Steps (E6001) powered bike. I opted for the arduino based approach as i wanted to clamp the detected speed just below the cutoff threshold instead of just halving the frequency to keep the DI2 automatic shifting on my bike. Build information to help anyone researching this. Bike: Merida Espresso 800 EQ Motor: Shimano Steps E6001 Parts used: - Arunino uno (plan on downsizing had a spare one) - Hall Sensor sheild https://www.jaycar.co.nz/arduino-compatible-hall-effect-sensor-module/p/XC4434 - Relay Sheild as electromagnet https://www.jaycar.co.nz/arduino-compatible-5v-relay-board/p/XC4419 It was dead simple to put together just pull top of relay to get access to the electromagnet and remove relay contacts then just simply mount on top of existing sensor. Mount Hall senor and move existing magnet to trigger. For the Shimano Steps motor both the frequency divider method and the speed clamping derestricting method worked really well though with the frequency dividing my auto DI2 shifting bounced between gears endlessly. Placing the magnet on your crank does not work with the Steps motor and throws an error which is kind of annoying to clear. Just a quick question Doesn't using a flip flop instead of the arduino result in the magnet being on for one full revolution the off for one increasing your overall power consumption?
May 25, 20178 yr Is there a reason that you don't simply cut the existing sensors wire and send the output through this device straight to the controller, like this? Also, I notice that there's no pull-up/down resistor on the hall signal and no capacitors to reduce noise and ripple. The controller must have those on its pcb, but that's downstream of this. Do you think it would be a good idea to include some?
May 25, 20178 yr Author Is there a reason that you don't simply cut the existing sensors wire and send the output through this device straight to the controller, like this? Also, I notice that there's no pull-up/down resistor on the hall signal and no capacitors to reduce noise and ripple. The controller must have those on its pcb, but that's downstream of this. Do you think it would be a good idea to include some? [ATTACH=full]19389[/ATTACH] But then i'm modifying my bike right? I want a non intrusive way of de restricting. This way it can be easily removed. Theres a pull up resistor and capacitor built onto the hall effect sensor board.
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.