AT89C52 and TCS230 Circuit Design for Object Sorting: Will it Work?

In summary, the circuit is designed to receive digital pulse from TCS230 color sensor (J3), do something with the pulse with AT89C52, and send some output (J1 and J2). The output will be connected to board 2 or board 3. Board 2 is for displaying the RGB value from the sensor, while board 3 is for driving a 6V stepper motor. I'm worrying about the voltages and the currents. I've added some resistors to the circuit, but I'm just not so sure about it. Will the circuit work? Any suggestions?
  • #1
beluluk
27
0
Greetings,
Currently, I'm designing a project to sort objects using AT89C52 as the "brain" and TCS230 as the "eye". And so, it is necessary for me to connect the AT89C52 with the TCS230 colour sensor and stepper motors. And before doing the real thing, i must know the frequency range of the sensor, i use leds to show me that.

I designed this circuit which I'm not so sure about.
The plan is to receive digital pulse from TCS230 colour sensor (J3), do something with the pulse with AT89C52, and send some output (J1 and J2).
The output will be connected to board 2 or board 3.
Board 2 is for displaying the RGB value from the sensor, while board 3 is for driving a 6V stepper motor.
I'm worrying about the voltages and the currents. I've added some resistors to the circuit, but I'm just not so sure about it.
Will the circuit work? Any suggestions?

Please forgive me if my english is not too good.
Thanks B4.
 

Attachments

  • board.jpg
    board.jpg
    53.8 KB · Views: 427
Engineering news on Phys.org
  • #2
It's got to be hard to see.

:yuck: i reviewed my post and i found out that it will make your head spin to see the image. so i repost the figure.

and since the picture is not so detailed, i want to note that the red arrowheads on board3 is meant to be diodes.
 

Attachments

  • board1.jpg
    board1.jpg
    41 KB · Views: 399
  • #3
Try http://www.parallax.com/dl/docs/prod/datast/TCS230.pdf

They do discuss counting the color frequency.
The max frequency happens to be 600khz which is likely more than the AT89C52 can handle. They are thinking that you need to control the max illumination to fix this.

Interesting.
 
  • #4
I've seen that...

NoTime said:
Try http://www.parallax.com/dl/docs/prod/datast/TCS230.pdf

They do discuss counting the color frequency.
The max frequency happens to be 600khz which is likely more than the AT89C52 can handle. They are thinking that you need to control the max illumination to fix this.

Interesting.

The truth is i already know how to handle the frequency, it is using the S0 and S1 pins on the sensor (and if that can not be done, we can always reduce the counting period:rolleyes: ). You can obtain the datasheets of TCS230 (i've downloaded em all) at http://taosinc.com. and about AT89C52 from www.atmel.com (this contains the DC characteristics)

It is the electrical design which worry me most. I will be using a regulated 5V 1A power supply as the Vcc. Will that be safe? The TCS230 costed me US$ 79. I don't want to waste that much money.

Ow yeah... i need to note here that I'm using the exact sensor on the link you shown above (TCS230). the TAOS real version is TCS230D with some electrical characteristics on the datasheets which i don't understand much.

Thanks anyway:biggrin:
 
Last edited by a moderator:
  • #5
Hmmm, I don't see a power requirement for the module.
Look on the TCS230D data sheet. Find Imax.
The rest of the components look like <50ma.
If your regulator is just a non heatsinked Ic its probably good for 300ma. If its a real spec 1A continuous power supply that's different.
 
  • #6
beluluk said:
we can always reduce the counting period:rolleyes: ).
Won't do it.
There will be a max rate at which you can toggle the uP port.

You could use a prescaler.
Which is more important?
Resolution or range.
 
  • #7
NoTime said:
Hmmm, I don't see a power requirement for the module.
Look on the TCS230D data sheet. Find Imax.
The rest of the components look like <50ma.
If your regulator is just a non heatsinked Ic its probably good for 300ma. If its a real spec 1A continuous power supply that's different.

I will use a transformator to convert voltage to 6V 1A, and i will use a L7805C-V to regulate power for the microcontroller and sensor (and that makes a Vcc for me). Is it safe to connect the output of the regulator directly to the microcontroller and sensor? I've added some resistors to limit currents (which I'm not so sure).
I've heard that when ICs overpowered, for example, given voltage higher than 5.5V, it will burned out.

NoTime said:
Won't do it.
There will be a max rate at which you can toggle the uP port.

You could use a prescaler.
Which is more important?
Resolution or range.

