Help to check my sch design of DIY project

Go To Last Post
54 posts / 0 new

Pages

Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am learning to design the sch files.

But really a new bie, hope experienced guys can help to guide how to finish it.

 

Basically this a IR receive board : receive the IR code and decode it and transfer to master MCU.

I divide it into 2 parts: the hard PCB and soft FPC, compose them with free : 1 PCB + N FPCs.

I can manage simple digital parts, but for analog one, I think they are too miraculous to understand.

 

IRsensorBoard

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

When you usage a Motor. Then make sure it electrically isolated from your Microcontroller.
Here is the recommended schematic. 

 

শূন্য  - The ZeRo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

eRony - How many commercial devices have you seen that use microcontrollers and motors? Do they use opto isolators? Probably not. Optos aren't quite the magic cure you think they are.

 

Xiao - you need resistors to limit the base current on your transistors. 1K might be a good start. Draw the transistor the right way up - it makes the drawing easier to understand.

 

Last Edited: Sun. Sep 22, 2019 - 09:46 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This vibrating motor is same like one in mobile,only 80ma at 3v, so optional isolation maybe need not.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman, thank you for advice.
I will add resist for transistors.
What’s your meaning “draw it right way”?I just selected it from default library .

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

 

 

 

 

Last Edited: Sun. Sep 22, 2019 - 10:31 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:

 

 

 

 

 

 

 

And importantly, in that orientation.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman:

The Data pin in P1 & P2 is the wire to transfer data between master MCU & all other slave MCUs, but the speed is not high(9600bit/s).

The length of the wire (include the power source lines) is about 150cm, do I need to do something for it?

The sch changed as following png:

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Consider the voltage drop across the 0V wire due to current.
Also consider EMI and ESD. You need protection and filtering.

Your transistors look much nicer. Do the same to P1 and 2

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your transistors should also have a high value resistor - say 100k - from the base to emitter. That will stop them accidentally turning on while the various processors are in reset and the port outputs might be inputs or floating.

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The length of the wire (include the power source lines) is about 150cm, do I need to do something for it?

That is a good question.

 

A lot depends upon the environment the devices will be operating in.

Are there large motors, or high voltage or high current wires in the area?

 

What is the wire being used?

 

The wire has capacitance, and the longer the wire the more capacitance the uC I/O pin has to drive with its signal transitions.

You mentioned multiple slaves, so that increases the load on the driver.

 

You might get away with driving the wires with just the micro.

If you do this make sure you use a "reasonable" gauge wire, and likely you will want it to be shielded.

 

A better approach might be to use RS-232 for the data transmission.

This would require a chip at each end, perhaps the T.I. TRSF3222E, or similar.

The micro's UART connects to the TxD and RxD pins on the chip.

The chip converts the 0 / 3.3 V data pulses to an approx. +/- 10 volt signal.

The chip can drive much longer lines than the micro's I/O pin can handle, and it has better tolerance for electrical noise.

 

The chip at the "far end" converts the RS-232 data back to logic levels to feed into that end's micro's UART.

 

JC  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thank you,JC
I want to communicate with usart at the beginning, but given up at last after trying for many days and hundreds codes. Hard to debug and independent of hardware is hard too

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman:
Use tvs diode to protect the input port ,that is suitable?
For each port ,1 for power source and 1 for data line.
And the connection are:
Power source to GND
Data to GND
Is that right?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Best if you draw schematic so we can be sure we understand.

 

On data, use a RC filter and a tvs diode. TVS diode has capacitance - choose carefully.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman,I study the RC filter for a while, get something , confirm with you now, refer to the png below.

As pin of MCU, the current is very few if it was used as input / output level, not driving parts.

I think it is only few MA , 10 ma e.g.

The voltage drop on R5 is (10 * R5/1000), it will be acceptable if the resist value less than 1K.

And the frequency is less than 5000HZ,  f = 1/(2*pi*C5*R5),  we get the value pair : c5=0.1uF  r5=300 ohm.

Is that right?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If your data rate is 9600 baud, you don’t want the filter corner freq at 5000Hz. This will affect your data. At a guess, I would start at 100R and 100pF. Put the tvs in parallel with C5. What part number for tvs diode?

Last Edited: Mon. Sep 23, 2019 - 10:43 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For my case the freq is not stable, as showed in the picture,the highest value is 5000 bit per second.
Why the TVs need to be putted in parallel with c5? Does not it should protect the c5 too?

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Fix P1 & P2..it is ridiculous to have them pointing up  in the air, for no good reason.  The should be right next to each other (not 5 inches apart)since they share the same wires.  Their gnd  MUST connect to GND symbol 

 

