ie1206 embedded electronics
play

IE1206 Embedded Electronics PIC-block Documentation, Seriecom Pulse - PowerPoint PPT Presentation

IE1206 Embedded Electronics PIC-block Documentation, Seriecom Pulse sensors Le1 Le2 I , U , R , P , serial and parallel Le3 Ex1 KC1 LAB1 Pulse sensors, Menu program Start of programing task Kirchhoffs laws Node analysis Two-terminals


  1. IE1206 Embedded Electronics PIC-block Documentation, Seriecom Pulse sensors Le1 Le2 I , U , R , P , serial and parallel Le3 Ex1 KC1 LAB1 Pulse sensors, Menu program • Start of programing task Kirchhoffs laws Node analysis Two-terminals R2R AD Ex2 Le4 KC2 LAB2 Two-terminals, AD, Comparator/Schmitt Le5 Ex3 Transients PWM Le6 Ex4 Le7 KC3 LAB3 Step-up, RC-oscillator Phasor j ω PWM CCP CAP/IND-sensor Ex5 Le8 Le9 LC-osc, DC-motor, CCP PWM KC4 LAB4 Le11 Ex6 Le10 LP-filter Trafo Display Le12 Ex7 • Display of programing task Trafo, Ethernet contact Le13 Written exam William Sandqvist william@kth.se

  2. How to measure pulses? To measure various digital ? pulses is one of the PIC processor main tasks William Sandqvist william@kth.se

  3. William Sandqvist william@kth.se

  4. • Pulses from numerous sensors Numerous sensors have their output in the form of digital pulses: number, time, period time, frequency, duty cycle … Here are some examples : inlet outlet With the stream flow meter . The flow-ball followes the fluid and pass the photodiode each lap. The sensor is used as fuel gauge, the number of pulses from the photo- Window diode are summarized as fuel consumed. Flow-ball William Sandqvist william@kth.se

  5. eg. Number Gear meter . Fluid moves in "tooth gaps". No leaks, can measure very small amounts of liquid (the resolution is the volume of a tooth gap). Used as a fuel gauge on gasoline stations. The number of turns is a measure of liquid quantity. William Sandqvist william@kth.se

  6. Propeller and turbine Meter Pulse frequency is proportional to the flow rate. William Sandqvist william@kth.se

  7. eg. Pulse time Torque meter . When a torque is transferred with a rotating shaft, it will be sheared so that the gear wheels rotate relative to each other. It will be an a measurable time difference between the pulses from the sensor elements, ∆ t which detects teeth peaks passage. The torque can be calculated from this time difference with knowledge of the shaft torsional stiffness. William Sandqvist william@kth.se

  8. eg. Pulse time ∆ t ∆ t U t U ∝ ∆ ? D t t Laser Scan Micrometer . Measured object diameter shades the laser light. A resolution of 1 µ m is possible. ∝ ∆ D t William Sandqvist william@kth.se

  9. This is how to check camshaft tolerances in one turn! Sales man's dream: They have succeeded Computerized selling 6 units! Measuring System. William Sandqvist william@kth.se

  10. Inductive pulse sensor S e Fe S N Fe N e There are some requirements on the magnetic properties. ∆Φ ∝ e ∆ t William Sandqvist william@kth.se

  11. Control of the internal combustion engine Inductive pulse sensor Inductive pulse sensor William Sandqvist william@kth.se

  12. eg. Pulse time, number Passenger cars combustion engines: RPM Position index Coil Inductive pulse sensor Core Speed and angle are measured against a gear ("starting ring gear") with an inductive pick up. The sensor produces a pulse for each tooth top. The speed. RPM, is calculated from the pulse duration between two peaks. An "index mark" denotes the angle 0 ° . (Alternatively, a cog can be "missing" at 0°). William Sandqvist william@kth.se

  13. eg. Low pulse frequency ABS brakes . When the wheel "locks up", it releases the grip to Control monitoring the ground. This the ABS system warning detects and then "reduces" the brake pressure. Break pressure An pulse sensor is integrated in the wheel bearing and gives a pulse frequency proportional to the wheel speed. "Locked" wheel is signified by low pulse rate. William Sandqvist william@kth.se

  14. Sensors are nowadays often integrated in pure machine products Hub bearing unit with integrated ABS sensor. SKF. William Sandqvist william@kth.se

  15. Inductive ABS-sensor (coil) The toothed metal wheel is embodied in the ball bearing plastic seal! (eg. SKF) William Sandqvist william@kth.se

  16. William Sandqvist william@kth.se

  17. f Capacitive pressure sensor P 1 P 2 C 1 C C C 2 1 2 Differential capacitor for pressure difference William Sandqvist william@kth.se

  18. Simple measurement equipment? 74HC14 Six CMOS Schmitt- f 1 trigger inverter C 1 f 2 f C 1 1 C C 2 f 2 2 Two oscillators are constructed close to the differential capacitor. The frequencies f 1 and f 2 are measured. By forming the ratio between the frequencies then everything that affected both frequencies equally is suppressed (= can be shortend away). William Sandqvist william@kth.se

  19. William Sandqvist william@kth.se

  20. Accurate measurement of f Measurement of frequency can be done very accurate. More accurate than other measurements. The pulse sensors emit pulses of highly variable appearance and frequencies - there is not a single measurement method that can cover all the measuring case. PIC processor has three different Timer's and a CCP device for this. The processor clock can be generated with eight different methods. William Sandqvist william@kth.se

  21. High Frequency Measurement frequency > f f CLK MÄT Quantization. The counter onlu counts Counter complete pulses. ± 1 p = f T REF = ± ⋅ ( 1 ) f p f CLK • Direct frequency measurement the Number of positive edges p under one period of T REF is counted ( T REF =1/ f CLK ). High measured frequency f MÄT together with long measure time T REF minimizes the impact of the quantization error. William Sandqvist william@kth.se

  22. Lower Frequency Measurement frequency > 1 f f CLK MÄT 4 Counter 1 4 = = T REF ⋅ 1 f f 4 CLK CLK ± ± ⋅ 1 ( 1 ) p p f = = CLK f 1 4 T • Prescale REF 4 To measure lower frequencies requires that the measurement time is extended by dividing down the reference frequency f CLK with a prescaler . William Sandqvist william@kth.se

  23. Low Period time measurement frequency < f f CLK MÄT Counter f = n CLK f ± ( 1 ) Alternatively, when measuring low frequencies one can do this indirectly by measuring the period time . The measurement frequency is obtained by mathematically invert the count. During a period of the signal n clock pulses are counted. William Sandqvist william@kth.se

  24. Higher Multiperiod time measurement frequency < 1 f f CLK 4 MÄT Counter f = ⋅ CLK f k ± ( 1 ) n Higher frequencies can be measured with multiperiod time measurement . The measured signal frequency is then divided down by a factor k before measurement (register only every 4 or every 16 of the edges). • PIC processor is prepared for all these different measurement methods. (And many more … ) William Sandqvist william@kth.se

  25. William Sandqvist william@kth.se

  26. Clock frequency accuracy In addition to quantization, ie counting only the whole pulses, one will always have a relative error which is equal to the reference frequency error. Eg. Wrist watch requires crystal. Crystals have typical error ∆ f ± 20 ppM (parts per million). f = 4 MHz ± 80 Hz. Wishes: clock may not lose more than 10 sek/month. 10s/(30[days]·24[hr]·60[min]·60[sec]) = 25 ppM. William Sandqvist william@kth.se

  27. Clock frequency accuracy Eg. Stopwatch to use at a 800m race. (2 minutes total measurement time is probably enough) Wishes: resolution 0.01 sec. 1/(2[min]·60[sek]·100) = 1 ‰. A RC-oscillator has typical a 5% error, if untrimmed. ( R 1%, but C seldom better than 5% ) PIC16F690-processor internal RC-oscillator is factory trimmed to ± 1%. Dthis is not enough … but perhaps we can finetune! William Sandqvist william@kth.se

  28. PIC-processor clock module William Sandqvist william@kth.se

  29. PIC-processor clock module • At lab we use the default setting, 4 MHz – that makes it easy to calculate the execution time. 1 0000(min) – 0 0000 (fabrikstrim) – 0 1111(max) • If you are able to "tune yourself" so can the factory tuned frequency be adjusted in ± 16 small steps to ≈ ± 0,5‰ . Now enough for the stopwatch! William Sandqvist william@kth.se

  30. External crystal Same kind of circuit as in the course LC-oscillator lab. PIC processors can use external crystal. C1 and C2 can be omitted on the breadboard, but they are necessary on a PCB. William Sandqvist william@kth.se

  31. Piezoelectric crystal Add current (charge) to a "quartz • Electric, a crystal can be compared to crystal" and it is compressed, then a resonant circuit - with extremely high when it "springs" back it will suply Q value. the current. William Sandqvist william@kth.se

  32. Piezoelectric crystal Extremt högt Q-värde! William Sandqvist william@kth.se

  33. External clock signal PIC processors can use the external clock frequency signal. If you have access to an exact frequency then the PIC processor to can be as accurate. (The picture shows such an external clock module, oscillator and crystal "all in one"). William Sandqvist william@kth.se

  34. Atomic clock? Radio Controlled Watches, from eg. Claes Ohlsson & co, are locked to an atomic standard in germany. So it can actually be possible to get extremely accurate reference frequency to low price! Such a clock module gives a pulse per second (excluding sec No 60). A so-called PPS signal. William Sandqvist william@kth.se

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend