Viewport v2 Released! 40Mhz ADC, Video capture, Fuzzy Logic and more
Hanno
Posts: 1,130
Viewport v2 is almost ready is finished! Great new features include:
-high speed analog input with a $5 40Mhz ADC
-video capture: up to 240x255 @256 graylevels
-fuzzy logic engine to simplify robotics
-advanced edge/pattern triggers
-simplified user interface
Check out the video:youtube.com/watch?v=-YB5lFfSQC4
Download from http://mydancebot.com
Hanno
Post Edited (Hanno) : 12/21/2007 6:41:18 AM GMT
-high speed analog input with a $5 40Mhz ADC
-video capture: up to 240x255 @256 graylevels
-fuzzy logic engine to simplify robotics
-advanced edge/pattern triggers
-simplified user interface
Check out the video:youtube.com/watch?v=-YB5lFfSQC4
Download from http://mydancebot.com
Hanno
Post Edited (Hanno) : 12/21/2007 6:41:18 AM GMT
Comments
Looks like your server is a little busy tonight.
Congrats! Too many goodies to be believed[noparse]:)[/noparse]
Time to use a little charm on RadioShack. One order and you are off to the races!
Rich
The particular ADC I used "only" supports 40Mhz. Viewport and the Propeller support up to 80Mhz- maybe we'll get there soon. The ADC only uses 9 pins, so you could easily use 3 chips which would get you 3 channels of 40Mhz each.
Rich,
The youtube link should work... Sorry for being dense- why is it time to charm Radioshack?
Hanno
If I were you... I would go get some money and offer them kits on consignment.
Rich
Very impressive demonstration and a nicely done video.
I'm very happy with the Fuzzy Logic Engine- while fuzzy logic is not a silver bullet, it does simplify robotic programming by making the constants more intuitive.
en.wikipedia.org/wiki/Fuzzy_system
Instead of using complicated formulas coupled with IF statements for every threshold/exception, fuzzy logic just requires you to specify how variables should be mapped onto classes. For example, 75 degrees is warm, 90' is hot, 50' is cold. PID loops for a motor can be tuned in seconds (video coming at some point), and I came up with a better balancing algorithm that incorporates PID and fuzzy logic for the dancebot. Once fuzzified into classes, the engine supports the standard functions to let you quickly calculate what you need- taking less than a millisecond on the Propeller.
Once you decide to try out Fuzzy Logic, Viewport gives you the easiest and most powerful interface- and the Propeller provides the ideal hardware.
Hanno
http://mydancebot.com/viewport/download.php
Some browsers block downloads- we've included a direct link to the file on the final page.
Hanno
Missed something here... Would you elaborate on these components? Is there a list?
Thanks
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just getting started with Propeller?
Propeller Cookbook
PropDOS
Viewport at 240x200x16 grays or download 240x255x256 gray pictures is the:
"C Cam 2A" available at: www.electronics123.com/s.nl/it.A/id.32/.f?sc=8&category=240
I use the composite NTSC signal to feed a 40Mhz 8 bit ADC, the "TLC 5540" search.digikey.com/scripts/DkSearch/dksus.dll?Cat=2556291;keywords=TLC%205540
Viewport can read the Propeller's 32 IO pins at up to 80Mhz.
A picture is imaged by the camera, converted to NTSC, sampled by the ADC into 8 bits and then read as a digital value by the Propeller. The Viewport TV object running on the Propeller samples the INA port, finds the syncs, and "compresses" the data into a frame which is then sent to the Viewport application.
My prototype adapter combines the camera and ADC on a board which plugs into the Propeller Demo Board.
Who wants to build the ADC/camera module for the masses?
Hanno
From what I can see, storing in memory seems possible. I am not sure about the HUB read/write times, but the 240x200x16 gray levels 24KB image should fit...
EDIT: Woops, I meant 16 gray scales (16 bit would have been obviously too much)... (Thanks Bill)
Post Edited (Harrison.) : 12/1/2007 9:19:42 PM GMT
I think you meant 240x200x16 gray scales, which would be 24k
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com - a new blog about microcontrollers
A huge benefit of the NTSC composite signal is that you DON'T need the whole frame in memory to do visual processing. For simple processing (line finding, blobs...) the processing can be done as the image is being scanned. This is lets you process every pixel of every frame! Currently all of this is only possible for a black/white source- decoding a color stream would require syncing to the color burst and would require much more data.
Hanno
Youd be losing 7 of every 8 digital representations of the analog signal it processes.· Am I right about this?· You do have to wait for the hub to cycle to update registers, right?
·
The Propeller has 8 cogs, each capable of executing 1 simple instruction every 4 clock-cycles. So, a single cog can read the INA port up to 20Mhz- if it's just storing data into the 2kb cog ram. The ViewPort QuickSample object uses up to 4 cogs to sample the INA port at up to 80Mhz- in this case the cogs run interleaved, just like a 4 stroke engine. In the ViewPort video object, multiple samples are taken, combined, and written to global RAM. To read the ADC, Viewport takes up to 1500 samples of the entire 32bits of INA (at up to 80Mhz), transfers the samples to ViewPort, and decodes the digital values into analog.
And yes, this all works robustly!
Clear as mud?
Hanno
If you set up a flip flop running at the 80Mhz clock and ran two of the ADC's, each of their triggers off a separate leg of the flip flop, wouldn't their output be synced to a total of 80Mhz ADC rate? Maybe running thier output through diodes or nor gates?
I don't know, just a thought. Great work so far!
I've been tinkering with the notion of video ADC's as o-scope inputs for a while and just found the Propeller a few months ago. You guys are doing amazing things here! I'm trying to design a memory buffer so I can see what just happened. This interlacing prop stuff looks fun though.
Great work! I am very interesting in the image processing. Is it hard to put them together for a beginner? I like to work in the smart camera - after capture an image it can tell what is in the image.
Michael
Was off transporting kids and wrecking equipment. Missed your post. Awesome. Seeing what seems to be impossible flow so easily from your brain is a true joy.
Rich
Thanks for the kudos. And no, a lot of this stuff does not "flow easily" from my brain- lots of tinkering and troubleshooting. (I've worn out the F10 key on my keyboard)
Michael,
I'm hoping someone on this board will contact me to build the camera boards...
It took me an hour to solder everything together onto a prototype board.
It'll be difficult to get the Propeller to "tell what is in the image" - even supercomputers with much more memory can't get close to what the human brain can do. But, experimenting with ViewPort should let hobbyists implement simple Vision algorithms to help robots see.
JonKopp,
I believe your suggestion could work... Have a try once ViewPort is released- would be good to get interesting measurements of high frequency signals.
Maybe you can use ViewPort to see "what just happened"? It lets you view your Propeller's memory over time.
Hanno
Thank you for your opinion about the "smart camera". But with a limit on certain objects and a "grow up propeller" down the road, there could be some possibilities. Anyway, I am a newcomer and need to learn lot more...
With Viewport V2, do we have to use a propeller demo board?
I have a propeller educational kit, can I use this kit with Viewport V2?
Propeller and Viewport are great products for my starting adventure.
Michael
I'm anxiously awaiting the code release - soon?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
JMH
I think the great talent on this board will do many great things with the Propeller- robotic vision included.
ViewPort v2 works with all Propellers running at 80Mhz. We test on the Protoboard, Education Kit, and Demoboard. V2 now supports 2 baud rates, 2mbps for people using the Parallax USB PropPlug and 115kbps for people using a plain serial port or other configuration.
Quantum- and others,
If you promise to leave feedback/comments by private message, you can download a final candidate of ViewPort v2:
mydancebot.com/setup.exe Remember, this is not the final release- so don't expect perfection and you will have to upgrade to the official v2 when it's released.
Hanno
Download it here mydancebot.com/viewport/r_download.php
Hanno
Post Edited (Hanno) : 12/21/2007 6:36:08 AM GMT
So what is the point of sampling at 80MSPS when you can only hold on to 5MSPS of it?·I guess i could see benefits if you never had to write the data to the hub or send it to outa, but then youd probably have to be doing some DSP or thruput functions, since youd·have only 496 samples per cog·buffered before you have to produce a processed result or start dumping the cog·ram due to buffer overflow.· At 80MSPS, there would be only·24uS between the time you sample INA and the time you have to·move the data out of cog ram, that is , if you want to write to your cog·registers·at the speed you read your INA port (80msps), which id prefer.
Anyone have thoughts on this?
ViewPort samples the INA port at 80Mhz and then displays that data like an oscilloscope or logic analyzer would. Those instruments typically cost thousands of dollars.
ViewPort gives you that power for a much lower price- and is easier to use since you don't have to connect logic probes to anything- typically all the signals you wish to measure are the processors IO pins...
Each cog takes 360 samples (the remainder of the 496 longs is taken up by the program which will take another sample as soon as the next trigger fires). So, 4 cogs will give you 1440 samples of 32 bits. A sample is taken every 12.5 nanoseconds, so all 1440 measurements are taken in 18 microseconds. At 32 bits/sample, this gives you a datarate of 80Mhz*32bits/sample=
2.56Gbit/second!
The limiting factor is the 2mbps connection, this "only" allows ViewPort to render and display a new measurement ~40 times/second.
Would be interesting to see if other people have different uses for this object...
Hanno
· I have downloaded the program but not installed it. I have the prop hooked thru a usb cable.
Thanx...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mosquito: An animal which buzzes in your ear and never stops. He may byte you, he may nibble you, but you will know you were bit.
Technologically challenged individual, Please have pity.
ViewPort consists of:
- a set of Objects you can integrate into Propeller programs and
- a Windows Application that communicates with the Propeller.
There are 4 objects:
- ViewPort Conduit : lets the ViewPort windows application read and write Propeller memory at high speed
- QuickSample : samples the INA port (which represents the state of the 32 IO pins) at up to 80Mhz
- Fuzzy Logic Engine : lets you calculate with fuzzy logic
- Video Capture : captures ntsc video with an 8 bit ADC into a 24KB buffer, which can be streamed to the Windows Application, or used for vision research
You need a Propeller connected to your Computer to run tutorials 1..6
(You don't even need a USB connection, ViewPort v2 has a setting under Edit/Preferences that let's you disable the 2mbps baud rate. Doing this will allow you to use a standard serial connection, a very slow computer 100Mhz PC, or even crystals faster/slower than 5mhz)
All tutorials and objects are documented with items you need, instructions, theory, etc.- just view the spin file.
The demo is real- nothing is simulated.
People have taken lots of interesting measurement with ViewPort- check out sample applications here:
http://mydancebot.com/viewport/applications.php
Hanno
Download Viewport