![]() | ![]() | ![]() |
| | #1 |
|
I have built a speedometer and gear indicator for my Suzuki motorcycle using a pic 16F876. That's is a simple circuit using 20 mhz clock. The speedometer signal come from VSS (vehicle speed signal) and goes direct to the pic pin and the signal from GPI (gear position indicator), which is a voltage, goes to another pin through a voltage divider. It's working but not very well because when I start the engine the readings are not steady. Does anyone could help me with this issue? Thanks | |
| |
| | #2 |
|
What is the power source to the chip? Does it work sometimes but not all the time? Or is it not not doing what you want (unstable all the time)? If it is not doing what you want, I would upload the schematic and code. I did a tag flip project on unlawfulintentions.com (could not find the link). The noise from the alternator and cell phones (Nextel) in the tail of the bike made the microcontroller do weird stuff some times. A capacitor will fix that. If you list more details someone here will help you. | |
| |
| | #3 |
|
Try inserting a few seconds delay at the beginning of the PIC code assuming the PIC is powered at moment of engine start. Is the display erratic or just the actual speed values? | |
| |
| | #4 |
|
It's working well on the bench but it's unstable installed in the bike and it's getting worse when the engine start. I've tried to add a higher value capacitor before and after of the LM 7805 but did not fix it.
| |
| |
| | #5 |
|
Try inserting a few seconds delay at the beginning of the PIC code assuming the PIC is powered at moment of engine start. I'll try to do that tomorrow... Is the display erratic or just the actual speed values? The readings on display are unstable even with no speed the readings going crazy almost all the time (it's not accurated). | |
| |
| | #6 |
|
Is the VSS going to a normal input rather than a schmitt trigger input? Mike. | |
| |
| | #7 | |
| Quote:
| ||
| |
| | #8 | |
| Quote:
| ||
| |
| | #9 | |
| Quote:
I'm using a Proton+ Basic Compiler. | ||
| |
| | #10 |
|
Is the pic working OK, but the readings are wacked out? Can you blink an LED and see if the pic is stable. That way you which direction to trouble shoot in. | |
| |
| | #11 | |
| Quote:
| ||
| |
| | #12 |
|
I will post the routine I've made to read the speed later on. Thank you very much for the help | |
| |
| | #13 |
|
DEVICE 16F876A DECLARE XTAL 20 DECLARE LCD_TYPE 0 DECLARE LCD_DTPIN PORTB.4 DECLARE LCD_ENPIN PORTB.2 DECLARE LCD_RSPIN PORTB.3 DECLARE LCD_INTERFACE 4 DECLARE LCD_LINES 2 DIM KMH AS word DIM KMHT AS WORD Delayms 2000 CLS Start: KMHT=COUNTER PORTA.5, 250 KMH=((0.002*3600)*(KMHT*4))/1000 ALL_DIGITAL=TRUE PRINT AT 1, 1, " " PRINT AT 1, 1, DEC KMH PRINT AT 1, 5, "KM/H" GOTO Start Anyone can help? I think there is something wrong with this code because I have ran it on the computer and the problem I mentioned before still happening, the reading is not reliable (goes high and low). | |
| |
| | #14 | |
| Quote:
Mike. | ||
| |
| | #15 | |
| Quote:
| ||
| |
|
| Tags |
| speedometer |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| digital speedometer using AT90S2313 | fever | Micro Controllers | 57 | 29th January 2008 07:45 PM |
| Speedometer Project Help | ADAM117 | Electronic Projects Design/Ideas/Reviews | 2 | 8th December 2006 06:00 PM |
| Pulse divider for a Speedometer | spestis | Electronic Projects Design/Ideas/Reviews | 3 | 25th July 2006 03:17 AM |
| Tachometer and Speedometer replies | Kiko | Micro Controllers | 0 | 26th April 2004 01:57 AM |
| Electronic Speedometer using stepper motor | roryp | General Electronics Chat | 6 | 10th April 2003 01:06 PM |