#avr | Logs for 2017-01-01

Back
[01:34:44] <rue_bed> :) 1 mre hour forme
[01:42:57] <Chillum> it is hard to stay up to midnight
[01:43:28] <rue_house> everyones here is blowing up an hour early
[01:44:01] <rue_house> boy, that yellow baloon is annoyed
[02:30:10] <rue_house> happy new years!!!!!
[06:55:11] <inflex> if you're bored (yeah right), putting up YT videos now of my varisou builds, this is my AVR USB switch to switch USB3 cables on/off https://www.youtube.com/watch?v=EiZVKYFZugk
[07:35:58] <rue_bed> dear god! the tiny26 has a 64Mhz pll and NOBODY TOLD ME
[07:37:57] <specing> but does it run at 64 MHz?
[07:44:49] <Jartza> attiny25/45/85 has it too
[07:45:43] <specing> loooks like rue_bed has been living under a rock all this time ;p
[07:54:32] <rue_bed> I'm having a time mentally wrapping my mind around how to do rpm measurement and pwm at the same time on the tiny13
[07:54:39] <rue_bed> with 1 8 bit timer
[07:54:58] <rue_bed> I think it requires more inguinuity than I want to implement
[07:55:53] <specing> why not get a bigger chip?
[07:55:58] <antto> put two tinys or one bigie
[07:56:34] <specing> surely your time is worth more than the price difference between t25 and t13
[08:13:38] <rue_bed> cause the inputs will be 1) opto interrupter, and 1) analog channel, the outputs will be 1) pwm channel
[08:13:46] <rue_bed> seems fine for a 8 pin chip
[08:14:09] <rue_bed> rather not use a qfp144 for 3 signal lines and 2 power lines
[08:14:17] <rue_bed> yaknow?
[08:15:33] <rue_bed> ( still want to use the tiny13)
[08:16:29] <inflex> mmm.. T25's are nice, i've used a lot of them for when I needed to avoid too many quirks, esp when making brushed ESCs
[08:17:31] <inflex> I did design it for the T13 originally but the dual timers on the T25 made life easier.
[08:52:42] <Lambda_Aurigae> hoppy nude beer.
[09:31:23] <Emil> rue_bed: eh? The PLL is not anything fancy
[09:31:37] <Emil> you cant use it yourself
[09:32:20] <Emil> Well, one can run the chip at ~28MHz (32 in theory) with it but eh
[09:36:55] <Tigzee> rue_bed, I already told you how
[09:38:48] <Emil> rue_bed: eh? just use interrupts
[09:40:08] <Tigzee> rue_bed, just measure the time between the pulses using interrupt and your counter can be in pwm mode (which still counts from 0 to 0xFF continuously)
[09:40:59] <Emil> rue_bed: is your input signal what
[09:41:08] <Emil> you said analog and also interrupt
[09:41:16] <Emil> is there a difference between the two for you?
[09:48:08] <Tigzee> What would the benefit of having a 64mhz pll give you when the core has to be clocked at a 1/4?
[09:49:08] <Tigzee> would that mean hardware uart and spi would get a speed boost?
[09:51:33] <Emil> Tigzee: nah, you can run the whole thing at the half speed
[09:52:04] <Emil> But yeah, the 64MHz pll is just for to being able to actually use the things inside
[09:53:05] <Tigzee> so, if it doesn't increase speed with the io pins, and the cpu is forced to have a 1/4 divisor with 64mhz (making it 16mhz) then the only benefit I can see, is you have your core running at 16mhz with the internal oscilator
[09:53:43] <Tigzee> It is supposed to make your counters run faster, but I don't know how this would be useful when all the io's for it can't run faster
[11:29:48] <Jartza> Tigzee: pwm can run faster
[11:29:58] <Jartza> eg. faster frequency
[11:46:52] <carabia> Tigzee: you can actually run the system clock closer to 1/2 of that ;D
[12:40:37] <Emil> carabia: I mentioned this but he diaregarded it
[12:41:26] <Emil> 28MHz is a realistic figure to get out of it. 32MHz in theory but it just doesn't eant to ge there at room temperature
[12:41:47] <Emil> want*, go*
[17:25:45] <carabia> eerily empty
[17:26:07] <Lambda_Aurigae> been kinda quiet for almost 5 hours.
[17:26:56] <carabia> i just got here and was in the mood for trolling
[17:27:34] <carabia> i was sorely disappointed
[17:28:51] <Lambda_Aurigae> yeah.
[17:28:53] <Lambda_Aurigae> sorry bout that.
[17:28:59] <Lambda_Aurigae> my trolling motor is in the shop.
[20:59:06] <rue_house> so, for the rpm regulator
[20:59:10] <rue_house> here is the new idea,
[20:59:23] <rue_house> no interrupt driven adc
[20:59:56] <rue_house> use the counter for the pwm
[21:00:05] <rue_house> use the main loop to count the rotation
[21:01:17] <rue_house> so the main loop will count rotation (with timeout), read/restart adc, calculate / update new pwm value, and repeat
[21:01:35] <rue_house> WHAT COULD POSSIBLY GO WRONG!
[21:01:47] <rue_house> ok
[21:01:48] <rue_house> so
[21:03:11] <rue_house> I need to know how many counts a main loop can pull off in .. damn not enough scroollback buffer
[21:03:43] <rue_house> 500 rpm is 8.33 rps
[21:04:15] <rue_house> 8.3333Hz is 120ms, but thats for one line, so its about 60ms
[21:04:31] <rue_house> so, at 1.2Mhz, how many counts can an avr pull off in 1.2ms
[21:09:44] <rue_house> 60ms
[23:22:41] <rue_shop3> this is new
[23:23:03] <rue_shop3> I set PB2 to input and, once the software it written, I cant rewrite the chip
[23:28:30] <Casper> PB2 = reset?
[23:36:53] <rue_shop3> no, 5, but a different programmer was ok
[23:36:54] <rue_shop3> !?!
[23:37:03] <rue_shop3> ok, I'm getting .008ms/count
[23:37:20] <rue_shop3> so the range is 2Hz to 23.5Khz
[23:38:41] <rue_shop3> and my operating range is 16hz to 333Hz
[23:42:05] <rue_shop3> so, at min speed we have 7500 counts, and at top speed we have 7500 counts
[23:42:22] <rue_shop3> there are 10 bit adc values
[23:42:33] <rue_shop3> so, our count delta is
[23:43:01] <rue_shop3> wow, ..
[23:43:13] <rue_shop3> at min speed we have 7500 counts and at top speed we have 375 counts
[23:43:26] <rue_shop3> range of 7125 counts
[23:43:32] <rue_shop3> the adc is 1023 counts
[23:43:48] <rue_shop3> about 7x
[23:44:15] <rue_shop3> so I'll mult the adc by 8 and add 375
[23:44:25] <rue_shop3> then do the error calcs on that
[23:49:05] <rue_shop3> ok, so thats apples and apples...
[23:53:00] <rue_shop3> now, how much gain should I put in