What i was thinking is to use the timer/counter.
What i planned is:
let T0 to count pulses from the sensor's OUT for a determined time.
for example, if we use a 11.0592MHz crystal (and that makes the machine cycle 0.9216MHz), we can run T0 as counter and at the same time, T2 as a timer. Wait until T2 timed 921600 machine cycles (that makes 1 sec), (use the Reload mode, it would be: 3600*256 times(set RCAPH,RCAPL = 65536d - 3600d = 61936d = 0F1F0h and make T2 overflow 256 times), and then capture the T0 value.
The problem would be: The T0 can only count to 65535 times before it goes overflow. But it is easily solved by reducing the "period", that is the T2. For example if the max frequency is 500KHz, we must divide it by 2000 to make it below 256. We just divide the timer value, 921600/2000=460.8.

resolution is not so important in this project, so i would only make the RGB range only 0 to 255.

My problem now is the power supply, i don't want to burn up the sensor.

and by the way... what do you mean by a prescaler?
thanks.
 
Last edited:
  • #8
beluluk said:
I will use a transformator to convert voltage to 6V 1A, and i will use a L7805C-V to regulate power for the microcontroller and sensor (and that makes a Vcc for me). Is it safe to connect the output of the regulator directly to the microcontroller and sensor? I've added some resistors to limit currents (which I'm not so sure).
I've heard that when ICs overpowered, for example, given voltage higher than 5.5V, it will burned out.
Running Vss at 5.5v unlikely to damage an IC in a 5v logic family.
Having Vss at 5.0v and applying 5.5v to an input pin will likely destroy it.

I'd have to go back and look, but I think the documentation said that your sensor could be operated at 7v.

On you power supply design. 6v is low for a 5v regulator. You would need a very large capacitor.
A 5v regulator needs Vin min of about 7v over the entire AC cycle to operate correctly. A 10v transformer would be a better choice.
It's a trade off between how much heat you have to get rid of vs how big your input cap has to be.
Build your power supply.
Load it to double your expected load.
If it doesn't overheat and maintains regulation you will be ok. Regulator Ics are very reliable and rarely fail.
Don't forget the .1 bypass caps. They are important.

Putting a resistor in a power supply line is a very bad idea.
You could always add a crowbar regulator to kill any power supply failure.
They sell Ic to do this function :smile:

beluluk said:
and by the way... what do you mean by a prescaler?
thanks.
Add an external counter chip. The simplest would be a D-FlipFlop for divide by 2.
 
  • #9
thanks... that solved it. I will work it right away.:biggrin:
 

1. What components do I need for this circuit?

The components needed for a circuit depend on the specific design and purpose of the circuit. Generally, circuits will require a power source, conductors, and various electronic components such as resistors, capacitors, and transistors. It is important to carefully plan and select the appropriate components for your circuit to ensure it functions properly.

2. How do I know if my circuit will work?

The best way to determine if a circuit will work is to use circuit simulation software or to physically test it with the correct components. You can also use circuit analysis techniques such as Kirchhoff's laws or Ohm's law to calculate and predict the behavior of your circuit.

3. Can I modify this circuit to fit my specific needs?

Yes, circuits can often be modified to fit specific needs by adjusting the values of components or adding/removing certain components. However, it is important to understand the circuit's function and design principles before making modifications to ensure it continues to work properly.

4. Why is my circuit not working?

There can be several reasons why a circuit is not working, including faulty components, incorrect wiring, or a design flaw. It is important to carefully troubleshoot and double-check all components and connections to identify and fix the issue. Circuit simulation software can also help pinpoint the problem.

5. Is it safe to use this circuit?

The safety of a circuit depends on its design and components. It is important to follow proper safety precautions and guidelines when working with electronic circuits, such as using appropriate protective gear and ensuring the circuit is properly insulated to prevent electric shocks. If in doubt, consult a professional or conduct further research to ensure the circuit is safe to use.

Similar threads

  • Electrical Engineering
Replies
5
Views
1K
  • Electrical Engineering
Replies
9
Views
1K
  • Electrical Engineering
Replies
4
Views
1K
Replies
1
Views
2K
  • Electrical Engineering
Replies
34
Views
3K
Replies
19
Views
2K
  • Electrical Engineering
Replies
3
Views
3K
  • Electrical Engineering
Replies
7
Views
1K
  • Electrical Engineering
Replies
23
Views
3K
Replies
12
Views
2K
Back
Top