Searching \ for 'Pics, Pin Multiplexing and Tiny Car Computer' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Pics, Pin Multiplexing and Tiny Car Computer'.

Truncated match.
PICList Thread
'Pics, Pin Multiplexing and Tiny Car Computer'
1999\03\10@114639 by Nuno Pedrosa

flavicon
face
I have drawn a schematic for that small Car Computer that I'm always
planning on doing,
based on what I learned here.
I would like to use just one IC, the 16f84.
I haven't built the circuit, yet. But it should be done soon.
Meanwhile, I have this little doubts:

Using my (very) little knowledge on electronics, and the references on
the
appnotes, I think this is possible. It's supposed to be a Voltmeter,
used
to measure the battery level, with 0.5V accuracy.
I didn't draw the VDivider, to reduce 0V to 15V into 0V to 5V.

     V -/\/\/\----+----/\/\/\---- RA3
         2KR      |     100R
                -----
                -----
                  |
                 GND

And a Piezo Driver, using the RA4 pin.
Can I drive it like this, with no extra-pullup?

     12V
      |   2K
      `-/\/\/\-.
               |
          |\_  |
          |  |-`----- RA4
          | _|-.
          |/   |
              GND

As for the keyboard and displays, I used the technique you described.
I have RB3-RB0 and A0 connected to the PNP transistors.

The keyboard is connected Columns to RB7-RB4, Rows to RB3-RB0.
I have diodes in all the keyboard lines, cathode turned to the PIC.

BTW, anode and cathode are like this, right?

         |\|
 anode --| |-- cathode
         |/|


Thank you,
Nuno Pedrosa.

PS: BTW, if someone is interested, I can mail the schematic (still
untested!).
  I drew it in Word6.0, since I haven't a CAD package installed now.
  I'll draw it later, in Eagle Lite [The hobby version, no crack! 8) ].

--
----  ~~~~~~~  -------  Nuno Filipe Freitas Pedrosa
--  ~~~~     ~~  -----  SIEMENS S.A. Portugal       TEL: +351 1 4242454
-  ~~~~       ~~  ----  spam_OUTNuno.PedrosaTakeThisOuTspamoen.siemens.de
-  ~~~~       ~~  ----  "MSWindows - Best run on a SlideShow"
=======================================================================

1999\03\10@115926 by Ian Cull

picon face
Have you looked at the new PIC16C54HV (?) which has direct 12V connection
capability and built-in regulators ... it might further reduce the external
circuitry.

Ian C.

1999\03\10@124516 by Wagner Lipnharski

picon face
> I didn't draw the VDivider, to reduce 0V to 15V into 0V to 5V.
>
>      V -/\/\/\----+----/\/\/\---- RA3
>          2KR      |     100R
>                 -----
>                 -----
>                   |
>                  GND

What strange way to divide voltage, except if you are
talking about AC, mostly high frequency. For DC, the
capacitor doesn't divide anything with the 2KR.

Ok, here goes a little bit of Ohm's Law:

The correct way is:

   +Vin (15V)
   |
   R1 = 2/3 (R1+R2) 15k
   |
   +----o Vout = 1/3 (Vin)
   |
   R2 = 1/3 (R1+R2) 7k5
   |
  Gnd

The simple voltage dividing formula is:

            Vin
Vout =   -------------
        ( R1/R2 + 1 )


This formula derives from this one:

The voltage across R2 (VR2) is the result of the multiplication
between R2 Resistance in Ohms and the Current that crosses
it. The current (I) is the result of the division of the VIN
by the total circuit resistance R1 + R2.  Using this two
expressions together you have:

VR2 = I x R2   and    I = Vin / (R1+R2)

Changing I by Vin/(R1+R2) you have

        Vin                         R2
VR2 =  ------- x R2    or   Vin x  -------
      R1 + R2                     R1 + R2


or MMC

               R2/R2                       1
VR2 =  Vin x -------------   =   Vin x  ----------
            R1/R2 + R2/R2              R1/R2  + 1

