Dual 7-Segment LED Display


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    7-segment LED Displays can display a limited number of alpha characters - 'E' being one of them. The problem is when you want to display characters that contain diagonals like 'K' or 'M' or 'Z', and then you need a 'starburst' LED display, but unfortunately you then also need to drive far more segements.

    There usually isn't a segment 'H' on 7-segment LED's unless you're counting the Decimal Point that's normally found on them.

  2. #2
    Join Date
    Jul 2007
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    Good stuff, Thanks.

    I have not at all coded before and I just got PBPro.

    I have got this so far to flash an LED on and off

    LED_F: 'LED Flash loop begins here
    if X0 <= 5 then
    LED = 1 'Turns on the warning LED
    pause 500 'Pause 1/2 second with LED on
    LED = 0 'Turns off warning LED
    pause 750 'Pause 3/4 second with LED off
    X0 = X0 + 1 'This adds 1 to variable X0 each time it loops
    goto LED_F 'Returns to begining of LED Flash loop
    else
    LED = 0 'Makes sure LED is off
    X0 = 0
    REturn 'Returns to main code

    Let me know if that would work. Also I am kind of in a bind here trying to figure out how to decipher the input from the knock sensor. Knock sensors are piezo capacitive or something like that, basically they generate small amount of voltage (~2-5mV) from vibration, and generate spikes in the signal when 'knocked' on for lack of better terms. So its an analog signal, and I need to make this thing be able to see the spikes, count them and display on the LED Segments.

    Analogy for Knock sensor (begin)
    Think of the sensor as a doctor with a stethoscope, the doctor listens and hears your heartbeat crisp and clear, when some other sounds are in there its not normal and the doc says "hey there is a problem."

    Same thing for the knock sensor, except it doesnt want to hear a heartbeat, just a smooth nice low vibration of the engine running, now when it hears other sounds the car's engine managment system says "hey there is a problem"
    Analogy for Knock sensor (end)

    When that happens, it pulls timing back, driver experiences a hesistation (lack of power), and it usually, when no damage has been done, picks back up and moves along


    Voltage comparator or AD Converter?

    -Eric
    Last edited by erice1984; - 1st July 2007 at 09:18.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Have you ever put a 'scope on a knock sensor?
    Small signals indeed. You'll probably need to amplify them quite a bit, filter out the noise, determine what is steady state for your particular application (then have to redetermine what is steady state over a wide range of temperature's, fuels, driving conditions, etc.etc.), and I could go on and on...
    Vehicle's have high speed DSP's in them for a reason, one of them to determine if the engine is knocking or not. A PIC generally can't handle this sort of job (read that as needing some sort of high speed FFT) without external help (fairly tight bandpass filters, amplifiers, etc). Knock sensors are generally sensitive to the 2-3khz range, which is what abnormal combustion resulting in knocking GENERALLY sounds like, but during normal combustion, these sensors are also putting out some voltage. It also depends on how tightly it's put in. Too tight and it's too sensitive, too loose, not sensitive enough. The torque value on the knock sensor for my Nissan is 18ft-lbs...not much at all. And the service manual specifically states 18ft-lbs in big bold lettering with a warning talking about how doing it by feel won't be nearly good enough for the ECM.
    Not saying it can't be done...Anything's possible. But, without a 'scope, and/or good baseline data vs. good knocking data, in the first place, I don't see anything useful coming out of this, especially if you're messing with a computerized engine. How would a person get it to knock? On the old engines, just turn the distributor a bit, disconnect the EGR valve, create a vacuum leak to lean it out and power brake it, something like that...but today, short of forcing an ECM into a 'limp home' mode, I don't see how you can get it to knock reliably to get a decent reading on it. Not to mention that today's engines run on the ragged edge of knocking as it is... A little bit of knock is ok, a very little bit. In fact, most engines will knock just a tiny bit under part-throttle acceleration. And, one of the more important things...if you are retro-fitting an engine that didn't come with a knock sensor and were just going to plug one into a freeze plug hole or onto a bolt head...blocks and knock sensors are designed to work together. You can't just go slapping a knock sensor into any old hole and expect it to go 'BAM, it's knocking'.
    At any rate, what's the end application? Maybe it can work...anything's possible...
    Also, for the sake of ease, I'd lose the 7-segment LED and get a cheap 8 character LCD. A lot easier to work with in PBP (built-in commands), fewer wires/connections, less processing power, about the same price if you get a couple on eBay, and you can display more info.
    Last edited by skimask; - 1st July 2007 at 09:11.

  4. #4
    Join Date
    Jul 2007
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    between shifts at higher rpm most engines will knock a little bit, also tapping near the sensor to get a response. The engine is a 4G63 motor in my friends EVO 8.

    Reason for the seg-LED is this is all he wants on it. Also it is smaller than using LCD, I know code is going to be longer but I guess that is a trade off, and all the PIC is going to be used for.

    8MHz clock isnt fast enough?

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by erice1984 View Post
    between shifts at higher rpm most engines will knock a little bit, also tapping near the sensor to get a response. The engine is a 4G63 motor in my friends EVO 8.

    Reason for the seg-LED is this is all he wants on it. Also it is smaller than using LCD, I know code is going to be longer but I guess that is a trade off, and all the PIC is going to be used for.

    8MHz clock isnt fast enough?
    EVO 8 - not going to spend much time doing part-throttle acceleration is it?
    8Mhz not fast enough? - most likely not, but I think your main limitation is going to be the speed of the A/D converter.
    Are you tapping into the existing knock sensor line? Can you tap on the block and watch the timing back off or what?

  6. #6
    Join Date
    Jul 2007
    Posts
    74


    Did you find this post helpful? Yes | No

    Default

    thats the interesting part, if you grab a screw driver and tap very close to the sensor it picks up small stuff, drop the hood closed about 18" up and you will see readings.

    and yes, tapping into the exsisting signal wire.

    What if it was run at 20MHz ?

    Yeah he doesn't spend much time at part-throttle, mostly easy driving, but on ramps and such its WOT. Same with me usually, I got a swapped GC Impreza (2000 2.5rs) with a 2002 wrx motor (EJ205) Did all the wiring myself so I have mastered diagrams, not to mention I am going to school for auto engineering, and already graduated from UTI auto technician.
    Last edited by erice1984; - 2nd July 2007 at 04:32.

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by erice1984 View Post
    thats the interesting part, if you grab a screw driver and tap very close to the sensor it picks up small stuff, drop the hood closed about 18" up and you will see readings.
    What are you measuring with?

    [QUOTE]What if it was run at 20MHz ?[QUOTE]
    A/D converter speed doesn't care about oscillator speed, well, not really. The A/D converter will only run as fast as it will run, doesn't matter how fast you run the oscillator.
    The older A/D converters will 'only' run at about 20ksps, the new ones around 100ksps. Problem is, once you get up to those speeds, you're going to need good filtering at the front end.

    Yeah he doesn't spend much time at part-throttle, mostly easy driving, but on ramps and such its WOT.
    What I meant was, it's an EVO-8...probably a hot rod, street racing, etc.etc...

    So, write some code, try it out, see what happens, come back with questions....

Similar Threads

  1. Conway's Game Of Life
    By wellyboot in forum mel PIC BASIC Pro
    Replies: 45
    Last Post: - 28th May 2020, 06:14
  2. Single digit 7 Seg LED clock - PIC16F88
    By thirsty in forum Code Examples
    Replies: 4
    Last Post: - 17th July 2009, 08:42
  3. Weird compile issue 7 segment LED display
    By George in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st June 2006, 02:12
  4. 7 segment digit problem (using Mister E's code)
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 9th September 2005, 20:25
  5. WRITE not working
    By servo260 in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 29th December 2004, 02:02

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts