User Tools

Site Tools


nsl_cylon_ii

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

nsl_cylon_ii [2013/08/13 12:13] (current)
Line 1: Line 1:
 +Next version of the Cylon
 +
 +<​center>​[[Image:​Cylonii.jpg|300px]]<​BR>​
 +<​html>​
 +<object type="​application/​x-shockwave-flash"​ width="​400"​ height="​225"​ data="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ classid="​clsid:​D27CDB6E-AE6D-11cf-96B8-444553540000">​ <param name="​flashvars"​ value="​intl_lang=en-us&​photo_secret=6d11a22ebf&​photo_id=5273261493"></​param>​ <param name="​movie"​ value="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"></​param>​ <param name="​bgcolor"​ value="#​000000"></​param>​ <param name="​allowFullScreen"​ value="​true"></​param><​embed type="​application/​x-shockwave-flash"​ src="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ bgcolor="#​000000"​ allowfullscreen="​true"​ flashvars="​intl_lang=en-us&​photo_secret=6d11a22ebf&​photo_id=5273261493"​ height="​225"​ width="​400"></​embed></​object>​
 +
 +<object type="​application/​x-shockwave-flash"​ width="​400"​ height="​225"​ data="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ classid="​clsid:​D27CDB6E-AE6D-11cf-96B8-444553540000">​ <param name="​flashvars"​ value="​intl_lang=en-us&​photo_secret=8a06492874&​photo_id=5281213262"></​param>​ <param name="​movie"​ value="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"></​param>​ <param name="​bgcolor"​ value="#​000000"></​param>​ <param name="​allowFullScreen"​ value="​true"></​param><​embed type="​application/​x-shockwave-flash"​ src="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ bgcolor="#​000000"​ allowfullscreen="​true"​ flashvars="​intl_lang=en-us&​photo_secret=8a06492874&​photo_id=5281213262"​ height="​225"​ width="​400"></​embed></​object>​
 +<BR>
 +<object type="​application/​x-shockwave-flash"​ width="​400"​ height="​225"​ data="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ classid="​clsid:​D27CDB6E-AE6D-11cf-96B8-444553540000">​ <param name="​flashvars"​ value="​intl_lang=en-us&​photo_secret=74b80c710f&​photo_id=5282725776"></​param>​ <param name="​movie"​ value="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"></​param>​ <param name="​bgcolor"​ value="#​000000"></​param>​ <param name="​allowFullScreen"​ value="​true"></​param><​embed type="​application/​x-shockwave-flash"​ src="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ bgcolor="#​000000"​ allowfullscreen="​true"​ flashvars="​intl_lang=en-us&​photo_secret=74b80c710f&​photo_id=5282725776"​ height="​225"​ width="​400"></​embed></​object>​
 +<BR>
 +
 +<a href="​http:<​nowiki>//</​nowiki>​www.flickr.com/​photos/​51925658@N08/​5281956971/"​ title="​Another revision, 30 LEDs, but with via's, while this was CNCing i removed all but one of the vias by charlie _x, on Flickr"><​img src="​http:<​nowiki>//</​nowiki>​farm6.static.flickr.com/​5126/​5281956971_d756805dd2.jpg"​ width="​500"​ height="​375"​ alt="​Another revision, 30 LEDs, but with via's, while this was CNCing i removed all but one of the vias" /></​a>​
 +
 +<BR>
 +<object type="​application/​x-shockwave-flash"​ width="​400"​ height="​225"​ data="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ classid="​clsid:​D27CDB6E-AE6D-11cf-96B8-444553540000">​ <param name="​flashvars"​ value="​intl_lang=en-us&​photo_secret=5a9c3a6dee&​photo_id=5288997572"></​param>​ <param name="​movie"​ value="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"></​param>​ <param name="​bgcolor"​ value="#​000000"></​param>​ <param name="​allowFullScreen"​ value="​true"></​param><​embed type="​application/​x-shockwave-flash"​ src="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ bgcolor="#​000000"​ allowfullscreen="​true"​ flashvars="​intl_lang=en-us&​photo_secret=5a9c3a6dee&​photo_id=5288997572"​ height="​225"​ width="​400"></​embed></​object>​
 +<BR>
 +<object type="​application/​x-shockwave-flash"​ width="​400"​ height="​225"​ data="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ classid="​clsid:​D27CDB6E-AE6D-11cf-96B8-444553540000">​ <param name="​flashvars"​ value="​intl_lang=en-us&​photo_secret=c0ee4c4c18&​photo_id=5287915438"></​param>​ <param name="​movie"​ value="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"></​param>​ <param name="​bgcolor"​ value="#​000000"></​param>​ <param name="​allowFullScreen"​ value="​true"></​param><​embed type="​application/​x-shockwave-flash"​ src="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ bgcolor="#​000000"​ allowfullscreen="​true"​ flashvars="​intl_lang=en-us&​photo_secret=c0ee4c4c18&​photo_id=5287915438"​ height="​225"​ width="​400"></​embed></​object>​
 +<BR>
 +<a href="​http:<​nowiki>//</​nowiki>​www.flickr.com/​photos/​51925658@N08/​5289426722/"​ title="​data by charlie _x, on Flickr"><​img src="​http:<​nowiki>//</​nowiki>​farm6.static.flickr.com/​5121/​5289426722_1a697a59c6.jpg"​ width="​375"​ height="​500"​ alt="​data"​ /></​a>​
 +<object type="​application/​x-shockwave-flash"​ width="​400"​ height="​225"​ data="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ classid="​clsid:​D27CDB6E-AE6D-11cf-96B8-444553540000">​ <param name="​flashvars"​ value="​intl_lang=en-us&​photo_secret=9e563ee711&​photo_id=5295064918"></​param>​ <param name="​movie"​ value="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"></​param>​ <param name="​bgcolor"​ value="#​000000"></​param>​ <param name="​allowFullScreen"​ value="​true"></​param><​embed type="​application/​x-shockwave-flash"​ src="​http:<​nowiki>//</​nowiki>​www.flickr.com/​apps/​video/​stewart.swf?​v=71377"​ bgcolor="#​000000"​ allowfullscreen="​true"​ flashvars="​intl_lang=en-us&​photo_secret=9e563ee711&​photo_id=5295064918"​ height="​225"​ width="​400"></​embed></​object>​
 +
 +
 +</​html>​
 +[[Image:​Cylonii.png|300px|Cylon II 30 LED version]]
 +[[Image:​NSL_CylonII.bmp|300px|Cylon II 30 LED version]]
 +</​center>​
 +
 +===== Current Features =====
 +  *  <​del>​20</​del>​ 30 1206 LEDs
 +  *  3x momentary switch (metal) [[http://​www.hcc-ht.com/​products/​product_show.asp?​id=239|Hengtai]] [http://​www.sparkfun.com/​products/​10063 SFE]
 +  *  [[http://​www.atmel.com/​dyn/​resources/​prod_documents/​doc2543.PDF|ATTiny2313 Data sheet]] [http://​www.mouser.com/​ProductDetail/​Atmel/​ATtiny2313-20MU/?​qs=sGAEpiMZZMvu0Nwh4cA1wUVlLgw9m2DPTluF8PwYHTc%3d Mouser] [[http://​search.digikey.com/​scripts/​DkSearch/​dksus.dll?​Detail&​name=ATTINY2313V-10MU-ND|Digikey]] /  [[http://​www.atmel.com/​dyn/​resources/​prod_documents/​8183S.pdf|Attiny24 Datasheet]] [http://​search.digikey.com/​scripts/​DkSearch/​dksus.dll?​Detail&​name=ATTINY24A-MU-ND Digikey]
 +  *  PWM speaker [[http://​parts.digikey.com/​1/​parts/​66-buzzer-audio-magnetic-3-6vdc-smd-ccv-084b16.html|Buzzer]] [http://​products.cui.com/​getpdf.aspx?​filename=Buzzers_BuzzerSounds.pdf How the buzzer works] [[http://​products.cui.com/​getpdf.aspx?​filename=CCV-084B16.pdf|Datasheet]]
 +  *  Serial TX/RX
 +  *  SPI
 +  *  JTAG
 +  *  ASM and C versions of the code
 +  *  One wire debug, which frees up the SPI mode.
 +
 +=====  Options ​ =====
 +  *  Microphone (ATtiny24 version only) or some discreet ADC for 2313 [[http://​www.analog.com/​static/​imported-files/​data_sheets/​ADMP401.pdf|MEMS Microphone]] [http://​www.mouser.com/​ProductDetail/​Knowles-Acoustics/​SPM0408HE5H/?​qs=sGAEpiMZZMsYQxPYEnGVuP8H1McxAp6rWsVPaOTTRSY%3d SPM0408HE5H] [[http://​www.akustica.com/​products/​documents/​PB9-1.0AKU2002CProductBrief.pdf|Digital MEMS Microphone]]
 +  *  5 way switch [[http://​www.hcc-ht.com/​products/​product_show.asp?​id=247|Hengtai]] [http://​www.hcc-ht.com/​products/​product_show.asp?​id=247 Datasheet] [[http://​www.sparkfun.com/​products/​10063|SFE]] ​
 +
 +=====  Todo  =====
 +  * <​del>​Shrink size (maybe)</​del>​ shrunk
 +  * <​del>​Decide on 30 or 20 LEDs</​del>​ (30)
 +  * Finish code and upload to wiki
 +  * Figure out the deal with TV-B-Gone mode
 +
 +=====  Charlieplexing ​ =====
 +
 +Use this link to load and create a circuit simulator, //this needs Java// ​ [[http://​www.falstad.com/​circuit/#​%24+1+5.0E-6+10.20027730826997+50+5.0+50%0Ar+320+192+416+192+0+100.0%0AL+208+192+176+192+0+0+false+5.0+0.0%0Aw+320+192+288+192+0%0Aw+208+192+224+192+0%0Aw+208+272+224+272+0%0Aw+320+272+288+272+0%0AL+208+272+176+272+0+1+false+5.0+0.0%0Ar+320+272+416+272+0+100.0%0A162+448+192+448+272+1+2.1024259+1.0+0.0+0.0%0A162+496+272+496+192+1+2.1024259+1.0+0.0+0.0%0Aw+416+192+448+192+0%0Aw+448+192+496+192+0%0Aw+416+272+448+272+0%0Aw+448+272+496+272+0%0As+224+192+288+192+0+0+false%0As+224+272+288+272+0+0+false%0A|Two LEDs]] ​
 +
 +
 +
 +  *  Toggle the H and L with the mouse, use the switch to turn on and off the line, this basically simulates '​tristate'​ ON(H) OFF(L) and Dont care(X), but we only need HIGH and LOW for this first step. You can switch on two LED's by switching the H and L.
 +
 +<HR>
 +
 +  *  Now we expand to use the tri-state [[http://​www.falstad.com/​circuit/#​%24+1+5.0E-6+10.20027730826997+50+5.0+50%0Ar+320+144+416+144+0+100.0%0AL+208+144+176+144+0+0+false+5.0+0.0%0Aw+320+144+288+144+0%0Aw+208+144+224+144+0%0Aw+208+224+224+224+0%0Aw+320+224+288+224+0%0AL+208+224+176+224+0+0+false+5.0+0.0%0Ar+320+224+416+224+0+100.0%0A162+448+144+448+224+1+2.1024259+1.0+0.0+0.0%0A162+496+224+496+144+1+2.1024259+1.0+0.0+0.0%0Aw+416+144+448+144+0%0Aw+448+144+496+144+0%0Aw+416+224+448+224+0%0Aw+448+224+496+224+0%0As+224+144+288+144+0+0+false%0As+224+224+288+224+0+1+false%0Ar+320+320+416+320+0+100.0%0A162+448+224+448+320+1+2.1024259+1.0+0.0+0.0%0A162+496+320+496+224+1+2.1024259+1.0+0.0+0.0%0As+224+320+288+320+0+0+false%0AL+192+320+176+320+0+0+false+5.0+0.0%0Aw+416+320+448+320+0%0Aw+448+320+496+320+0%0Aw+320+320+288+320+0%0Aw+224+320+192+320+0%0A162+576+320+576+144+1+2.1024259+1.0+0.0+0.0%0A162+624+144+624+320+1+2.1024259+1.0+0.0+0.0%0Aw+496+144+576+144+0%0Aw+576+144+624+144+0%0Aw+496+320+576+320+0%0Aw+576+320+624+320+0%0A|3 Pins 6 LED]]
 +\\
 +By changing the H/L inputs and  switches to on or off, that you can control each LED separately. Simulating a tristate, on off and not connected, or [[http://​en.wikipedia.org/​wiki/​High_impedance|high impedance]].
 +
 +
 +
 +<HR>
 +
 +<​java_applet ​
 +<​code>​
 + ​code=Circuit
 + ​height="​550"​ width="​500" ​
 + ​archive="​Circuit1.jar" ​
 + ​p1name="​pause"​ p1value=20 ​
 + ​p2name="​startCircuit"​ p2value="​cp.txt" ​
 + ​p3name="​startLabel" ​ p3value="​Charlieplexed" ​
 + ​p4name="​useFrame"​ p4value="​false"</​code>​
 +/>
 +
 +<HR>
 +The number of LED's that can be charlieplexed is determined by the following formula OUPUTS*(OUTPUTS-1). ​ So if you have 3 pins, that is 3*2 = 6. Additionally (OUPUTS-1) LED's switched on at any one time So with 3 pins you can have two LED's on at any one time. 
 +
 +This works because LED's are diodes, so they'​ll let the current flow one way, but not the other way and that on some uC's you can set high low and dont care (which is typically input). When the pin is input mode, it doesn'​t affect the circuit since its just reporting what is there. A visualisation of this is in the simulator by way of the current flow.
 + 
 +Wikipedia has a write up too [[http://​en.wikipedia.org/​wiki/​Charlieplexing|wikipediafile]]
 +
 +=====  Design notes  =====
 +
 +During the build a few mistakes were made, first simple copy paste errors in schematic and not triple checking the label names, its easy to do and no matter how many times you go over it, it'll likely happen this is where the wire jumpers come into place. Another problem was the metal switch has a clip underneath that just happened to touch the trace to the speaker so shorted it out when pressed (only affects the CNC versions, since there is no mask). ​ This maybe related to the actual switch itself and using the wrong hotplate soldering profile, as the cover came loose. however the trace still needs to move, just in case.
 +
 +Finally on the 3rd revision I managed to somehow isolate the ground from the battery ​ and eagle didn't pick it up, a quick trim with the knife and it was fixed, again easy to do we added another trace to the already working board, shrunk the dimensions, and sliced the ground plane. Eagle will normally show an airwire, but I've noticed sometimes it doesn'​t if you don't do a ratsnest command.
 +
 +Power usage is higher, with 200 ohm resistors and the speaker running constantly with all led's lit, we get about 5 hours runtime, with 470 ohm resistors it looks to be about 8. This is with continuous tone and all led's. with running mode and no speaker so far the the first prototype has been going strong for about two days, its using 280 ohm resistors (we're using different resistor values to alter the brightness of the LEDs). Next power test is to have the LED's do various modes and the speak play music and see how long that lasts. Adding a resistor to the speaker may help too.
 +
 +Turned out the speaker was on all the time !
 +
 +Added larger battery holders , CR2450s. Tried 6V with white leds and two CR2032s , tried two CR2025s in CR2450 holder (all variations seem to work)
 +New speaker? 10V for a 1/2 second didn't blow the chip!!
 +
 +=====  Virtual Cylon II  =====
 +
 +We're going to try to offer people a way to make the Cylon II before getting hardware, both hardware and software emulation.
 +
 +Here are some links for you to try this too, some of these do circuits, some do mcus, so do AVR's, none of them may do the ATTiny2313 but you can add it if they don't.
 +
 +Some of the ways of doing this are just to write a tool that does the patterns, but doesn'​t let you do the code. Then we can emulate the CPU and the LEDs, speakers etc. A circuit simulator can do a good job of emulating the charlieplexing and pwm, which will let you look at whats going on in the circuit.
 +
 +Software links
 +  * {{:​nsl_cylonii.c}}
 +  * [[http://​www.linear.com/​designtools/​software/​ltspice.jsp|LTSPICE]] free
 +  * [[http://​www.ni.com/​multisim/​|MultiSim]] Not free, but 30 day demo
 +  * [[http://​gna.org/​projects/​avr-sim/​|AVR-Sim]]
 +  * [[http://​code.google.com/​p/​avr-sim/​updates/​list|AVR-Sim]]
 +  * [[http://​www.amctools.com/​vmlab.htm|VMLab]]
 +  * [[http://​gitorious.org/​simavr|SimAVR]]
 +  * [[http://​avr.sourceforge.net/​|ATMEL AVR Simulator]]
 +  * [[http://​compilers.cs.ucla.edu/​avrora/​|Avrora]]
 +  * [[http://​sourceforge.net/​projects/​avr/​|AVR simulator]]
 +  * [[http://​sourceforge.net/​projects/​avrsimu/​|AVR Simu]]
 +
 +=====  Code  =====
 +Available on the [[http://​wiki.032.la/​nsl/​NSL_SVN_Server|NSL SVN]]
 +
 +Under "/​032/​NSL_CylonII/"​
 +Make sure the CLKDIV8 fuse is set "​off"​.
 +
 +=====  Revision Log  =====
 +  *  Added two extra switches
 +  *  Moved leds closer
 +  *  Changed order of IO extensions to match mmca's ir sensor g/v/s
 +  *  Added logo
 +  *  Approved at BatchPCB
  
nsl_cylon_ii.txt ยท Last modified: 2013/08/13 12:13 (external edit)