or
                R2
VR2  =  Vin x ( ---- + 1)
                R1


--------------------------------------------------------
Wagner Lipnharski - UST Research Inc. - Orlando, Florida
Forum and microcontroller web site:   http:/http://www.ustr.net
Microcontrollers Survey:  http://www.ustr.net/tellme.htm

1999\03\10@131357 by Nuno Pedrosa

flavicon
face
Huh... Thanx! 8)
But, what I said that I _didn't_ draw the VDiv. It's simply not in this
picture. 8)

What is in this picture, is the RC used in some AppNote to measure R.
The idea is simple.

Zero Register Counter.
Discharge Cap putting RA3 as Output Low.
Set RA3 to Input
Increment Counter.
Voltage on Cap is High?
Nope. Goto Increment.
Yep. Check Table for Counter Value to get Voltage.

I don't expect a lot. 0.5V accuracy should be enough.
I can't use the TMR0, because I'll be keeping a clock, also.

As for the part, I'll use the 16f84, because it's cheap, I have the
programmer, and I don't have a UV eraser.

Now, if you could give some insight on how to calculate the time that
the Cap needs to get charged...
That's something I don't know. I know it's some kind of logarithm, but
that's all.

Thanx,
Nuno.


Wagner Lipnharski wrote:
{Quote hidden}

--
----  ~~~~~~~  -------  Nuno Filipe Freitas Pedrosa
--  ~~~~     ~~  -----  SIEMENS S.A. Portugal       TEL: +351 1 4242454
-  ~~~~       ~~  ----  .....Nuno.PedrosaKILLspamspam@spam@oen.siemens.de
-  ~~~~       ~~  ----  "MSWindows - Best run on a SlideShow"
=======================================================================

1999\03\10@132235 by Wagner Lipnharski
picon face
Nuno Pedrosa wrote:
> But, what I said that I _didn't_ draw the VDiv.
> It's simply not in this picture. 8)

Oh, you mean, you didn't draw the Vdiv *in the email*, not
that you are not the author of the drawing.
Now we are talking. :)
Wagner.

1999\03\11@091948 by Mike Keitz

picon face
On Thu, 11 Mar 1999 01:44:39 -0500 Wagner Lipnharski
<wagnerlspamKILLspamEARTHLINK.NET> writes:

>This is getting out of hand I think.
>Using a charge capacitor ramp with time control and more things
>just to measure a voltage that could be done using a couple of
>inexpensive resistors???

We're talking about a 16F84, which has no ADC.  If you have a PIC with
ADC, then definitely use a voltage divider into an ADC input.

The circuit I described is real simple, just two (or maybe one) resistors
and one capacitor.  The original poster wanted to use two more resistors
as a voltage divider.


>Not talking that the transient current at the capacitor
>discharge via the port pin could be high enough to damage the
>internal fet due the repetition cycles. Suppose the capacitor
>is 0.01uF as suggested, and the internal fet resistance is
>something around 1 Ohm while sinking to ground, the RC
>period will be 10ns conducting a transient current that
>initially will be 5 Ampers!!!

The initial current will be the same regardless of the size of the
capacitor (unless the capacitor is so small that it discharges some
before the FET turns on fully).  The question is whether the energy
dissipated by the PIC will be enough to cause damage.  Since there isn't
a real clear definition on that, it would be best to use a limiting
resistor.

>The idea of using the capacitor could be entitled as "automatic
>range voltage divider" but will involves linerization tables or
>calculations if not using a constant current to charge a very
>stable and $$$ capacitor as polypropilene or polyester.

The simple single-slope method depends on the capacitor's value being
known and stable.  Compensation of some sort would be essential for any
"precise" measurements.

The result is more linear not using a voltage divider than using it,
especially as the input voltage increases.  If you were measuring
hundreds of volts this way, the result would be quite linear because the
slight change in capacitor voltage would barely affect the resistor
current.



___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...