 |
By: Anonymous: PeterT () on Wednesday, June 22 2011 @ 07:03 PM PDT (Read 7023 times)
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
Hi DoctorsEvil, Evil R & Dastardly Evil.
I need to build a GPI (Gear Position Indicator) using 2off 7segment LED's.
I have 28 gears, which translates into 11 switches (4 front/7 rear), & I am using proximity switches to say where each gear is, but I know nothing about programming chips or things.
Are you able to assist in either someone doing the code & circuit, or in directing me towards others who can assist me?
Thanx
PeterT
|
|
|
|
|
|
 |
By: karlgg (offline) on Wednesday, June 22 2011 @ 10:16 PM PDT
|
|
|
karlgg |
| karlgg |
|
What sort of sensors are you planning on using, exactly? Do you already have experience with electronics, just not the microprocessor? The circuitry (and related hardware) to reliably detect which gears are where will be more work than the actual programming to display the results.
I think I am, therefore I am... I think
|

Mad Scientist
 Status: offline
Registered: 01/25/09 Posts: 81
|
|
|
|
|
 |
By: Anonymous: PeterT () on Thursday, June 23 2011 @ 05:49 AM PDT
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
I have a better than basic understanding of circuits; ie I can build from schematics etc, just haven't learnt the chip side of 'tronics YET!
The switches are proximity/magnetic pick-up sensors 6.35mm/1/4" or similar, to show where the front & rear bicycle derailleurs are positioned, the 'clock' containing both the digital speedometer & the GPI is on the console with wiring looms connecting switches to display.
The 'clock' is housed in an old school bike light housing, with the 4-digit speedo centred & the GPI beneath the speedo.
If possible, I would also like to add a RPM display above the speedo, but one that will work with the cadence of a pushbike, not a car!
Thanx
PeterT
|
|
|
|
|
|
 |
By: squall_line (offline) on Thursday, June 23 2011 @ 06:14 AM PDT
|
|
|
squall_line |
| squall_line |
|
Why not just build the sensor system into the gear change mechanisms near the handlebars themselves, instead of putting them near the derailleurs? It seems a little bit excessive to install 11 Hall-effect-type sensors near the moving parts of the bicycle when you could just as easily put one position sensor on each gear change mechanism.
As far as RPM counters, you should be able to use a bike speedometer, attach it to the frame near the pedals, and put the magnet on the main sprocket to be able to count RPMs. Also, a number of companies make cadence displays, and they work and look almost the same as a bicycle speedometer as I described in the previous sentence.
|

Mad Scientist
Status: offline
Registered: 04/13/10 Posts: 96
Iowa, USA
|
|
|
|
|
 |
By: Anonymous: PeterT () on Thursday, June 23 2011 @ 12:11 PM PDT
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
Thanx for your reply.
The reason(s) I am not placing the sensors near the shifters is because I have to use the old school friction shifters to change the front gears, I have made a custom built 4 gear front chainring & gear cable can be stretched over time. The actual position of the derailleur cage never changes in regard to aligned gearing.
Another reason is 'cos I don't know that much about electronics, I don't have an accurate understanding of the different types of switching available, so am working to the best of my understanding regarding bits to put into the circuitry I want.
Cyclocomputers are too small to read at higher speeds due to their size & using LCD screens and due to my quadcycle being a recumbent, the angle of the cyclocomputer makes it even dodgier to read.
Hence the wanting to build a 'clock' the has 7 segment LED displays for RPM, Speedometer & GPI.
Will post a pic for you of my 'clock' when I get my camera working.
Thanx
PeterT
|
|
|
|
|
|
 |
By: Anonymous: PeterT () on Sunday, June 26 2011 @ 05:42 PM PDT
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
I guess what I am actually asking is how would I write a code to go into a PIC chip to show how each gear indicates its position on the LED's.
I have figured out how to write the binary code for the numbers 1-28 & I know how to wire the LED's but the rest of it is beyond my understanding of electronics. can anyone please help?
|
|
|
|
|
|
 |
By: karlgg (offline) on Tuesday, June 28 2011 @ 03:12 AM PDT
|
|
|
karlgg |
| karlgg |
|
First you need to figure out how many I/O ports your particular model has (or what you're intending to have)... For so many inputs, the first thing that comes to my mind is using a multiplexer or two. But I'm afraid I might be over-complicating things, so I'm going to suggest you wait for other suggestions.
I think I am, therefore I am... I think
|

Mad Scientist
 Status: offline
Registered: 01/25/09 Posts: 81
|
|
|
|
|
 |
By: squall_line (offline) on Tuesday, June 28 2011 @ 06:14 AM PDT
|
|
|
squall_line |
| squall_line |
|
Well, see, here's the thing...
A "28-speed" bike has 28 gear combinations, but not "Speeds 1-28".
That is, if you consider your current gear as "front_gear * rear_gear", you can select:
1-2-3-4-5-6-7
2-4-6-8-10-12-14
3-6-9-12-15-18-21
4-8-12-16-20-24-28
Which gets you 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, and 28, for a total of 19 out of 28 numbers.
Of course, keep in mind the limits of lateral chain travel with respect to the deraileurs (dont' want to actually be in 1 on front and 7 on rear), and keep in mind that not every same-numbered gear combinations will necessarily have the exact same ratio (although they will likely be close).
So, that said, is your intent really to just multiply the front gear by the rear gear and put the result on a binary display?
|

Mad Scientist
Status: offline
Registered: 04/13/10 Posts: 96
Iowa, USA
|
|
|
|
|
 |
By: Anonymous: PeterT () on Tuesday, June 28 2011 @ 04:53 PM PDT
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
Thanx again for replies!
I would like a display that shows the following, forgive me if I get terminology wrong as I normally work with metal & woods stuff....
Gears (switches) 1,2,3,4 have gears (switches) 5 -11 in common
Gear 1 can only be displayed with the first 7 gears so:
gear 1 AND gear 5 can only read as '1'
gear 1 AND gear 11 can only read as'7'
gear 2 AND gear 5 can only read as '8'
gear 2 AND gear 11 can only read as '14'
gear 3 AND gear 5 can only read as '15'
gear 3 AND gear 11 can only read as '21'
gear 4 AND gear 5 can only read as'22'
gear 4 AND gear 11 can only read as '28'
Because the chainline is over 3 standard chain lengths, my quadike (quadbike) F-RQ Fast Recumbent Quad is 2040mm between wheel centres, I can easily get the chain to run on gear 1 front & gear 7 rear or gear 4 front & gear 1 rear.
thanx again
PeterT
|
|
|
|
|
|
 |
By: squall_line (offline) on Wednesday, June 29 2011 @ 05:38 AM PDT
|
|
|
squall_line |
| squall_line |
|
I'm even more lost now than I was before because it sounds like you're saying something similar to what I was, but then not really.
Do you want to have a separate binary display for the front gearset, and a separate display for the rear, or do you want a binary display of the result of multiplying the front gearset by the rear gearset?
|

Mad Scientist
Status: offline
Registered: 04/13/10 Posts: 96
Iowa, USA
|
|
|
|
|
 |
By: Anonymous: PeterT () on Wednesday, June 29 2011 @ 06:12 AM PDT
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
Thanx squall
What I want is a 2 digit 7segment LED display that shows 1-28 sequentially, operated by using 11 switches in total ... 4 switches having 7 switches in common.
LED 1 showing digits LED 2 showing tens
In my last post I showed how the switches work with the sum of the switches, eg: switch 1 & switch 5 can only show a 1 on the LED's. Switch 1 & switch 6 can only show a 2 on the LED's, switch 4 & switch 11 can only show 28 on the LED,s etc.
Using the smallest front gear with the largest rear gear is known as your 1st gear and similarly using your largest front gear with your smallest gear is known as your highest gear, so as my F-RQ Fast Recumbent Quadbike has 28 gears, 4 front & 7 rear, I need a gpi that reads1-28.
You may be confused by thinking I want the switch set multipied together, or by thinking I wanted combinations of the gears (switches).
Thanx
PeterT
|
|
|
|
|
|
 |
By: squall_line (offline) on Wednesday, June 29 2011 @ 06:37 AM PDT
|
|
|
squall_line |
| squall_line |
|
Quote by: PeterTThanx squall
What I want is a 2 digit 7segment LED display that shows 1-28 sequentially, operated by using 11 switches in total ... 4 switches having 7 switches in common.
LED 1 showing digits LED 2 showing tens
Oh... 7-segment displays. That makes MUCH more sense actually.
Quote by: PeterT
In my last post I showed how the switches work with the sum of the switches, eg: switch 1 & switch 5 can only show a 1 on the LED's. Switch 1 & switch 6 can only show a 2 on the LED's, switch 4 & switch 11 can only show 28 on the LED,s etc.
Using the smallest front gear with the largest rear gear is known as your 1st gear and similarly using your largest front gear with your smallest gear is known as your highest gear, so as my F-RQ Fast Recumbent Quadbike has 28 gears, 4 front & 7 rear, I need a gpi that reads1-28.
You may be confused by thinking I want the switch set multipied together, or by thinking I wanted combinations of the gears (switches).
Thanx
PeterT
Actually, I'm confused as to why you DON'T want to multiply the front gearset by the rear gearset.
Isn't Front1-Rear7 a higher gear ratio than Front2-Rear1? Similarly, isn't Front1-Rear4 a similar gear ratio to Front4-Rear1 and Front2-Rear2? While I'm not a professional cyclist, it seems to me that a display of the relative gear ratio would provide more quality information than a display of the absolute gear positions (never mind the absolute gear positions should be fairly obvious from the position of the shifters).
If you truly want it to count 1-7, 8-14, etc., your formula would be: (7 * (Front-1)) + Rear. So, F1,R1 would be 7 * (1-1) + 1 = 7*0+1 = 0+1 = 1. F3,R3 would be 7 * (3-1) + 3 = 7*2+3 = 14+3 = 17.
Again, to me, as an amateur cyclist and someone with a mechanical mind, the overall gear ratio is usually a more useful piece of knowledge to have, which is why I suggested Front*Rear
|

Mad Scientist
Status: offline
Registered: 04/13/10 Posts: 96
Iowa, USA
|
|
|
|
|
 |
By: Anonymous: PeterT () on Wednesday, June 29 2011 @ 06:51 AM PDT
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
My bad! Oops!
I re-read my previous post & confused myself!
Should read:
Switches 1-4 have switches 5-11 in common
Gear 1 can only work with gears 5-11
For clarity gears/switches are labelled as follows:
front switches 1,2,3,4
rear switches 5,6,7,8,9,10,11
switch 1 & switch 5 is 1st gear hence a 1 on the LED's
switch 1 & switch 6 is 2nd gear hence a 2 on LED's
switch 1 & switch 7 is 3rd gear hence a 3 on LED's
...
...
switch 1 & switch 11 is 7th gear hence a 7 on LED's
switch 2 & switch 5 is 8th gear hence an 8 on LED's
switch 2 & switch 6 is 9th gear hence a 9 on LED's
...
...
switch 2 & switch 11 is 14th gear hence 14 on LED's
switch 3 & switch 5 is 15th gear hence 15 on LED's
...
switch 3 & switch 11 is 21st gear hence 21 on LED's
switch 4 & switch 5 is 22nd gear hence 22 on LED's
...
switch 4 & switch 11 is 28th gear hence 28 on LED's
sorry for confusion
PeterT
|
|
|
|
|
|
 |
By: squall_line (offline) on Wednesday, June 29 2011 @ 07:12 AM PDT
|
|
|
squall_line |
| squall_line |
|
Then your formula would be (7 * (Front-1)) + (Rear-4).
When people talk about "nth" gear, higher numbered gears relate to higher gear ratios. In a car, 5th gear is ALWAYS a higher gear ratio than 1st, 2nd, 3rd, and 4th.
Which is why it still doesn't make any sense to me why you would want to display "6" for 1,10 and "8" for 2,5, when "6" by your formula is actually a higher gear ratio than "8" in your formula. By definition, they can't be "6th gear" and "8th gear".
In which case, if you're only worried about the relative switch positions, you should just use the two digits on the display to show the individual gear selections, separated by a comma, so your display would be 1,1 through 1,7; 2,1 through 2,7; 3,1 through 3,7; and 4,1 through 4,7.
IMNSHO
|

Mad Scientist
Status: offline
Registered: 04/13/10 Posts: 96
Iowa, USA
|
|
|
|
|
 |
By: Anonymous: PeterT () on Wednesday, June 29 2011 @ 07:14 AM PDT
|
|
|
Anonymous: PeterT |
| Anonymous: PeterT |
|
|
|
|
|
|
|
|