Search This Blog

Wednesday, January 31, 2018

Digital Interface Third Part

These are notes made of Telegram Messenger - messages i sent. Only my Messages are combined here to create paragraphs. Related to Interfacing an Embedded System to external circuits.

Pull up means a resistor connected from a point to +V. Pull Down is Resistor connected from a Point to GND.  The point can be a Gate Input, Opamp Input or a Port Output. We use these when open collector output is used,  this way we can get a clear High Or Low or avoid a point to float(no potential)

Industrial Process Control Circuits

When uC is sleeping outputs should be written high. Which is also high impedance  like a insulator- The pull up of 100 k is put to keep the point high

Diode and Zener Clamp Protection

Here are two examples of IO protection from my older circuits. The diode or Schottky protection is for circuits measuring low voltage inputs like mV. Schottky forward drop on low currents is as low as 200mV. General Purpose diodes like 1N4148 have a drop of 400mV at low currents. Use low leakage zeners if you are protecting digital inputs. you can also diode clamp to VCC and GND or VDD too. Then inputs can swing betwwen VCC and VDD.

Diode and Zener Clamp Protection

When a low is written to the port a current Ib flows from vcc thru emmiter to base via a cuurent limit resistor. Beta times Ib which may be like 200 times ib flows from emitter to collector. This is the amplified Ic - Transistor switches on and saturates like a switch. - Vce may go as low as 0.5 volt on proper load

Tuesday, January 30, 2018

Digital Interface Part Two

Continuation of Digital Interface Discussion, only my part of the communication here. This will help you understand some common methods and issues.

Use a IO port to drive low (not pulse) the base of this PNP with a resistor 10K, emitter is +V and collector is the output to power the Sensor V+. You can use a pull up resistor on the port like 47K to keep noise low.

InfraRed LED Flasher for Optical Switch

Try things practically before you connect to the Embedded System. Make test codes to check your interface circuits, watch the LEDs flash on off on the sensor. Test the sensor with obstacle and see if a clean High Low pulse is seen with a scope or DMM on a Port input.

There has to be a 100 uF 16V Electrolytic Cap in the Breadboard across +/- (supply terminals) coming from Battery. This is the first decoupling cap to prevent oscillations. It acts as a mini battery.  It should be on the board and not soldered across the battery.

Optical Retro-Reflective Proximity Switch

It may be a good idea to use this pololu sensor which can be easily enabled and disabled. This will resolve most of the issues of interfacing basic IR circuits. This post is about other raw IR sensors which need more circuit to interface well.

pololu IR sensor

Pololu 38 kHz IR Proximity Sensor, Fixed Gain, High Brightness

Yo may need a bleeder resistor 10K across the supply terminals of both the proximity switches. This ensures the cap in the proximity switch discharges after you turn off the supply within a few mS determined by the 104 decoupling cap in the proximity switch and the bleeder a 10K will do.