#avr | Logs for 2013-12-01

Back
[06:39:27] <lxsameer> hi do you know any software to simulate an electrical circuits in linux ?
[06:43:44] <specing> ngspice?
[08:41:24] <beaky> hello
[08:41:43] <beaky> how do i use atsamd20 in my design
[08:54:42] <braincracker> hey
[08:54:47] <braincracker> sup beaky ? ;>
[08:57:38] <beaky> helllo braincracker
[08:58:05] <braincracker> how's your atmega168 ?
[08:58:23] <beaky> its alive and kicking
[08:58:34] <braincracker> some neat projects on it?
[08:58:45] <beaky> just blinking leds
[08:58:52] <braincracker> i need to make an 8 led fader sw now
[08:59:22] <braincracker> i was thinking about sw pwm @ 256Hz 256 levels
[08:59:33] <braincracker> via interrupt
[08:59:42] <beaky> whats a fader
[08:59:45] <braincracker> 8MHz internal osc should handle it
[09:00:10] <braincracker> the led bulbs should gradually increase and decrease light intensity
[09:00:22] <braincracker> alternating, at random sequence
[09:07:00] <braincracker> if the fading works it needs some simple sequence and pwm level control
[09:07:17] <beaky> ah
[09:07:27] <beaky> you use hardware noise source
[09:07:28] <beaky> ?
[09:07:44] <braincracker> 128Hz x 256 levels should do, but i think i'll go for 256x256
[09:08:08] <braincracker> no, i think i will just do a simple pseudorandom sequence
[09:09:35] <braincracker> but i could read some noise off adc if that is what you mean
[10:58:48] <specing> xoring a register with 0xff is supposed to flip its bits, right?
[10:59:21] <Amadiro> specing, yes
[11:03:59] <beaky> right
[11:07:31] <specing> houston, we have a simulator bug
[11:07:44] <specing> (not AVR one, I just came here to check my sanity first)
[13:43:43] <rue_house> maybe its a bug in reality, did you ever consider that?
[13:45:02] <beaky> hello
[13:45:12] <beaky> how do i program my atsamd20
[13:47:32] <rue_house> is that an avr?
[13:47:36] <rue_house> must be new
[13:47:52] <beaky> its the new cortex m0+ chip from ateml
[13:48:08] <beaky> it has many pwm output
[13:50:10] <specing> many doge
[13:50:17] <specing> so much pwm
[13:52:20] <rue_house> atmega324 has like 6 pwm
[14:34:21] <Duality> is it possible to generate an interupt with a timer, and based on this interrupt pwm a whole pin port (by toggeling it on off) ?
[14:35:40] <sirpatrick> sure. That's how a lot of servo libraries work
[14:36:04] <sirpatrick> they implement a round robin based structure that holds all the servo objects and then addjust the period accordingly
[14:36:49] <Duality> cool, so it's possible :) I have been playing with this idea for a while now. trying to figure out how to implement it.
[14:36:59] <sirpatrick> what is your application?
[14:37:04] <Duality> led
[14:37:11] <Duality> I have to pwm a led
[14:37:19] <Duality> An RGB led*
[14:37:26] <sirpatrick> Well first, do you know how to trigger events based on timer interupt bits?
[14:38:04] <Duality> No not really I have done timer interrupt based stuff before, but that has been a while ago
[14:38:09] <sirpatrick> https://github.com/abcminiuser/avr-tutorials/blob/master/Timers/Output/Timers.pdf
[14:38:17] <sirpatrick> Excellent resource for learning about timers
[14:38:25] <sirpatrick> what hardware are you doing this on?
[14:38:27] <abcminiuser> Author's a bit of a muppet tho
[14:38:28] <Duality> thanks!
[14:38:34] <sirpatrick> haha
[14:38:35] <Duality> atmega16
[14:38:40] <sirpatrick> hi abcminiuser!
[14:39:02] <sirpatrick> Yea that tutorial should work great for you
[14:39:53] <abcminiuser> Ahoyhoy
[14:40:00] <Duality> sirpatrick: thanks :) that will keep me busy for a while Atleast. thanks for being such a help! :)
[14:40:15] <sirpatrick> No problem! Make sure to come back if you have any questions!
[16:52:31] <PigFlu> how bad is it to power mcu's from cheap 230->v
[16:52:38] <PigFlu> woops
[16:53:06] <PigFlu> how bad is it to power mcu's from cheap 230->5v usb chargers from ebay?
[17:01:57] <tzanger> depends on how cheap
[17:02:27] <tzanger> ideally you should use 6V/9V/12V adapters and put a cheap little 5V LDO on board, then you don't care for the most part
[17:05:39] <tzanger> if it's for your workbench a nice 0-30V, 0-1A adjustable supply is a very nice tool and can be had used pretty inexpensively
[17:05:49] <tzanger> the current limit feature is great for bringing up new boards
[17:46:06] <hjohnson> my problem is that I'm always powering off of automotive voltage... so I need to be able to handle noisy power form 8v-18VDC
[17:46:17] <hjohnson> so it always winds up being a switcher
[17:47:01] <jacekowski> 7805 will go up to 30V
[17:47:22] <hjohnson> jacekowski: yes, but not efficiently
[17:47:46] <jacekowski> in automotive application you have plenty of power so you don't really care about efficiency
[17:48:04] <hjohnson> jacekowski: it's not technically automotive, it's my boat...
[17:48:17] <jacekowski> watermotive
[17:48:24] <hjohnson> so yes, the electrical system is automotive style, but since it's a sailboat the engine is often not running
[17:48:38] <hjohnson> and you economize every mA you can get
[17:48:48] <jacekowski> but then, you have water cooling so even less problems with heat
[17:49:00] <hjohnson> jacekowski: yes, but I have limited electrical power in my batteries
[17:49:30] <hjohnson> when at anchor, we like to be able to go ~2+ days without firing up the noisemaker
[17:49:44] <jacekowski> solar panels?
[17:50:04] <hjohnson> or I just get good at building small switchers. :)
[17:50:54] <hjohnson> the tank level units i think i'm going to build as a production test... I think I'll do a 5V rail, then LDO down to 3.3v for the avr and the capacitance->digital converter
[17:51:07] <hjohnson> (I need 5V for the CANBus line driver)
[17:51:44] <jacekowski> you can get premade switchers
[17:51:57] <hjohnson> jacekowski: sure, but they're larger and more expensive
[17:52:00] <jacekowski> i even bought 7805 pinout compatible switchmode
[17:52:08] <hjohnson> jacekowski: plus the practice is good for my bigger project
[17:52:10] <jacekowski> and only slightly bigger than 7805
[17:52:20] <hjohnson> (that one has 3 voltage rails)
[17:52:37] <jacekowski> http://www.recom-power.com/pdf/Innoline/R-78xx-0.5.pdf
[17:53:06] <specing> 'tank level units'
[17:53:19] <specing> "inb DIY engineer's sailboat catches fire"
[17:53:22] <specing> inb4*
[17:53:37] <hjohnson> lol
[17:54:19] <hjohnson> as a test of my production skills before doing the big project, I'm looking at building capacitive tank level sensors for the black water holding tank, and the two drinking water tanks
[17:54:35] <hjohnson> (the blackwater tank is especially nasty.. float switches get jammed by poopcicles pretty quickly)
[17:55:13] <hjohnson> so instead, put two conductive strips close together up the side of the tank, and measure the capacitance between them
[17:58:41] <specing> that is a pooptastic idea!
[18:03:29] <jacekowski> hjohnson: i'm not sure how well that will work
[18:03:50] <jacekowski> hjohnson: water like that will have varying effect on capacitance
[18:20:34] <hjohnson> jacekowski: it's 95% plus water... the capacitance won't vary much
[18:20:39] <hjohnson> (other than based on level)
[18:23:37] <hjohnson> jacekowski: dielectric constant of air is roughly one... water at stp has a dielectric constant of around 80
[18:23:56] <hjohnson> even if it has other things dissolved, it won't change the the constant too much
[18:24:00] <hjohnson> (changing constants oh my!)
[19:49:12] <rue_shop2> capacitive based water level sensor?
[19:52:26] <Casper> I investigued them a while ago and almost built one