scangauge type display?
#43
Elite Member
iTrader: (2)
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,604
Total Cats: 16
I was wondering if someone could help me. I got my 5v regulator and was testing it today and it doesnt seem to be regulating voltage. I put 12v on the inlet, grounded it, and it reads 12 on the outlet.
I bought the LM2940T-5.0-ND from digikey
http://www.national.com/ds/LM/LM2940.pdf
When i first tested it I did not have the tab grounded. Did I fry it?
I bought the LM2940T-5.0-ND from digikey
http://www.national.com/ds/LM/LM2940.pdf
When i first tested it I did not have the tab grounded. Did I fry it?
#44
Shouldn't have, if you don't have a circuit you don't have current flow. You could hook one leg up to 500v and if there isn't a path to ground it can't go anywhere. It should show 5v even with no load on it though, so there's a good chance its bad, did you touch the output to 12v while you had 12v on the input? Thats the only way I figure you could hurt it, but even then it might not, depends on how its designed.
#47
Do you recall the values of the 3 resistors you used for the buttons? I might as well try to stick to the same ranges.
Basic Block diagram:
Supporting docs:
Display datasheet, includes overview, pinout, etc...
Low dropout 5V reg
RS232 transceiver (i was very lazy and bought somthing prefabbed, future improvement would be to layout everything on a single board etc...)
Like i said before its worth looking at the 4d website if your interested in the displays, its has a reference for the coding langauge etc...
4D Systems, Research and Development
The whole thing cost less than $100 AUD to make.
Supporting docs:
Display datasheet, includes overview, pinout, etc...
Low dropout 5V reg
RS232 transceiver (i was very lazy and bought somthing prefabbed, future improvement would be to layout everything on a single board etc...)
Like i said before its worth looking at the 4d website if your interested in the displays, its has a reference for the coding langauge etc...
4D Systems, Research and Development
The whole thing cost less than $100 AUD to make.
#48
When you start digging this is where all the lazyness comes out...
I can't remember the values used but for two switches I'd set it up like this to take advantage of the whole ADC range:
No button pressed = 3.3V
Up button pressed = 3.3V / 2
Down button pressed = 0V
Change the constants in the code to something like:
Could probably change the constant names to something more descriptive too :/
Also the code reading the switches is abit **** and could be improved with faster sampling, some debouncing etc...
Running the analogue multiplex over the clock spring was a really bad idea, it was sometimes intermittent at different wheel positions and there is no cleaning current through the spring contact so I think it would get even worse over time.
Would be fine if you gave up having the buttons on the wheel and just dash mounted them.
I can't remember the values used but for two switches I'd set it up like this to take advantage of the whole ADC range:
No button pressed = 3.3V
Up button pressed = 3.3V / 2
Down button pressed = 0V
Change the constants in the code to something like:
Code:
#constant SWITCH_1_ADC_LOW 0 #constant SWITCH_1_ADC_HI 26 #constant SWITCH_2_ADC_LOW 102 #constant SWITCH_2_ADC_HI 153
Also the code reading the switches is abit **** and could be improved with faster sampling, some debouncing etc...
Running the analogue multiplex over the clock spring was a really bad idea, it was sometimes intermittent at different wheel positions and there is no cleaning current through the spring contact so I think it would get even worse over time.
Would be fine if you gave up having the buttons on the wheel and just dash mounted them.
#49
No problem on the code, it provided a great starting point. I've already rewritten the switch and serial polling stuff. Waiting for more parts to build the display so I can test the code.
I'm using dedicated buttons, so no problems with steering wheels contacts. I'm going to attempt 4 functions from the ADC. Up/Down, "Both" for some future option, and "key off" to safely power down the display (provided it doesn't draw too much in this 0-contrast non-communicating state to just power the unit continuously off the car battery)
I'm using dedicated buttons, so no problems with steering wheels contacts. I'm going to attempt 4 functions from the ADC. Up/Down, "Both" for some future option, and "key off" to safely power down the display (provided it doesn't draw too much in this 0-contrast non-communicating state to just power the unit continuously off the car battery)
#50
I've already rewritten the switch and serial polling stuff.
I was going to do a shutdown routine this way:
http://4d.websitetoolbox.com/post?id=5119921
But I think for a regularly driven car the key off load of the blank display would be pretty much negligible. Any method would be better than none, which is what the code does now.
#51
Elite Member
iTrader: (2)
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,604
Total Cats: 16
I would like to see the shutdown method. I am waiting on a few more parts and then I am going to start bench testing / messing with programs.
I think I may make a ADC switch toggle from gauge display to large numerical display...if the screen has enough room for the program.
I think I may make a ADC switch toggle from gauge display to large numerical display...if the screen has enough room for the program.
#55
Of course
Yes, I'll post the code once I'm happy with it (if the parts ever arrive!)
Would you mind posting up your improvements so others can benefit? Might also stimulate some good technical discussion in this thread.
I was going to do a shutdown routine this way:
http://4d.websitetoolbox.com/post?id=5119921
But I think for a regularly driven car the key off load of the blank display would be pretty much negligible. Any method would be better than none, which is what the code does now.
I was going to do a shutdown routine this way:
http://4d.websitetoolbox.com/post?id=5119921
But I think for a regularly driven car the key off load of the blank display would be pretty much negligible. Any method would be better than none, which is what the code does now.
#56
Elite Member
iTrader: (2)
Join Date: May 2007
Location: Cromwell, Connecticut
Posts: 2,604
Total Cats: 16
Yeah I am still waiting on my programing cable. I forgot to order it originally and I was too cheap to do FEDEX.
I am going down to my parents house tomorrow after work to grab my bread board so i can start building the circuits.
I am going down to my parents house tomorrow after work to grab my bread board so i can start building the circuits.
#57
It lives!! Now I'm trying to understand what the tables mean. Are the temp values in C or F? Where did the table values come from anyway? They don't appear to match the Megaview tables.h file. Is translating to real-world values documented somewhere besides just buried in megasquirt/megaview source code?
#58
It lives!!
Now I'm trying to understand what the tables mean. Are the temp values in C or F?
Where did the table values come from anyway?
Its standard NA MX5 Air and Coolant temp sensors, with the pullups in the OEM ECU.