Why is P7 twisted around...just mirror P6.....raise P6 & P7 upwards & get rid of their right angle lines--make them straight across...much neater...rotate the tsop36 parts 90 deg...will be even neater.

This block in the lower left seems to have no connections at all in common with the rest--do they even share gnd?

 

Move P4 & P5 next to each other...minimize the total length of wire drawn. (maximize efficiency ).

 

A filter cap needs shown at AVR pin1...maybe it is your C2, but it should be show AT PIN 1

 

How does you motor connect to the board (nothing is shown)...maybe just solder wires?

 

Bring out ALL avr pins to vias in case you need to use those pins later.   Dioes this chip need a reset pullup resitor (usually recommended) 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks so much,I will modify it soon.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman:

How about this version:

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Still no pull-downs on the transistor bases?

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not a good idea to have multiple LEDs in parallel, and only 1 series resistor.

 

the blue ones don't seem to have any series resistor?

 

EDIT

 

Does connecting the outputs of multiple  TSOP36240 in parallel work?

 

https://www.vishay.com/docs/82568/tsop362.pdf

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Wed. Sep 25, 2019 - 05:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not a good idea to have multiple LEDs in parallel, and only 1 series resistor.

---> I want to decrease the parts on FPC. These LED used only for show status, keep them working is enough.

 

the blue ones don't seem to have any series resistor?

 

---> I checked the datasheet, the voltage is 2.8~3.4V. The blue LED will work in "breathing" way : dark -> high light -> dark with PWM control, that means the time with high voltage is very shot. The max voltage is 3.3v even in worst condition.

 

 

Does connecting the outputs of multiple  TSOP36240 in parallel work?

 

---> They must work :), I will lose the base otherwise.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How?

I don't understand.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're using a 5V TVS to protect a 3V3 pin? That's not going to work too well. Besides, put it in parallel with C5. What protects the TVS? If you wire something wrong , then TVS diode may burn.

 

 

With your FPC, I think you'll be having problems with the led current switching and the TSOP devices. This requires careful design.

 

 

 

---> They must work :), I will lose the base otherwise.

All your base belong to us!

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This looks just as awful as the earlier version, maybe even worse...aren't you willing to spend some time improving it?  What is stopping the progress?'

Where are the resistors for your LEDs?  T1,T2, T3 are all in parallel...for what purpose?  No bypass cap at the micro?  You may just wan tot use this as a learning experience & start over.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You should explain a little more on led current and tsop, I don’t know where to go 。

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you need to go back to basics!

 

If you don't have a series resistor, an LED will take "infinite" current!

 

surprise

 

https://electronicsclub.info/leds.htm

 

If you connect the  TSOP36240 outputs in parallel, they will interfere with each other!

 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Neither do we! I have no idea of what you want to achieve - all I see is a schematic.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
all I see is a schematic

And a rather strange one, at that!

 

I think this may be the HW equivalent of jumping into the code editor too soon?

 

There needs to be a good design before you get down to the implementation-detail of schematics ...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

IR receivers, leds and a vibrating motor networked. The mind boggles...... double your pleasure, double your fun....

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the function is very simple,receive the IR packet ,decode and judge, flash the red led and active the vibrating motor if it’s right. And the blue led will keeping light in breathing mode to indicate the set is running.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is used in laser war game,as the sensor part: to receive IR packet (simulate the bullet). Now,most realized method is placing 4 tsop on 1 pcb . I will move forward 1 step: isolating the reception function as a sensor node,it can be configured, it will output the decode data to master through 1 wire.

 

As the picture showed, you need add more pcb if you want to detect more "shot" you received, that will be expensive.

My way to decrease the cost is using TSOP strip , not block.

And make it easy to install by FPC.

 

I believe it is ok to work with 4 TSOP on 1 PCB, 

I'm not sure it is OK to increase it to 20 on 1 set.

That is why I'm here :)

Last Edited: Fri. Sep 27, 2019 - 02:16 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Each TSOP IR detector is supposed to have its own RC on the power pin...did you look at the datasheet?

You have not yet fixed your schematic either...you are falling way behind

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The tsop devices are really sensitive to power supply noise. Having leds share a power rail is probably not a good idea. As candyman suggests, you need the RC filter at each tsop. As for having many tsop in parallel, i’m thinking it might not work as you want.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It bugs me that the ATtiny814 symbol has 6 missing pins...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Xiao wrote:
I believe it is ok to work with 4 TSOP on 1 PCB

it's not about how many you have on 1 PCB - it's about how you connect them together!

 

My way to decrease the cost is using TSOP strip , not block

But that will only detect "shots" along a narrow line.

 

Maybe that's what you want? 

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

in my case,voltage is nearly 3.3v,not below 2.2.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I changed my idea, don’t use fpc strip, I will post it later.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Changed, isolate each TSOP with sub pcb.

Help to check again , pls.

Thank you.

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


 

What pulls the DATA line low?? --NOTHING!

 

Ensure the 3.3V TVS (part # ???) is not tripped by your 3.3V power supply---you need some margin.

 

don't call the same signal three different names...3.3V Vcc & Vout ???!!!!!!!

 

C6 1.5uF is prob way too large (filter on a pulsed sensor output to AVR)

 

you run out of wire here

And have WAY TOO MUCH here

 

FIX ALL OF THESE DISASTERS!

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Sep 30, 2019 - 03:42 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tsop will pull it low,it can pull low only in fact.
Under Normal situation ,the voltage is a little small than 3.3v, just like 5.0v or so,do we need reserve for them too?
Value for c5 computed by f=1/(2*pi*r*c),c goes down and r goes up,what is the problem if c is 1.5uF?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tsop will pull it low,it can pull low only in fact.

You better look again! 

 

what is the problem if c is 1.5uF?

1.5uF is a pretty big cap , if you want to get a digital pulse from it from the internal 30K driver...pay attention to your needs

 

Please start the cleanup....you'll be glad later.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But what is the right value range? 1uF? 0.1uF?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Actually I don't know how to determine the freq for RC filter.

For the TSOP32640, work on 40K IR signal, someone told me f = 40K. But I'm really confused, TSOP it self is the chao source, it will output tripple to the system, not input from other part.

 

It is easy to understand use the signal freq as the freq ,like pb2,pa4.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Reading the datasheet...

 

The TSOP receives modulated IR directly, at 40kHz - that is, a 40kHz signal (probably an on/off square wave) - and decodes the result. If the signal is there, the output is active; if it's not, it isn't.

 

The datasheet has two things you should be aware of, though; that decoupling capacitor/resistor combination should be 100 ohms/4.7uF; secondly the large orange words 'not for new designs'...

 

Neil

 

Last Edited: Mon. Sep 30, 2019 - 11:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 If the signal is there

I think we'd typically mean data bits (such a a TV adjust code).  In that case, you don't want to blend them into one blurry slag lump ,using a big cap.  Using  30K & 1.5uF is almost 50milliseocnds! 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


The TSOP receives IR signal in PCM(pulse code modulation.)

 

 

The IR signal modulated to 40K waves,  and the output will be far larger wave as picture upper.

 

 

 

Refering to the picture below, the internal resist is used to pull up the pin, the RC filter provided by R1 & C1, the internal 31K resist will infect the RC filter?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:

 If the signal is there

I think we'd typically mean data bits (such a a TV adjust code).  In that case, you don't want to blend them into one blurry slag lump ,using a big cap.  Using  30K & 1.5uF is almost 50milliseocnds! 

 

Indeed; three levels of signal going on there - the IR itself, its modulation at 40kHz, and the further modulation of that 40kHz signal with the actual data.

 

The cap under discussion has nothing to do with the data rates; it's a power line decoupler/smoother and the data sheet says it should be 4u7... mind you, the data sheet also says do not use for new designs.

 

Neil

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

 

The cap under discussion has nothing to do with the data rates; 

 

As mentioned, I doubt you'd typically want a 45ms time const on the data line!  (see TSOP chip--30k*1.5uF) , though it might depend if you intend to send anything....just use 0.001 uF & be happy

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Tue. Oct 1, 2019 - 06:34 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Production of vishay is really stable,there is no any other parts in my prototype for debug program.
I used the tsop4840 for rogramme, it is stable. It should be far more stable using the latest version.
So maybe it is not necessary to add power filter for TSOP.
The pcb will be very compact as production。
the power source is filtered by caps and protected by TVS diode,the route to tsop is very short.
In the data sheet ,it said tsop is insentive to power voltage ripples and noise.
All those support my thought: don’t add other parts for TSOP.

Last Edited: Tue. Oct 1, 2019 - 08:27 AM

Pages