Help in building a correct circuit for the project

Hello friends!

I want to consult with you about a project I am doing.

At the center of my project is Arduino Nano v3. There are several components connected to the Arduino and they are:

ultrasonic HC-04
gps module neo6
mp3 module pro DFR0768 3.3v-5v
color sensor module Tcs3200
touch sensor module TTP223B 2 ~ 5.5V DC
2 vibration motors
2 speakers 5w
2 linear voltage stabilizers, one outputs a voltage of 5 volts and the other 3.3 volts.
In addition, I have a buzzer, LEDs and a push button.

The main idea is that there are 4 push buttons (without locking) and with each push I activate one of the sensors I mentioned above.

*Pressing button 1 will transfer the device to the state of knowing the time and date by the GPS module. Touching the touch sensor will give a voice indication of this data.

*Pressing button 2 will move the device to the position of and location by the gps module. Touching the touch sensor will give a voice indication of this data.

*Pressing the button 3 will move the device to a position where it checks the distance with the ultrasonic sensor, touching the touch sensor will give a sound indication of this.

*Pressing the number 4 button will give information about the color detected by the color sensor and voice indication as above.

Each time one of the buttons is pressed, another LED will light up to indicate the state the device is in.

The vibration motors will operate when a certain location/color/distance is detected by one of the sensors according to what I decide to set.

I know this is a very complicated project in terms of software, but right now I'm focusing on the hardware. When I finish building a correctly built circuit I will also need you for the software..
I would love to present my circuit and receive comments from you on whether the circuit is connected correctly and what needs to be fixed, Have I connected to correct arduino pins and is my power supply to arduino correct, And in general, do you think this thing will work?
I hope my sketch is not cumbersome and you can understand what you see.

In addition, I would appreciate your recommendation on a good power source that can fit the entire system. I thought about a 7.2 volt battery, but I'm not sure about that.

The power input is on the left side into the connector and next to that there are 2 voltage stabilizers, the upper one is of 5 volts and the lower one is of 3.3 volts. The rest of the buttons and modules are pretty clear I think and with an adjacent caption.

I still don't know how to create a scheme with labels so that the circuit still looks like a collection of snakes and noodles. Forgive me for that..

I am attaching some pictures, some of them focus on part of the circle for better resolution.If the photos are not good, I will send more

General photo:

Top photo:

Photo of the lower part:

Bit confused , A5 as an output ? If this is an “ output “ …..The circuit of vibration sensor and Q1 won’t work - the output from the Arduino needs a resistor to the base and the transistor needs to be on the other side of the vibration thing with its emitter to ground . Your push buttons would be better powered from the 5v line , freeing up D9.

Never like potential dividers as digital inputs , what happens if two buttons are pressed ?
Why not use the now freed up D9 for this too ?

If this a new project design and pro type test each bit and it’s software before worrying about the circuit diagram , as it might change and it’s easier to spot problems .
If you do each bit as a procedure it will be easy to join up the software .

I'm not sure I understand what you mean. I connected a digital voltage from pin D9 on one side and I understand that it can be changed to a 5 volt pin (why?) I connected the voltage divider side to analog input A6, what is the problem here?

Regarding this too, I would appreciate an explanation because I didn't quite understand the difference?

If you press two buttons at the same time what voltage appears on A5? You are just using the digital output to provide a voltage for the divider and buttons - waste if a digital output just to provide 5v.

For the transistor Q1 the emitter voltage when turn on will be around the same as the collector voltage . But for the transistor to be ON the voltage needs to be around 0.6 volts above that , so it actually can’t turn on .
If you swap around Q1 and the vibration thing , the base of Q1 Only needs to be around 0.6 volts above ground voltage . The base needs a current limiting resistor .
While I’m here the vibration thing ought to have a diode across to absorb any back emf .

Google transistor as a switch

Planning for a lot of hardware is good but bringing all hardware together and then start coding is bad, sometimes very bad.
Instal one item at the time and make code exercising that device. When that works add another item, and so on.

2 Likes

What would you recommend I start with?

In any case, I would like to receive feedback on this circuit to understand key principles that I need to improve

Haha, that's easy. Figure out how the transistor should be wired to control the motors. Build that, test it.

I reiterate @hammy's point about the base resistor you left off.

You will find there is usually a diode in parallel with a motor. You left that off, too. Again, just saying it again.

a7

Q1 will work as shown. It is in common collector (emitter follower) configuration. The disadvantage is that the motor drive voltage will be about 0.7V less than the supply voltage.

“ Q1 will work as shown. It is in common collector (emitter follower”

But there isn’t enough voltage on the base to turn it on fully ( saturation), especially if the digital output doesn’t reach 5v ( you could easily loose 20% of the available voltage ) .it could be somewhere in the active region and might heat up , not what you want for making it on and offable.
Dead easy to swap about at this stage , for a better result

I'm not defending it generally, I don't think an emitter follower is the right choice here. But some of what you say isn't true. It is true that the output voltage will be compromised. However, because the CC stage has emitter feedback, and because the base voltage is nearly 5V when it's "on", neither saturation nor overheating is likely to be a problem. Not saturation, because the feedback will maintain the output voltage fairly close to 5V, and not overheating for the same reason (heat in the transistor, being roughly Vce times the current. Feedback keeps Vce relatively small. Full saturation is not a requirement but a goal.

For a motor drive, a MOSFET is a better choice for many reasons.

I see. THX.

I misread a symbol on the schematic, but TBH would not have seen an emitter follower - wouldn't think of it for turning on a motors with a digital output pin.

I check "learnt something today", whatever it was.

a7

Thanks for the comments. I will fix what is needed. I will start building slowly with hardware and software at the same time as they said here. But can you tell me which batteries/power source would be good to run all the overall design I presented?

I also need to choose voltage stabilizers whose input voltage will match the batteries and the general current of the system, can you tell me which voltage stabilizers I should use?

Can someone help me? I would be very happy🙏

Excuse me, but I have to make sure something... Is there anyone left alive on Earth besides me? :sweat_smile:

Add up all the power drains, factoring in the duty cycle. Decide how long you want it to run. Multiply the time by this current estimate, it gives you the battery rating in mAh.

e.g. suppose I want to power a 10mA circuit for 50 hours. 50x0.01A = 0.5Ah = 500mAH

I meant more the size of the battery voltage considering all the connected devices as well as a voltage level that will be able to take care of the work of the linear stabilizers, I also took into account the current that the system will consume
less I meant the capacity of the battery

That is strange. I just finished showing you how to calculate that.

I don't understand how this answers my question. I asked what voltage I would need to run my system.. not the amount of mah.. unless I really don't understand anything