will the usart communication of AVR help in my project

Go To Last Post
11 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello friends i am doing a project for red light violation detection system(traffic violation). i am not sure if i should have posted this question here.i did so by reading the posting rules of academy forum.

i am doing some image processing stuff. i wanted to communicate the status of the red light (traffic signal) to my system. i just got a vague idea of using the avr usart for communicating the signal info to my piece of code(software). will this be feasible? Or is there a simpler method?

please suggest me some reading on communicating the external signals to my software(in the computer) through avr. i am writing my software in c

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

Hello, Vicky -

For all practical purposes, you have two ways to get between a PC and hardware. One is async serial (U(S)ART) as you suggest. The other is USB.

Few modern laptops have async serial though some do. USB is far more prevalent. You could use a USB-Serial converter, but then you would have to add something like a MAX232 in your hardware.

You could connect directly by USB, and there are several options there. One is to use a USB adaptor (such as FTDI FT232R) which then connects directly to the micro without the MAX232. The other would be to use a micro with USB capability built in. If the latter appeals to you, there is a great library called "MyUSB" which you can search for on this board. There are also recent threads about it and how to handle the PC side of it.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

thank you jim.

i will read through and get back.

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

Also have a look at Smiley's USB thingie - $20, set up for breadboarding, and can act like a virtual com port or a 12 bit interface. Can also supply clock and power.

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

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

The need of my system is to just get a signal on/off from the traffic light. The signal has to travel over 20 meters .

So is there a simpler method to do this? Or the only way is to use the usart communication?

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

At a distance of 20 meters, your only practical method may be RS232 (UART).

RS422 or RS485 would be better, BUT, it is difficult to get that converted to something a PC will understand.

USB is limited, I think, to a few meters (maybe 5?) or so.

The other simple I/O schemes are SPI and TWI (I2C). Both of these are really designed to live on a single circuit board and it is REALLY difficult to use either of these with a PC.

So, that is about what you have to work with.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

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

Would by chance any wireless options be viable?

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

Can you describe the block diagram of the system? Distances, etc. I look up at the ceiling and close my eyes and I visualize a camera up on a pole pointing to the intersection, and a traffic control metal box nearby... I suppose it has a pc with a frame grabber in it. So far I dont see where the microcontroller fits in. The traffic lights around here have white lights on top that light up when you blow the red light, supposedly so the police can see which lane didnt have enough horsepower to outrun the yellow light. I like Salgat's idea of making the red light running detector wireless. All we need to do is figure out what frequency its on and drive thru the redlight at 60 miles an hour broadcasting about 10 watts of whitenoise on that frequency?

Imagecraft compiler user

Last Edited: Sat. Apr 5, 2008 - 06:17 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you going to have a direct connection to the light circuits (at the control box or some such), or will you be doing some sort of optical recognition of the light's condition from afar? And, if you do get to put something inside the control box, will just the camera be outside, or does everything have to be with the camera?

Chuck Baird

"I wish I were dumber so I could be more certain about my opinions. It looks fun." -- Scott Adams

http://www.cbaird.org

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

i have two cameras facing the front of the vehicle. one to detect the motion and the other to take the snap of the license plate.

I would require another camera in case i choose to detect the red light status through image processing.

so i thought if i could use atmega for this.

i have attached image

Attachment(s): 

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

Wow. Your picture shows cheap little usb web cameras. I bet this aint the camera the real traffic engineers use. It probably outputs NTSC video on a BNC connector and I'll venture a guss that the License Plate Recognition and the Motion Detection task will both require a frame grabber card and a dedicated pc. Are these two functions in the can, or are you going to tackle them too? (I think both of these jobs are masters thesis subjects) Sorry to be a crab, but I cant find a place to stick an AVR in this job yet, and I like AVRs a lot. If you want to sell this as a product, be advised that there aint no licence plates on the front of any cars in Florida.

Imagecraft compiler user