#avr | Logs for 2014-11-05

Back
[05:02:00] <guanche> guys, what would be the best option for a motor that I can use to recharge my cell phone?
[05:02:26] <guanche> I guess a stepper because ot produces more power at low revs than a regular dc motor?
[05:02:44] <guanche> I mean, using my bike
[05:28:11] <STS_Patrik> any suggestion on a chip i can use for RFID tagging? I want to be able to programme it with my phone and also have an interface to my MCU (i2c, spi or uart)
[06:06:13] <Lambda_Aurigae> guanche, they used to sell a little bike generator specifically for running lights on your bike...I had several over the years.
[06:07:14] <Lambda_Aurigae> http://www.aliexpress.com/item/Bicycle-Bike-Cycling-front-headlamp-Tail-Light-taillight-for-Friction-generator/1751642475.html?af=ppc&isdl=y&src=Google&albch=Google&aff_short_key=6vYvMRFf&gclid=CIrSv6Wy48ECFQqCMgodxQsAgg
[06:07:21] <Lambda_Aurigae> generator and lights combined.
[06:07:56] <Lambda_Aurigae> bit of electronic regulation magic and you could turn that into a phone charger I bet.
[06:08:33] <Lambda_Aurigae> it puts out 6V
[06:08:44] <Lambda_Aurigae> label says 6V-3W
[06:48:07] <guanche> well, the point was to do the same with readily available parts Lambda_Aurigae
[06:48:27] <Lambda_Aurigae> I have found that steppers don't make real good generators.
[06:48:46] <guanche> yes, I'm noticing the same
[06:48:54] <guanche> let appart regular dc motors
[06:48:57] <darsie> I wanted to count impulses from my geiger-mueller tube while power-down sleeping with async counter2 and display the count when the watchdog wakes me up every second, but async counter2 can only be read after positive edges while clk_io is running, and my counter pulses come as slow as every 3 s (average), so that doesn't seem viable :(.
[06:50:01] <Lambda_Aurigae> guanche, a heavy brushless dc motor might work but you need to rip out the electronics.
[06:50:35] <guanche> a heavy brushless? and how you deal with it's three phase?
[06:50:47] <Lambda_Aurigae> diodes
[06:51:01] <Lambda_Aurigae> treat each phase as a single AC generator.
[06:51:09] <Lambda_Aurigae> use a full wave rectifier on each phase.
[06:51:22] <Lambda_Aurigae> or a single diode for half wave on each phase.
[06:51:23] <guanche> and then a 7805?
[06:51:24] <darsie> There are three phase rectifier circuits.
[06:51:55] <Lambda_Aurigae> see what voltage you get out of it, but, yeah, a 7805 should handle it if your output voltage is 7.5V or higher.
[06:52:20] <guanche> I might try with one then
[06:52:43] <guanche> I have a couple arround, but all with hall sensor circuits I made for controlling them through pwm
[08:21:30] * LeoNerd realises he's spent the past hour in inkscape and eagle fine-tuning a 0.3" square logo to silkscreen
[08:21:39] <LeoNerd> I should probably do some Actual Work
[15:30:12] <Jordan_U> I'm trying to program an ATMega64M1 using a atprogram and a JTAGICE3, programming the same chip via Atmel Studio works fine but running "atprogram -t jtagice3 -i pdi -d atmega64m1 program -f "X:\Path\to\file.hex" --format hex" fails with the following error message: http://paste.debian.net/plain/130453 . Any ideas how to get atprogram working?
[15:48:39] <LeoNerd> ... wtf is a 64M1?
[15:53:38] <Jordan_U> LeoNerd: http://www.atmel.com/devices/atmega64m1.aspx
[16:45:27] <Tom_itx> what is atprogram?
[16:55:41] <Tom_itx> Jordan_U, does your jtagice support PDI or is it an older one?
[17:07:15] <Jordan_U> Tom_itx: Atprogram is Atmel's command line based programming tool, which I'd like to use to automate programming of the chip. Because of your comment, I realised that I probably should have used "-i isp" instead of "-i pdi", but with "-i isp" I get the same error message (indeed, with any value of -i I seem to get the same error message, even "-i bogus") .
[17:07:32] <Tom_itx> i remember now... i recomended it to you :)
[17:17:43] <Jordan_U> :)
[17:18:19] <Jordan_U> Tom_itx: And thanks for that, it will be exactly what I want once it's actually working :)
[18:50:03] <N1njaneer> So quiet lately.
[19:39:28] <darsie> N1njaneer: Noone replied to what I said.
[19:43:55] <N1njaneer> When?
[19:44:47] <darsie> 13:29:21 <darsie> I wanted to count impulses from my geiger-mueller tube while power-down sleeping with async counter2 and display the count when the watchdog wakes me up every second, but async counter2 can only be read after positive edges while clk_io is running, and my counter pulses come as slow as every 3 s (average), so that doesn't seem viable :(.
[19:44:53] <darsie> MEZ
[19:44:59] <darsie> CET
[19:45:20] <darsie> now 2:25
[19:45:32] <N1njaneer> There's no question?
[19:45:37] <darsie> right
[19:45:54] <darsie> I was hoping for ... objections.
[19:46:11] <Tom_itx> generally questions get replies
[19:46:43] <N1njaneer> darsie: Why not just wake up on count events, increment counter, resleep?
[19:47:12] <darsie> N1njaneer: Waking up up to 300? times/s probably won't save energy.
[19:47:43] <N1njaneer> You said the counter pulses come as slow as ever 3 seconds.
[19:47:58] <N1njaneer> What's average? And what are you trying to do on the broadstroke application?
[19:48:10] <darsie> They do. But if something radioactive is nearby, they come faster.
[19:48:27] <N1njaneer> What type of display are you using?
[19:48:27] <darsie> Make a low power geiger counter.
[19:48:42] <darsie> 16*2 LCD
[19:49:48] <darsie> Waking up up to 300? times/s probably consumes more power than just counting with timer0 (timer1?) with clk_io on.
[19:50:12] <N1njaneer> More useful to make measurements than speculations. :)
[19:50:24] <N1njaneer> Measure power consumption, adjust if necessary.
[19:50:27] <LoRez> I second the measurements > speculations
[19:51:34] <N1njaneer> If necessary you could also do something like place a very low power ripple counter external to the chip, and just increment that. It will divide your rate down substantially. Then either wake the micro when the ripple counter overflows, or read the current value of the ripple counter when the watchdog wakes up for the display.
[19:51:59] <N1njaneer> But certainly do not blindly optimize without a solid basis for necessity first. :)
[19:52:09] <N1njaneer> Sometimes things turn out easier than expected, sometimes not.
[19:53:34] <darsie> I thought of an external counter. But how can it be read cleanly? serially? Or can it be made to output its state cleanly?
[19:53:39] <N1njaneer> The ripple counter approach would work if all you need is an accumulated count per unit time, vs say needing to track time between counts.
[19:54:14] <N1njaneer> Something like a 74xx393 could just be wired straight to a port of GPIO pins and give you a 256 count between overflows.
[19:55:28] <darsie> Actually, consuming <5 mA is quite ok, I think. But I like to optimize.
[19:55:51] <N1njaneer> Don't optimize prematurely is my point, else you are just wasting time.
[19:56:09] <darsie> There's a commercial counter which doesn't even have an off switch cause it draws so little power.
[19:56:16] <darsie> Gammascout
[19:56:37] <N1njaneer> Measure how much current your LCD consumes.
[19:56:47] <darsie> I already got a lower power model.
[19:57:00] <darsie> It's about 1.5 mA, IIRC.
[19:57:06] <N1njaneer> That's quite a lot.
[19:57:56] <N1njaneer> Again, I would do the implementation with the micro and see how it does, then optimize from there.
[19:57:59] <Tom_itx> OLED
[19:57:59] <darsie> Yeah, well, it has to do IO and constantly power the lines and rows ...
[19:58:20] <N1njaneer> Because your LCD is probably going to draw more than the micro, if implemented correctly.
[19:58:22] <darsie> s/power/drive
[20:03:34] <darsie> I mean, I got a lower power LCD than the 1.5 mA one I'm using right now.
[20:04:37] <N1njaneer> Cool :)
[20:04:44] <Tom_itx> Jordan_U you around?
[20:04:54] <Lambda_Aurigae> low power...go e-ink!
[20:05:17] <darsie> Lambda_Aurigae: Good idea. Is it expensive?
[20:05:32] <Lambda_Aurigae> probably.
[20:05:57] <Tom_L> Jordan_U, i just tried using atprogram with a simple blink and it works fine
[20:06:02] <darsie> Will update once/s.
[20:06:05] <N1njaneer> eInk is good if you need to update infrequently. LCD is still going to be lower power if all you need is displaying a number.
[20:06:11] <Tom_L> Jordan_U, then i did a chip erase and that also worked
[20:06:37] <Tom_L> Jordan_U, here are the commands i used: atprogram -t avrispmk2 -p usb -i isp -d atmega128 program -f C:\avrtest\atmega128\blink_led.hex
[20:06:45] <Tom_L> atprogram -t avrispmk2 -p usb -i isp -d atmega128 chiperase
[20:07:25] <Tom_L> i left off the -i option at first but it asked me for it
[20:07:26] <darsie> The gamma scout isn't using a character matrix, but individual elements, so it can drive them directly, statically, IMO. But I think that's not an option for me (atm).
[20:08:11] <Tom_L> Jordan_U, and i didn't specify a spi clock rate either so it was slow
[20:08:20] <Tom_L> i'll try adding that and see if it's faster
[20:08:29] <N1njaneer> darsie: Why not?
[20:09:54] <darsie> N1njaneer: Cause it's not so versatile as a character matrix and I won't have custom LCDs made atm.
[20:10:14] <N1njaneer> Use alphanumeric ones?
[20:10:18] <darsie> I'm not even sure what they should look like.
[20:11:00] <darsie> N1njaneer: They exist? Where you have one pin/element?
[20:11:25] <darsie> and drive them statically instead of row by row?
[20:11:55] <Tom_L> Jordan_U`, atprogram -t avrispmk2 -p usb -i isp -cl 2mhz -d atmega128 program -f C:\avrtest\atmega128\blink_led.hex
[20:11:59] <Tom_L> also worked much faster
[20:12:11] <Tom_L> tried -cl 250khz first
[20:12:24] <darsie> Also I'd need a uC with much more pins.
[20:12:41] <Tom_L> Jordan_U, -cl must be 1/4 the actual clock rate or less
[20:13:40] <Tom_L> Jordan_U, try that and substitute the avrispmk2 for your board and see if that works
[20:15:03] <Tom_itx> ok that was fun. now what?
[20:19:21] <Tom_L> Jordan_U, try this one once; atprogram -t jtagice3 -p usb -i isp -cl 250khz -d atmega64m1 program -f X:\Path\to\file.hex
[20:19:44] <Tom_L> no quotes
[20:21:10] <Tom_L> you might preceed it with this to be safe: atprogram -t jtagice3 -p usb -i isp -d atmega64m1 chiperase
[20:21:42] <Tom_itx> no atmega64m1 to test with here...
[20:30:25] <Tom_itx> you could also put it in a batch file and use %1 for the filename on the cmd line i bet