3
\$\begingroup\$

I realized a prototype-board with an old ATmega8 and a particle dust sensor. Both supplied with the 5V. The sensor output voltage is normally high (>4V), and falls below 0.7V if the sensor detect the presence of the dust. The percentage of dust depends on the time in which the output of the sensor is low in a 30sec interval.

Here the datasheet: http://www.seeedstudio.com/wiki/images/4/4c/Grove_-_Dust_sensor.pdf

Now I have to switch to the more modern ATXMega256A3BU, which can't receive a 4V level in input because is supplied with a 3V3.

What is the best way to interface these two devices? With an high-speed op-amp as comparator? With an <1 gain op-amp?

\$\endgroup\$
1
  • \$\begingroup\$ Mark, are you using the P1 or P2 output? Probably only need just one 10k resistor to limit current from 5V output level into 3V3 input. \$\endgroup\$ Commented Jun 6, 2013 at 12:20

2 Answers 2

2
\$\begingroup\$

A reliable way to convert the 5V sensor output to a 3.3V operational domain is to use an NPN transistor as below. Note that the transistor will cause an inversion of the logic for the sensor such that the LPO (Lo Pulse Occupancy time) will get converted to a HPO (Hi Pulse Occupancy time) at the target device.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
0
\$\begingroup\$

Maximum current allowed into input pins is +/-25mA: -

enter image description here

Also maximum voltage allowed is Vcc +0.5V

There is nothing in the spec that specifically mentions current into the device when an IO is used as an input so I'd assume worst case 5V in to 3V3 out and use: -

A potential divider of 3k3 from the sensor and 8k2 to ground. If the input is 5V the output will be no more than 3.56V and on a 3V3 supply this is below the limit of 3.8V.

If the input is only 4V, the output is 2.85V and represents 86% of the 3V3 supply so it will still work: -

enter image description here

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.