1
\$\begingroup\$

I'm designing a circuit involving 2 digital sensors and 2 analog sensors on an Arduino Mega 2560.

Sensor aspect interface
DHT22 temperature and humidity digital
MQ-135 air quality analog
DFRobot ph PH analog
Grove gas sensor carbon dioxide i2c
  1. Do I need to connect transistors to the analog sensors before interfacing them to the Arduino pins?

  2. Since the Arduino 3250 doesn't have a removable DIP package IC like the ATmega328 on Uno boards, how do I transfer this circuit of mine to a printed circuit board?

\$\endgroup\$
7
  • \$\begingroup\$ Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. \$\endgroup\$
    – Community Bot
    Commented Jul 29 at 19:31
  • 2
    \$\begingroup\$ which sensor are you asking about? \$\endgroup\$
    – jsotola
    Commented Jul 29 at 19:43
  • 2
    \$\begingroup\$ your second question is unclear ... right now it is similar to since I have only green apples, do I have to peel potatos before boiling them? \$\endgroup\$
    – jsotola
    Commented Jul 29 at 19:46
  • \$\begingroup\$ Or without the interface you intend to use for communication. \$\endgroup\$
    – Justme
    Commented Jul 29 at 20:16
  • \$\begingroup\$ The sensors are DHT22 sensor(temperature and humidity), MQ-135 sensor(air quality), PH DF robot sensor (pH sensor) and Grove gas sensor (carbon dioxide sensor). The DHT22 sensor uses a digital output pin, while the mq135 and ph sensors have analog output pins. The Grove gas sensor is using the SDA and SCL pins for serial communication \$\endgroup\$ Commented Jul 30 at 0:55

3 Answers 3

1
\$\begingroup\$

From the little experience (25 years) which I have gained from constructing electronic projects, I can say follow things. Please consider them as my suggestions.

  1. Constructing an electronic project is like constructing a house with a perfect building plan. Just like the way in which building plans are tested in CAD simulation. All electronic projects needs a perfect design.

  2. Prototypes which are constructed will consume lot of resources before a project becomes a PCB product. Sometimes 2 to 4 prototypes have to be tested to ensure that PCB design of the project works without any flaws or unexpected surprises.

  3. You need to have clarity on all the functions which your micro-controller is supposed to do. Otherwise more resources will be consumed for building prototypes.

From the above suggestions I would like to draw these conclusions.

  1. I am not able to understand the end goals of the project which you like to build. Without knowing the end goals, all the answers provided will be like shooting arrows in the dark.

  2. Including dc motor, dc heater, dc pump, solenoid valves in your project will require good power supply, driver chips to drive motors, best relay that can control the heater (without creating any fire hazard) and finally usage of opto couplers to isolate any possible noise which can occur while operating the components which are present.

  3. In every project, generally people try to minimize the project complexity by choosing single micro-controller for performing all tasks. Involving multiple micro-controllers is not considered as optimized project design.

enter image description here

From the above pin audit, I can say that Arduino mega is sufficient as one I2C port can be used to control multiple devices. But how the logic will be written will decide whether Arduino mega (16 MHz) will be sufficient or not for a project that serves this many sensors.

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

As mentioned in the table, you only need two analog pins, one digital pin and one i2c pin. All these things are easily available on an Arduino Uno.

Don't use an axe when it can be done easily using a knife.

If you use an Arduino Unoo for your project, you can easily design a PCB using a standalone ATmega328P.

I don't know whether the Arduino 3250 exists or not.

All the sensors which you have posted have working examples which you can find through google search. I didn't see any transistors for interfacing the analog sensors.

\$\endgroup\$
2
  • \$\begingroup\$ I would really like to use an Arduino Uno since I'm transferring this circuit to a PCB but my pin requirements are more than the ATMEGA 328 chip can handle. \$\endgroup\$ Commented Aug 13 at 23:24
  • \$\begingroup\$ In addition to the 4 sensors mentioned, my circuit also involves a DC motor, DC fan, DC heater, DC pump and 2 DC solenoid valves. I will also use a 20×4 LCD display and about 5 push buttons to control my parameters. Do you suggest I use the Arduino Mega 2560 board or I just go with the Arduino Uno by using 2 ATMEGA 328 chips. \$\endgroup\$ Commented Aug 13 at 23:32
0
\$\begingroup\$

how do I transfer this circuit of mine to a printed circuit board

There is no need to move physical chips. The PCB needs a usual debugger/isp connection header and a blank MCU. You'll then program the blank chip with the code, without the Arduino bootloader. Or, if you wish to be able to replace the firmware via USB without using the AVR in-system programmer dongle, then add the USB interface and load the Arduino bootloader onto the chip.

You may be able to buy chips pre-programmed with the Arduino bootloader. Or, when ordering MCUs from most big value-added vendors like say DigiKey, you can ask them to program the chip for a nominal fee. That way you'll be receiving the chips with the bootloader already installed, and they can be then programmed via the serial-to-USB interface, just like on the Arduino Mega board.

\$\endgroup\$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.