#avr | Logs for 2014-05-12

Back
[03:46:44] <sirpatrick> Do any of you do freelance embedded work?
[03:47:01] <Valen> i do
[03:47:06] <Roklobsta> me me me me
[03:47:22] <sirpatrick> and advice on coming up with a rate?
[03:47:34] <Roklobsta> be cheaper than some guy in india
[03:47:42] <sirpatrick> I have gotten asked to do quite a few freelance jobs and I have no idea how much to charge.
[03:47:57] <Valen> the rule of thumb is however much you can get away with
[03:48:08] <sirpatrick> Roklobsta: I have them beat just by being able to communicating effectively lol
[03:48:17] <Roklobsta> that's a good start
[03:48:21] <sirpatrick> One client is someone who tried to go that route and failed horribly
[03:48:25] <Roklobsta> is this for the usa?
[03:48:29] <sirpatrick> Yes USA
[03:48:52] <Roklobsta> well, do a fixed price or do an hourly rate
[03:49:13] <sirpatrick> Valen: That's what I figured but I don't want to come in too high and them go else where. I am a student atm so I feel like even though I can do what they are asking.. I am not a "professional"
[03:49:14] <Roklobsta> if you do either make clear in the contract what you will do and what will cost extra
[03:49:31] <Valen> then perhaps look at fixed price
[03:49:38] <Roklobsta> without experience it's hard to come up with metrics for a fixed price
[03:49:46] <sirpatrick> Right
[03:49:53] <Valen> you will screw yourself over the first few times at least
[03:49:56] <Valen> but still
[03:50:14] <sirpatrick> yea that's a good call. And these first few jobs are really basic so I can use them as kind of a freelance learning experience
[03:50:16] <Roklobsta> it depends on your living costs, other costs like insurance (if you want that) some margin for things going awry
[03:50:18] <hjohnson> better value than some guy in india
[03:50:37] <sirpatrick> Roklobsta: Yea I need to take all that into account
[03:50:38] <Roklobsta> i guess its iterative
[03:50:55] <Roklobsta> materials, rent, computer, manufacture etc
[03:51:01] <sirpatrick> Yup
[03:51:09] <Roklobsta> i do IT work for hire for $70/h and I am cheap.
[03:51:21] <Roklobsta> other RF guys I know charge $100/h
[03:51:29] <Roklobsta> USD ~= AUD
[03:51:30] <Valen> you could always ask what other people would quote for the job
[03:51:48] <Roklobsta> i'd suggest $50-60/h is not unreasonable
[03:51:53] <sirpatrick> On a related note.. I have a product which consists of hardware and software (prototype atm) that companies have expressed interest in. Problem is I am terrified of like ramifications of them buying it and it breaking or not working. No idea how to go about it
[03:52:18] <sirpatrick> Valen and Roklobsta: Good call. Thanks for the advice
[03:52:18] <Roklobsta> well, golden rule is "do what you say you will do" and you won't get into to much shit
[03:52:27] <Valen> depends on what it is
[03:52:58] <Valen> are you worried about people killing themselves or burning houses down or are you worried about it going poof and not working?
[03:53:06] <sirpatrick> It is an call out system for certain oilfield production installations.
[03:53:21] <Valen> whats that do?
[03:53:59] <Roklobsta> something alarms someone gets an sms?
[03:54:38] <sirpatrick> What is crazy is I worked as an intern at a company and came up with a replacement using a PLC. it toally sucked because I had no time and limited resources to do it... but they use the hell out of it. That got me thinking that if they sell it to people I can make something way better
[03:55:18] <sirpatrick> Roklobsta: At the most basic of levels yes. My system has a lot implemented on the software end allowing for bidirectional communication, data analysis ,etc
[03:55:37] <Valen> tricky part you would have would be people know and trust PLCs
[03:55:44] <Valen> but thats a sales issue
[03:55:47] <sirpatrick> but the one I made in like a week to replace their purchased product that reached EOL was just that.. sent out texts
[03:56:16] <sirpatrick> Valen: You mean like a branding? Like a verified PLC company vs my "black box"
[03:56:42] <Valen> well think of it this way, if the one they had crapped itself, precisely how many fucks would the PLC company give? enough to give them a replacement plc? ;->
[03:56:58] <sirpatrick> lol right
[03:57:04] <sirpatrick> -sigh-
[03:57:48] <sirpatrick> it makes me feel like shit that I am sitting on the project because of things like this. You would think the technical aspect would be the hard part lol
[03:57:49] <Valen> regarding the other thing, i mean, they know they can duck down to the shop and get another plc, they have been using them for years and they know they work
[03:57:59] <sirpatrick> true
[03:58:13] <Roklobsta> don't forget how lawyer happy you all are in the USA
[03:58:34] <sirpatrick> also true
[03:58:37] <sirpatrick> that is my fear
[03:59:02] <sirpatrick> I was thinking I could possibly come up with some way to like .. .sell the tech and act as a consultant.
[03:59:03] <Valen> it comes down to your warranty, if its a prototype, slap "prototype" on the side of it and make sure they understand that you will not be liable for any failures flowing on from the failure of your device
[03:59:09] <Roklobsta> maybe work for some embedded company first for a year or 2
[03:59:22] <Roklobsta> you also have FCC compliances
[03:59:25] <Valen> selling crap to the oil industry is a good way to go as a rule, they have money money
[03:59:26] <Roklobsta> $$$$
[03:59:33] <Roklobsta> they have lawyers too
[03:59:42] <Valen> that would be my concern, getting enough ticks to be able to sell it
[03:59:49] <sirpatrick> Valen: I have seen it first hand. They throw money at the stupidest of shit. That's why I want to milk it and be on my way
[03:59:56] <Roklobsta> does it have a 3G widget?
[04:00:10] <Roklobsta> if so PTCRB testing is $25000
[04:00:18] <sirpatrick> Roklobsta: At my current position I am dealing with tons of regulation stuff. So it is perfect practice for my devices
[04:00:26] <Valen> here (in australia) there are rules to bypass the certification requirements for prototypes
[04:00:34] <Roklobsta> 5
[04:00:34] <sirpatrick> Roklobsta: Yep, besides that you have FCC part 15 B
[04:00:36] <Roklobsta> 5 units
[04:00:53] <Roklobsta> so far we don't need PTCRB for 3G widgets in australia
[04:01:00] <Valen> Roklobsta: if he sticks a rasPi, in it with a commercial 3G dongle then he won't need to worry about any of that stuff
[04:01:02] <Roklobsta> just ctick or whatever it is now
[04:01:02] <sirpatrick> my plan is to use an COTS industrial 3/4g modem
[04:01:14] <Valen> he will need to do the other emissions and the like stuff
[04:01:17] <sirpatrick> Roklobsta: Do you have first hand experience with PTCRB?
[04:01:21] <Roklobsta> he'll still need whole-of-system fcc approval
[04:01:32] <Roklobsta> i looked into it. it's a pain
[04:01:38] <Roklobsta> never did it in the end
[04:01:48] <Roklobsta> just got quotes
[04:01:51] <Roklobsta> seems like a scam
[04:01:58] <sirpatrick> Roklobsta: if individual componets are FCC than you only need to do accicental emission testing which is a few thousand
[04:02:13] <Valen> he shouldn't need to do that if he is using an off the shelf module
[04:02:22] <Valen> the module would be certified for all that crap
[04:02:25] <Roklobsta> the USA carriers all require PTCRB and then similar testing again to be allowed to each carrier in the usa
[04:02:49] <sirpatrick> Valen: if it truly is a module like PCI-E you are still required to test it in what is called its "final configuration"
[04:03:01] <Roklobsta> that's if you got an embeddable module from Telit or Sierra.
[04:03:08] <sirpatrick> Correct.
[04:03:13] <sirpatrick> I plan on using an actual modem
[04:03:18] <sirpatrick> like in its own enclosure
[04:03:19] <Roklobsta> if you get an off the shelf USB 3g widget it's less onerous
[04:03:33] <hetii> Hi :)
[04:03:34] <sirpatrick> yea those probably wouldn't withstand temp/vibration
[04:03:40] <sirpatrick> hi hetii :)
[04:03:42] <Roklobsta> but i looked i 2008 so ask again as laws change
[04:03:52] <Valen> he shouldn't need to do anything that would be any different to if it was a usb memory stick
[04:04:04] <Valen> otherwise they would need to certify every laptop with every usb device
[04:04:18] <Roklobsta> I used to work on this http://www.blastmonitoring.com.au/ I did all the approvals
[04:04:24] <Roklobsta> amongst other things
[04:04:39] <sirpatrick> Eh I will figure it out. I can't complain too much. I am getting a lot of relevant experience as a student
[04:05:05] <sirpatrick> Roklobsta: roughly what was final cost from certification / testing ?
[04:05:20] <Roklobsta> from memory ~$3000
[04:05:25] <sirpatrick> not bad at all
[04:05:29] <Valen> thats nice and sensible
[04:05:35] <Valen> what was that to certify to?
[04:05:38] <Roklobsta> that was taking it to an outdoor range and testing all modes to 1GHz
[04:05:46] <Roklobsta> now the requirements are to 2GHz
[04:05:56] <sirpatrick> wow
[04:06:10] <sirpatrick> that was just FCC testing? What about UL
[04:06:16] <Valen> is that testing your rf emissions?
[04:06:25] <Roklobsta> but FCC/Australia/CE are fairly harmonised so you can get reports for each generated from the same test data
[04:06:35] <Roklobsta> didn't need UL in .au
[04:06:41] <Roklobsta> we have our own regine
[04:06:48] <Roklobsta> which is strict
[04:06:52] <sirpatrick> I hear AU has a lot stricter requirements
[04:07:04] <Valen> what do you think the testing cost would be on a usb rechargable torch? ;->
[04:07:13] <Valen> with a micro controller in it
[04:07:16] <Roklobsta> a lot of other countries in the region defer to australian standards
[04:07:35] <Roklobsta> it's time based. maybe $500/h
[04:07:39] <Roklobsta> plus report
[04:07:43] <sirpatrick> probably not much. You would probably want UL as a consumer device
[04:08:05] <Roklobsta> UL isn't needed here
[04:08:08] <Roklobsta> so i don't know about it
[04:08:15] <Valen> sirpatrick: we don't have UL, that would be for C tick?
[04:08:29] <Valen> sorry Roklobsta, that would be to get it the C tick?
[04:08:33] <sirpatrick> Valen:okay
[04:08:39] <Roklobsta> valen: it's all merging. ctick/atick is merged i think
[04:08:52] <sirpatrick> at my current job we are working on a device for use in explosive environments and for complete support and certification UL is charging 28k
[04:09:02] <Valen> well let me rephrase, what certs do you think it would need?
[04:09:22] <Roklobsta> you need to talk to a test house to find out the litany of standards
[04:09:23] <hjohnson> sirpatrick: that's cheap for level 1 devices
[04:09:40] <Valen> Roklobsta: thats like talking to a mechanic about whats wrong with my car ;->
[04:09:45] <Roklobsta> i have done approbavals for mains electrical, right down to the mechanical durability of power plug pins
[04:09:55] <sirpatrick> hjohnson: it was stupid cheap. We all heard it would be in the $100k range. And that price is with their engineers providing support
[04:10:05] <sirpatrick> it helps that the project was on the drawing board when we approached them
[04:10:11] <hjohnson> sirpatrick: man, someone gave the right person a blowjob...
[04:10:30] <Roklobsta> telit apparently have a test house they do all the worlds testing in for your product for free if you use a telit widget so you don't risk failing qst time
[04:10:31] <sirpatrick> hjohnson: nope.. thats just how it works when they get to help you from day 1
[04:10:32] <Roklobsta> 1st time
[04:10:42] <hjohnson> sirpatrick: I had a hell of a time getting Eutelsat to approve a couple of antennas
[04:10:47] <hetii> Q: Based on this code http://pastebin.com/TyC8dM72 I fight with getting 2 bytes from uart, as I observe I need use _delay_ms(200); otherwise my uart report that there is no more bytes to receive after getting first byte. How usually it should be done to receive multi-bytes in non blocking way?
[04:10:57] <hjohnson> and I had all the test data to show that the antennas were fully compliant
[04:11:08] <sirpatrick> hjohnson: certification and regulation stuff is a huge circle jerk where BS is perpetuated. I had to do hours and hours of research to find out what the fuck was going on
[04:11:10] <Roklobsta> sirpatrick: adafruit etc I don't think need approvals as it's hobbyist
[04:11:30] <hjohnson> a lot of stuff you can self-certify
[04:11:38] <sirpatrick> Roklobsta: what brought that up?
[04:12:08] <hjohnson> iv'e been working through and doing what I can do to reduce EMI on my own project
[04:12:15] <Roklobsta> i'm just saying, you might be tempted to use off the shelf kits but they may never ever pass approvals due to fatal design flaw
[04:12:26] <hjohnson> http://gerblook.org/pcb/Pga2aYVJCNu3fbdqUda94H#front that's the xmega project I'm looking at building
[04:12:44] <sirpatrick> hjohnson: you just need to monitor the status USART status register
[04:13:17] <sirpatrick> Roklobsta: Right. I know if I end up doing my own product I am going to have to go about it the right way
[04:13:33] <hjohnson> 4 layer PCB, mixed signal (analog, digital, and RF)
[04:13:44] <hjohnson> 3 primary power rails
[04:13:56] <Roklobsta> just look at your laptop power supply label for all the approvals it has worldwide
[04:14:03] <sirpatrick> hjohnson:that is intense. I really need to do more PCB layout. Everything i have done has been single or 2 later
[04:14:05] <Roklobsta> just for a mains to 19V converter
[04:14:09] <sirpatrick> yup
[04:14:22] <Roklobsta> i have done 8 layers boards
[04:14:23] <hjohnson> sirpatrick: it's mostly 4 layer to make the RF traces a reasonable width
[04:14:40] <hjohnson> (I'm running stripline for ~1.5GHz and 2.4GHz
[04:15:11] <sirpatrick> hjohnson: Ah okay. Still waaaay beyond me. I have a lot to learn in that area. Finding time is the hard part. School and work make we want to explode
[04:15:25] <hjohnson> well, I'm currently unemployed
[04:15:29] <hjohnson> so plenty of time
[04:15:33] <sirpatrick> haha nice
[04:15:41] <sirpatrick> well or not lol
[04:15:52] <Tom_itx> reading the logs, make sure you spec what the client wants and if the specs change so do the prices
[04:15:59] <Tom_itx> they will change...
[04:16:07] <Roklobsta> see there's the moral. be an expert in embedded and be unemployed
[04:16:12] <hjohnson> that's an Atmel xmega, 128KB of external RAM, an graphical LCD, 12 serial ports, an Iridium satellite modem, a GPRS modem
[04:16:18] <hjohnson> onboard GPS receiver
[04:16:21] <sirpatrick> I am trying to figure out a way to break out of industrial automation and into embedded development
[04:16:35] <Roklobsta> wir sind sie robots
[04:16:37] <sirpatrick> being a student pretty much limits me realistically going anywhere
[04:16:42] <hjohnson> the toughest part is probably either the buck converters, or the GPS pre-amp
[04:16:53] <sirpatrick> Tom_itx: Thanks for info. I will keep you guys updated on what I decide
[04:17:25] <hjohnson> then again I may soon wind up with an obscene amount of time to work on this in my spare time
[04:17:29] <hjohnson> I just need to get hte hardware built
[04:18:07] <krysmin> hello
[04:18:15] <sirpatrick> hetii: Do you know what I mean about the UART status register?
[04:18:18] <krysmin> is possible to write for avr in haskell?
[04:18:19] <sirpatrick> Hi krysmin
[04:18:27] <Roklobsta> krysmin: OMG
[04:18:39] <krysmin> Roklobsta: what?
[04:18:45] <Roklobsta> that's mental
[04:19:03] <sirpatrick> krysmin: from a brief google search it looks like the answer may be yes
[04:19:04] <hjohnson> krysmin: doubeful
[04:19:08] <hjohnson> oh?
[04:19:12] <hjohnson> I be wrong then
[04:19:22] <Roklobsta> do you know what shennanigans goes on behind the scenes in haskell to make all that pretty 'functional' crap work on a von neuman machine?
[04:19:25] * hjohnson ponders re-writing the code he's written so far in Forth
[04:19:30] <hjohnson> just to be cute
[04:19:43] <Thrashbarg> write only
[04:19:49] <sirpatrick> lol
[04:19:52] <Roklobsta> i would have hoped Ada might get a chance on the AVR
[04:19:59] <Roklobsta> if it compiles it will work.
[04:20:00] <hjohnson> Roklobsta: haha
[04:20:07] <sirpatrick> Pearl on avr on its way
[04:20:10] <sirpatrick> perl*
[04:20:18] * hjohnson is taking a look at these cypress PSOC chips
[04:20:22] <hjohnson> they're pretty nifty looking
[04:20:41] <sirpatrick> oh wow yea
[04:20:59] <hetii> sirpatrick: I use this library http://homepage.hispeed.ch/peterfleury/uartlibrary.zip
[04:21:19] <sirpatrick> hetii: Can you post your full code?
[04:21:38] <sirpatrick> Typically you will read from the uart into a buffer, and then do something with that buffer
[04:21:57] <sirpatrick> There shouldn't be a problem reading N bytes regardless of what N is
[04:23:04] * hjohnson wrote his own uart library, since it needs to control both 16550 style UARTs and the internal USARTs
[04:23:22] <hjohnson> what I really wish is that the new named spaces on the xmega would work with things like sprintf
[04:23:32] <sirpatrick> one of the best things I have done to make debugging easier is map printf to my uart functions
[04:23:51] <sirpatrick> so nice just using printfs format operators
[04:23:57] <hjohnson> heh
[04:24:12] <hjohnson> man... so many UARTs....
[04:24:13] <hjohnson> oh well
[04:24:18] <sirpatrick> Ive never actually looked to see how much space it takes up
[04:24:19] <hjohnson> that's what I get for doign what I want to do
[04:24:24] <hjohnson> heh
[04:24:33] <hjohnson> I'm also running FreeRTOS on this bad boy
[04:24:36] <sirpatrick> hetii: If you need more help please speak up
[04:24:40] <sirpatrick> nice!
[04:24:45] <sirpatrick> How do you like freeRTOS?
[04:24:47] <hetii> sirpatrick: http://pastebin.com/XaQ5jgiA http://pastebin.com/7ArdU1Rk
[04:24:54] <hjohnson> sirpatrick: seems to be pretty decent for what I need it for
[04:25:04] <hjohnson> of course, I don't actually have hardware, so all I can do is test that it compiles.
[04:25:06] <sirpatrick> hjohnson: what are you using it on?
[04:25:14] <sirpatrick> ah okay
[04:25:15] <hjohnson> xmega128a1u
[04:25:22] <sirpatrick> is it pretty easy to code for?
[04:25:30] <hjohnson> yeah, not bad at all
[04:25:34] <sirpatrick> hetto: I will take a look
[04:26:03] <sirpatrick> I have very limited RTOS experience sadly. What is the actual application you are using it for?
[04:26:04] <hjohnson> though it feels really wierd having to remember to code things to be re-entrant/threadsafe on a MCU
[04:26:22] <hetii> sirpatrick: hc06_init() is in main() loop.
[04:26:35] <hjohnson> sirpatrick: I'm building a combination NMEA multiplexer, batteyr monitor, telemetry reporter, and instrument monitor for my boat.
[04:26:40] <sirpatrick> hetii: and remind me again what your issue is?
[04:27:11] <sirpatrick> hjohnson: damn man.. go big or go home. Do you have experience writing code for an RTOS (mutexs,locks,etc)?
[04:27:24] <hjohnson> so it has to do umpteen different tasks... just much easier to handle this as separate threads rather than one huge-ass state machine
[04:28:02] <hjohnson> naw, but I hung out with enough software folks that it's not hard... I'm not really using the "realtime" part of this, just the threading and mutexes/semaphores
[04:28:38] <hetii> sirpatrick: I need use _delay_ms(200); or more ms in hc06_init() otherwise I`m not able to get this two bytes ('OK')
[04:28:40] <sirpatrick> any good reading you can recommend for that off the top of your head ?
[04:29:42] <hjohnson> ot off the top of my head... just remember the dining philosophers
[04:29:43] <hetii> Of course i can change the while condition in uart_getln and wait forever to get this two bytes but then its a blocking way
[04:31:10] <sirpatrick> hetii: Instead of hardcoding delays on atomic events why not read from the USART until a condition is met. Such as a '\r' or '\n'
[04:31:28] <sirpatrick> hjohnson: will keep that in mind lol.
[04:31:36] <sirpatrick> also, is your app open source?
[04:31:41] <hjohnson> yeah
[04:31:51] <sirpatrick> any code up atm?
[04:32:12] <Valen> I would just write a bunch of teensy interrupt driven things to handle all the outside interfacing stuff
[04:32:37] <hjohnson> https://code.google.com/p/boat-mux/source/browse/#svn%2Ftrunk%2Ffirmware
[04:32:38] <sirpatrick> Valen: are you talking about hjohnson's app?
[04:32:47] <Valen> adding an OS feels like loads of overhead for not a bunch of gain
[04:32:49] <Valen> yeah
[04:33:25] <hjohnson> sirpatrick: the UART code is probably the most complex part of the thing
[04:33:34] <hjohnson> I actually just radically changed the hardware, so i'll need to modify it now
[04:33:51] <hjohnson> i'm doign some really evil shit though... switch statements based on the values of pointers :P
[04:34:11] <sirpatrick> I suppose that if an OS is too much overhead I know there are AVR threading libraries out there
[04:34:16] <hjohnson> well casting a pointer to a 16 bit integer, and a switch statement
[04:34:32] <hetii> sirpatrick: well i get data from dump rfid reader who not send any terminating character, instead 5 bytes. Other point is that the rest code should still execute itself so cannot be focused to receive mutliple bytes all the time and waits forever for it
[04:34:37] <hjohnson> sirpatrick: well, FreeRTOS isn't really an operating system, it all statically links in the end
[04:35:13] <sirpatrick> hjohnson: Right, I was just responding to valen. It is just a bunch of source files at the end of the day right?
[04:35:21] <hjohnson> ahh
[04:35:21] <Valen> hjohnson: is there sposed to be a "main" file in there?
[04:35:34] <sirpatrick> https://code.google.com/p/boat-mux/source/browse/trunk/firmware/main.c
[04:35:42] <sirpatrick> you have to scroll. It was hidden for me lol
[04:35:51] <Valen> oh its scrolly
[04:35:54] <Valen> i just saw that lol
[04:36:04] <hjohnson> a goodly chunk of that is the FreeRTOS codebase
[04:36:04] <sirpatrick> i know right? i was like wtf whats happening
[04:36:08] <Valen> I spose what I'm saying is the *idea* of threads and the like seems like your doin it wrong in a mcu
[04:36:11] <hjohnson> and a bunch of the ASF code
[04:36:35] <hjohnson> I probably shouldn't use the ASF stuff.. it's... a bit more than I need, I just didn't feal like fucking around too much with the TWI
[04:36:48] <sirpatrick> xTaskCreate and vTaskStartScheduler are the freertos interface right>?
[04:37:26] <sirpatrick> yea
[04:37:48] <hjohnson> yeah
[04:38:16] <hjohnson> i've mostly been working on infrastructure code right now, so there's not much actual thread code
[04:38:21] <hjohnson> (and re-wroking my hardware)
[04:38:46] <hjohnson> I decided it was just better to spend $37 on an 8 port UART that has a few extra features than $23 on two quad uarts, and the extra support circuitry
[04:39:01] <sirpatrick> hetii: I apoligize but I fail to actually see where you are having trouble understanding. Look at this and tell me if it helps http://stackoverflow.com/questions/10730563/read-multiple-bytes-from-rs232-to-uart-avr-atmega16
[04:39:11] <sirpatrick> that's a good call
[04:39:27] <sirpatrick> have you ever worked with the atmel at931sam?
[04:39:29] <Valen> bah just do it all in software..... <trollface>
[04:39:31] <sirpatrick> whoops.. at91sam
[04:39:35] <hjohnson> me?
[04:39:37] <hjohnson> no
[04:39:40] <sirpatrick> yes
[04:39:53] <hjohnson> Valen: I actually have done software UARTs on the atmel
[04:39:59] <hjohnson> about 25 lines of C and a timer
[04:40:07] <Valen> doing 8 of them in parallel could get interesting
[04:40:16] <hjohnson> actually worked quite well (better than the USARTs actually, but then I managed to screw up the wiring to the USART)
[04:40:17] <Valen> when you start to think about clock skew
[04:40:18] <sirpatrick> some kind of round robin timer lol
[04:40:36] <sirpatrick> that is kind of like implementing multiple servo channels on a single timer
[04:40:38] <hjohnson> Valen: yeah, and in fact I actually need 12 serial ports total. :)
[04:40:47] <sirpatrick> you keep track of elapsed time and have a struct of servos
[04:40:55] <Valen> it starts out simple sounding, just read the port then spit the bits out onto the end of the string
[04:41:03] <hjohnson> hehe
[04:41:10] <Valen> and then you have different baud rates and you are *booooom*
[04:41:14] <sirpatrick> lol
[04:41:35] <sirpatrick> hjohnson: your project requires multiple baud rates?
[04:41:41] <hjohnson> sirpatrick: yeah
[04:41:49] <sirpatrick> what is the use case for that?
[04:41:55] <Valen> if one chip is in the sun and another is somewhere cold he will have multiple baud rates ;->
[04:42:01] <Valen> on a related note why the hell do you have 12 serial lines?
[04:42:02] <sirpatrick> multiple interfaces I guess
[04:42:05] <hjohnson> wifi module operates at 115200, Iridium modem 9600, standard NMEA ports 4800, the AIS port 38400, etc...
[04:42:21] <sirpatrick> Ahh gotcah
[04:42:58] <sirpatrick> Valen: don't even get me started on issues like that lol. I debugged some code for ever only to realize EMI from a power cable was causing random behavior
[04:43:02] <sirpatrick> I drank a lot that night
[04:43:09] <hjohnson> Valen: 1 input for the AIS receiver, 4x general purpose NMEA 183 I/O, wifi module, GPRS modem, Iridium modem, compass, 2x for the GPS, and a DE9 serial port.
[04:43:33] <hjohnson> so this thing will be doing a metric shit-ton of string parsing, for the most part
[04:44:00] <sirpatrick> eff it. install linux on it and call it a day ;P
[04:44:03] <Valen> I wonder how a propeller would suit you
[04:44:20] <hjohnson> I prefer sails.
[04:44:24] <Valen> sirpatrick: (I was thinking ras-pi thoughts too lol)
[04:44:29] <Valen> hjohnson: I meant the micro
[04:44:35] <hjohnson> ahh
[04:44:58] <hjohnson> the xmega at 32MHz has more than enough juice
[04:45:16] <Valen> I have never gotten up to the xmegas
[04:45:29] <hjohnson> they seem to be pretty nice parts
[04:45:53] <hjohnson> one of the nice things is that I am doing a bunch of shit with just DMAing strings around
[04:45:56] <Valen> they can push some data over usb I hear
[04:46:23] <hjohnson> so say I need to send a NMEA sentence out one of the serial ports... I just do it via DMA rather than actually sending it byte by byte... that way the software can do other things.
[04:46:29] <sirpatrick> Valen: yea or just a linux capable Atmel product lol. That's why I brought up at91sam. I used that briefly and it was a blast not worrying about bare metal peripheral setup.
[04:46:45] <hjohnson> I actually like playing bare-metal
[04:46:59] <hjohnson> crap, it's 2am
[04:47:03] <Valen> I like it, until it gets complicated, then give my python
[04:47:03] <sirpatrick> Oh yea i def enjoy it. I think it is a lot more fun getting it to work
[04:47:07] <sirpatrick> it is 4:30 am here :(
[04:47:09] <sirpatrick> finals are today
[04:47:11] <Valen> because that is exactly what happens lol
[04:47:12] <hjohnson> woot!
[04:47:21] <Valen> dude why the hell aren't you in bed sirpatrick?
[04:47:23] <hjohnson> my proposal for a consulting trip to europe just got approved. :)
[04:47:36] <hjohnson> finally, will get paid some monies.
[04:47:42] <Valen> yay
[04:47:44] <Valen> money is nice
[04:47:58] <sirpatrick> Valen: insomnia and procrastination
[04:48:07] <sirpatrick> Going to do some last minute studying
[04:48:07] <hjohnson> Valen: given that I've been unemployed since November
[04:48:09] <Valen> IRC isn't going to help with either of those
[04:48:17] <sirpatrick> Nope lol
[04:48:17] <Valen> hjohnson: :-<
[04:48:29] <hjohnson> so lots of time to work on my project, no money to actually build it
[04:48:40] <hjohnson> (the BOM cost is close to $500
[04:48:52] <sirpatrick> It is an electromagnetism final and it is one of the few classes I have absolutely loved. So I really don't need to study much
[04:48:55] <hjohnson> (including the PCB fab and the parts, not including the satlelite modem)
[04:49:28] <hjohnson> you guys play much with the jTAGICE 3?
[04:49:40] <sirpatrick> hjohnson: what kind of consulting? Are they paying for travel too?
[04:50:30] <hjohnson> sirpatrick: I'md oing it fixed price, but I bid based on standard commercial airfares... but I've got more airline points than I know what to do with, so I'll book the ticket on points
[04:50:37] <hjohnson> make me another $1800 or so
[04:51:02] <hjohnson> (we're talking low five figures here for a week of work :P)
[04:51:07] <sirpatrick> awesome man! Congrats
[04:51:15] <sirpatrick> did you just approach a company ?
[04:52:00] <hjohnson> naw, they were one of my primary customers while working at my former company.
[04:52:14] <hjohnson> after my former company let me go, that customer told my former employer to get bent.
[04:52:19] <hjohnson> :)
[04:52:22] <sirpatrick> wow
[04:52:26] <sirpatrick> congrats again!
[04:52:38] <sirpatrick> I can't wait to finish school and start looking for embedded positions
[04:52:50] <hjohnson> well, not in as many words, but the support contract that was in the bidding process at the time was squashed
[04:53:09] <sirpatrick> so you are an embedded engineer by trade?
[04:53:25] <hjohnson> the nice thing is that while I did sign the non-compete, a) they're not enforceable here anyway and b) my non-compete only covers north america.
[04:53:32] <hjohnson> no, satcoms engineer.
[04:53:37] <sirpatrick> fuck noncompete
[04:53:49] <sirpatrick> like actual hardware engineering or system engineering / integration?
[04:53:59] <hjohnson> bit of everything
[04:54:15] <sirpatrick> cool!
[04:54:23] <hjohnson> also bit of structural engineering, wee bit of civil (foundations for the big antennas were my design, though I had them signed off by a local civil engineer)
[04:54:30] <hjohnson> one of the reaosns why I like the industry
[04:54:32] <sirpatrick> badass man.
[04:54:46] <hjohnson> and I got to let out my inner ironworker while building the antenna too.
[04:54:55] <sirpatrick> Valen: what is your background / employment industry?
[04:55:02] <sirpatrick> haha
[04:55:10] <hjohnson> of course, the job I may wind up with will require me to wear body armor for a year...
[04:55:33] <hjohnson> otoh, it will let me pay off my mortgage
[04:55:41] <hjohnson> (which is a big deal given Vancouver realestate prices)
[04:55:44] <sirpatrick> body armor ??
[04:55:50] <hjohnson> yeah
[04:55:55] <sirpatrick> elaborate? lol
[04:56:23] <hjohnson> Son... Satellite communications is expensive. The only time you use it is when shit is being blown up, blown down, burned down, or shaken."
[04:56:26] <hjohnson> :P
[04:56:42] <Valen> hjohnson: or you are a long way from stuff?
[04:56:42] <hjohnson> or flooded
[04:56:49] <hjohnson> Valen: that too
[04:56:56] * Valen has a degree in space science, so I work doing IT for small companies
[04:56:59] <hjohnson> (or floating on the ocean)
[04:57:12] <sirpatrick> hjohnson: work with inmarsat?
[04:57:18] <Valen> hjohnson: I think that is covered by bing a long way from stuff ;-P
[04:57:32] <hjohnson> anyhow, the job means deploying to places where there's a non-zero chance of getting hit by an inbound mortar or rocket.
[04:57:45] <hjohnson> sirpatrick: naw, that's chickenshit stuff.
[04:57:53] <sirpatrick> Valen: That's cool! I started out doing IT stuff in HS and eventually go to development
[04:57:57] <Valen> but I do embedded stuff for pocket money
[04:58:00] <hjohnson> most of what I was doing was ~3 to 5 megabits over satellite.
[04:58:10] <sirpatrick> holy shit
[04:58:27] <Valen> hjohnson: could get a job here installing satellite gear for the NBN ;->
[04:58:54] <sirpatrick> can't remember if I was talking about it here but I am working on a project that will require pretty eavy satellite bandwidth. Voip phones, IP cameras, industrial drives, etc
[04:58:55] <hjohnson> sirpatrick: put it this way, between 2005 and now, pretty much every shred of video you ever saw coming out of Iraq or Afghanistan, every live interview with the soldiers on the ground, was carried by equipment my company made.
[04:59:18] <hjohnson> sirpatrick: yeah, not that hard, just not that cheap
[04:59:26] <Valen> voip over satelite can be interesting i hear
[04:59:43] <hjohnson> sirpatrick: the non-profit I work with, has a 1.2mbps/300kbps satellite link... if we had to pay full ride on it, that's about $5000/mo or so
[04:59:53] <sirpatrick> Yea the system will have cellular redundancy if needed. This application will be somewhere in saudi
[05:00:03] <hjohnson> Valen: not that bad as long as you're not on some shit cheap TDMA system (ie hughesnet etc...)
[05:00:10] <sirpatrick> Well part of what I had to do this week was get quotes lol. Thanks haha
[05:00:47] <sirpatrick> Valen: maybe you can be my embedded consulting mentor lol.
[05:00:56] <Valen> lol, i doubt it
[05:01:09] <hjohnson> sirpatrick: satellite capacity is about $3500/MHz these days
[05:01:12] <Valen> unless you need schooling in the fine art of bullshitting ;->
[05:01:24] <Valen> that I am awesome at
[05:01:51] <sirpatrick> Valen: LOL who knows.
[05:01:52] <Valen> I know enough about pretty much anything outside the field of "arts" to bluster and snow my way though anything ;->
[05:02:27] <sirpatrick> thats the name of the game
[05:02:55] <Valen> My best claim to fame was writing a 48 page uni assignment on digital satellite communications that was 80% of the final grade for that course in 2 days
[05:03:10] <sirpatrick> it's pretty frustrating having real world experience on something and then "learning" about it in school and everything they say is wrong
[05:03:20] <hjohnson> heh
[05:03:23] <sirpatrick> Valen:Get that shit man!
[05:03:39] <hjohnson> lol
[05:03:46] <Valen> I got 86% for the class, distinction or hd ftw ;->
[05:03:51] <sirpatrick> nice!
[05:04:04] <sirpatrick> School is a drag for me atm. I just want to be out
[05:04:08] <sirpatrick> -sigh- someday
[05:04:27] <Valen> there are a lot fewer girls outside, paticularly in your chosen field
[05:04:30] <Valen> just sayin ;->
[05:04:35] <sirpatrick> haha
[05:05:07] <hjohnson> yeah, there's a reason why I'm still single, I suppose
[05:05:32] <sirpatrick> it makes certain things much easier
[05:05:49] <sirpatrick> namely travel and stuff that goes into the "because i want to" category
[05:07:07] <sirpatrick> Valen how long have you been out of school?
[05:07:09] <hjohnson> well, eyah, that's the only reason why I'm considering going to .af for a year
[05:07:22] <Valen> crap 10 years this year
[05:07:51] <sirpatrick> oh wow. Graduate school as well or just a BS ?
[05:07:59] <sirpatrick> hjohnson: Yea good luck with that man
[05:08:19] <sirpatrick> I may be sent over to UAE... kind mixed feelings about it
[05:08:30] <hjohnson> the UAE is a big snoozefest
[05:08:31] <Valen> bachelor of space sciences to be precise ;->
[05:08:40] <hjohnson> (I actually really don't like the UAE... )
[05:08:45] <Valen> was a great degree in terms of door opening
[05:08:57] <sirpatrick> hjohnson: Yea most of the people in my company who went really didn't like it
[05:09:10] <sirpatrick> I would be in all safe regions so it shouldn't be dangerous. But still kinda worrysome
[05:09:18] <hjohnson> sirpatrick: now most fun I've ever had in my life was bouncing around Iraq back in 2006.
[05:09:21] <sirpatrick> Valen: Cool! I am working on my BS EE
[05:09:25] <hjohnson> sirpatrick: UAE is all safe man.
[05:09:26] <Valen> "wow you are a rocket scientist!!!!???!!? of course you can fix our computers/car/embedded electronics"
[05:09:36] <sirpatrick> hjohnson: Were you in the military?
[05:09:46] <Valen> whats BS mean to you sirpatrick?
[05:09:47] <hjohnson> there's nothign risky there... it's just a bunch of rich asshats who don't do anything in a shitty little country.
[05:09:53] <hjohnson> sirpatrick: no.
[05:10:37] <sirpatrick> hjohnson: Yea I heard it isn't dangerous. I haven't ever traveled outside of US so it would be very new for me lol
[05:10:53] <perole> well... don't go near drugs, don't drive drunk, and really stay away from the local women
[05:11:00] <hjohnson> sirpatrick: back in '06, over the course of 3 months, I visited 26 FOBs in Iraq, 10 in Afghanistan, plus the UAE, Qatar, Bahrain, and Kuwait.
[05:11:19] <Valen> perole: so what should he do outside America then?
[05:11:20] <hjohnson> sirpatrick: well, it's dangerous only because everyone drives like a fucking lunatic there.
[05:11:20] <perole> also, if you see an accident - don't help or touch the body
[05:11:29] <sirpatrick> perole: Yea the company horror story is some consultant that brought liquor in from some small town. Got imprisoned
[05:11:51] <sirpatrick> hjohnson: that's quite a list of visits!
[05:11:57] <perole> apart from that, I had a good time living there - but that was in 2001, someone is getting old :)
[05:11:58] <sirpatrick> perole: personal experience over there?
[05:12:07] <sirpatrick> ah wow
[05:12:08] <hjohnson> yeah, every other day, hopping on helicopters gets addictive. :P
[05:12:30] <sirpatrick> Valen: bachelor of science in electrical engineering is the degree I am pursuing
[05:12:49] <sirpatrick> because of working full time I am taking longer than most people. Still about 3 years away from graduating
[05:13:02] <hjohnson> took me 7 years to do my Engineering degree
[05:13:10] <hjohnson> of course, i failed out in the second year, so that was part of it.
[05:13:34] <bitd> Wow, taking three years untill now, already fed up.
[05:13:39] <bitd> I would not last 7.
[05:13:41] <sirpatrick> yea I am not a very disciplined student. Which sucks because at a personal level and at my job I do very well
[05:13:48] <hjohnson> (I managed to failed all my math courses)
[05:13:53] <hjohnson> eh, University was a blast
[05:14:03] <hjohnson> best time of your life
[05:14:05] <hjohnson> imho
[05:14:06] <sirpatrick> psh
[05:14:09] <bitd> Not really >.>
[05:14:18] <sirpatrick> right now I am at a junior college to get all my math, physics, etc done
[05:14:27] <sirpatrick> once I am at uni maybe it will be fun.
[05:14:28] <bitd> Writing my thesis right now, I have not had a worse time trying to focus.
[05:14:31] <hjohnson> I often think it would be fun to go back to school, but then realize I don't want to be broke again.
[05:14:41] <hjohnson> bitd: oh, well, I was undergrad, no thesis for me.
[05:14:44] <sirpatrick> But between work and stuff I won't get to live the typical experience
[05:14:48] <perole> holy c, qfn stuff is small and the part I want only has qfn package
[05:15:20] <hjohnson> the most amusing thing is even though I had been kicked out of the Engineering program, I was hired as a TA for a couple of the Engineering courses
[05:15:21] <sirpatrick> perole: If you cant hand solder you can make a reflow oven cheap :)
[05:15:31] <hjohnson> (Embedded and real-time systems, and digital system design)
[05:15:58] <sirpatrick> hjohnson: That's awesome! I can't wait for my actual EE classes
[05:16:11] <hjohnson> one of them was during the summer semester, so I actually got away with holding my office hours on the patio at the campus pub.
[05:16:25] <sirpatrick> It will be nice having lots of practical experience to go with the theory
[05:16:31] <sirpatrick> haha
[05:17:20] <hjohnson> well, the thing of it is, that universities should not necessarily be teaching pratical technologies etc.... the degree should be focused on the theory, and using whatever tech/language/whatever that actually illustrates thepoint.
[05:17:24] <hjohnson> imho
[05:17:25] <sirpatrick> perole: Also, I have done QFN with hot air pen.
[05:17:48] <hjohnson> if you're going to teach a course on object oriented programming, teach it in something like Smalltalk 80
[05:17:49] <perole> I'm looking for alternative part, but not successful so far
[05:17:56] <sirpatrick> yea. You are there to learn how to learn. Not learn X or Y
[05:17:59] <perole> need something to switch rgb/video signals
[05:18:15] <hjohnson> sirpatrick: on the flip side, also, take the opportunity to expand your horizons.
[05:18:16] <sirpatrick> is the part you are looking at now by TI ?
[05:18:20] <hjohnson> take classes outside your major.
[05:18:24] <sirpatrick> Yep!
[05:18:28] <hjohnson> at least one or two per year
[05:18:34] <sirpatrick> Already taken two philosophy classes
[05:18:45] <hjohnson> I did a couple of courses on electro-acoustic music
[05:18:47] <perole> sirpatrick: they got some stuff too, but expensive/not stocked
[05:18:55] <perole> http://www.maximintegrated.com/datasheet/index.mvp/id/6469
[05:19:01] <hjohnson> (which oddly became relatively useful to my engineering degree, since it gave me an intuitive feel for what filtering does to a signal)
[05:19:05] <sirpatrick> hjohnson: that sounds cool
[05:19:27] <hjohnson> the funny part is that all the arts students and so forth in it were using protools and doing it all on computer.
[05:19:48] <Valen> so speaking to people who actually have a knowlege of more than just the bits they needed, how would you solve the problem of driving a piezo actuator, from a PWM output
[05:20:02] <hjohnson> I basically said "screw this, I deal with computers all the time" so i mixed and made my projects with 1/4" reel-to-reel tape, razor blades/splicing tape, and discrete effects boxes/mixers/multi-track recorders
[05:20:02] <Valen> so I am getting say 0-3.3V in from a PWM input
[05:20:23] <Valen> and I need to turn that into either +-50V out or 0-100V
[05:20:32] <Valen> current is low though, around 1.5ma
[05:20:46] <hjohnson> wow, people still do VGA? :P
[05:20:48] <Valen> also I need to do 144 of these
[05:21:02] <sirpatrick> Valen: Would just a standard transistor driven output work
[05:21:06] <hjohnson> 144 individually addressable?
[05:21:22] <hjohnson> (I assume you're talking a 12x12 grid)
[05:21:25] <Valen> hjohnson: yeah,
[05:21:32] <Valen> individually addressable
[05:21:36] <Valen> so lots of wires ;->
[05:21:39] <sirpatrick> lol
[05:21:49] <hjohnson> well, can't you actually pull off something that's scan based?
[05:22:06] <Valen> hjohnson: its "for science" so it'll be best not to
[05:22:14] <hjohnson> the actuator will have some lag/latency to it... so scan fast enough and you won't have that many wires :P
[05:22:17] <Valen> nice and simple is the best and I have lots of money
[05:22:31] <Valen> in terms of this job, looking complicated is good ;->
[05:22:41] <hjohnson> lol
[05:22:41] <Valen> sirpatrick: probably, the critical problem is I don't know enough about raw transistors to do it lol
[05:23:07] <Valen> I specced the pricing out based on rolling up a FPGA board to do it all, and writing all the software for it
[05:23:12] <Valen> he got his grant based on that
[05:23:24] <hjohnson> haha, so uh, I just specified "yeah, I need you to install aerial cat-5 from point a to poitn b, hanging it off the power poles" the repsonse? "Ok, no problem"
[05:23:33] <sirpatrick> Valen: yea me either. I always have to google relevant formulas and such
[05:23:53] <Valen> now I found an off the shelf board from a vendor I already used, for $300, instead of the $60k i was budgeting for said part
[05:24:00] <hjohnson> anyhow, I need to get to bed. Theyr'e going to be calling me to setup this trip in the morning.
[05:24:10] <hjohnson> 'night all
[05:24:16] <sirpatrick> hjohnson: good luck with everything
[05:24:16] <Valen> sirpatrick: that'd be great if i understood what they were applying to lol
[05:24:36] <Valen> hjohnson: good luck, come back in one piece with the same number of holes you left with ;->
[05:24:43] <sirpatrick> hjohnson: and thank you for all the advice / input. I look forward to talking with you again
[05:25:30] <Valen> sirpatrick: so how would you suggest I go about starting ;->
[05:25:38] <sirpatrick> Valen: Okay lets break this into little pieces. So first step is somehow driving an output anywhere from 0-100V @ ~ 1.5mA right?
[05:25:41] <Valen> help a rocket scientist out would ya ;->
[05:25:58] <Valen> yeah, I'm happy to do that digitally, I'll be running the PWM at about 20khz
[05:26:22] <Valen> or we can do it in analogue with a RC in front of it but that seems more prone to error to me
[05:26:34] <sirpatrick> yea and also a pain if we need 144 of em
[05:26:58] <Valen> eh, its 288 components thats not going to be the end of the world lol ;->
[05:27:04] <sirpatrick> ok so output conditions are 20kHz, ~1.5 mA and 0-100V
[05:27:14] <Valen> well thats the bit thats interesting
[05:27:19] <sirpatrick> true, but I am sure there is a better way
[05:27:34] <Valen> if you look at rise and fall times for that PWM you wind up closer to 5mhz
[05:27:40] <sirpatrick> Ah okay
[05:27:43] <Valen> so you can turn on and off over one cycle
[05:27:50] <sirpatrick> Do you have a PN for the device you are driving?
[05:28:01] <Valen> but I can make that a "soft" requirement
[05:28:08] <sirpatrick> gotcha
[05:28:11] <Valen> its not off the shelf, but think of it as a capacitor
[05:28:32] <Valen> (which is really what it is)
[05:28:33] <sirpatrick> hetii: Did my link help you?
[05:28:43] <sirpatrick> ok
[05:30:45] <Valen> https://www.dropbox.com/s/zty170qi7jlkw7a/Strip%20Three%20Lead%20%2B50%20to%20-50%20.pdf is the closest to a "schematic"
[05:31:13] <Valen> that is doing a +-50v drive, but I figured it would work more simply given the input to just be 0-100v
[05:31:33] <Valen> accuracy in the resultant voltage is something of a concern
[05:31:47] <Valen> (basically you put voltage in and the strip will bend)
[05:31:59] <sirpatrick> what kind of accuracy is needed?
[05:32:17] <Valen> as much as is easy to get ;->
[05:32:50] <Valen> but if its running digitally, (IE like a big totem pole driver) then its going to be pretty good
[05:32:52] <hetii> sirpatrick: not really
[05:33:28] <Valen> but again its not going to matter a *whole* bunch if its off by 10 volts
[05:33:36] <sirpatrick> Valen: Are these similar to what you are driving ? https://www.sparkfun.com/products/9196
[05:33:50] <sirpatrick> just wondering.. not needed for our working this out
[05:33:59] <Valen> kinda
[05:34:02] <Valen> but in reverse
[05:34:15] <sirpatrick> hetii: Not sure what I can do to help you then. That example showed exactly how to read N bytes which is what you are wanting to do
[05:34:16] <Valen> and with old fashioned hard ceramics ;->
[05:34:32] <hetii> sirpatrick: Currently I did it like this: http://pastebin.com/0fY3xaF4
[05:34:51] <hetii> sirpatrick: on this way its non blocking way
[05:35:03] <Valen> I can do it with fets (those i understand) but needing deadtime generators and opto couplers and the like it rapidly snowballs out of control
[05:35:45] <sirpatrick> Valen: Yea that's honestly over my head. I haven't even had those types of worries with my work with FETs lol
[05:36:09] <Valen> you want a 400A motor controller I'm your dude ;->
[05:36:16] <sirpatrick> haha
[05:36:31] <sirpatrick> this is.. kinda like an hbridge :p
[05:37:21] <Valen> one idea I was having, that was nice and dodgy, was to use a 200V supply, tie the +ve to the 200v supply, then put a 50K resistor to the -ve terminal, then another 50K resistor to a "fet" to ground
[05:37:28] <Valen> think 200v open collector
[05:37:39] <sirpatrick> hmm
[05:37:55] <sirpatrick> before I forget I found this. It kinda seems like this could help in your application: http://www.onsemi.com/PowerSolutions/product.do?id=NCP1034
[05:37:57] <Valen> so you are basically turning a resistor divider on and off
[05:38:02] <sirpatrick> right!
[05:38:25] <Valen> which makes it a single sided thing which should simplify things somewhat
[05:39:03] <sirpatrick> hetti: I still feel like you are making this much more complex than needed. The link I sent should do exactly what you need it to do
[05:39:09] <Valen> yeah all the bridge drivers and the like have their own built in boost converter for the high side gate drive
[05:39:17] <Valen> which when you scale it to 144 units sounds bad
[05:39:27] <sirpatrick> hetii: Sorry but I think I am of no more help :(
[05:39:44] <Valen> (and may not work without some inductance in the output)
[05:39:45] <sirpatrick> Valen: that's true. I have never had that many points of IO
[05:39:54] <sirpatrick> most of have done was like 20
[05:40:20] <Valen> so yes, I'm thinking at 1.5ma or so a bog standard high voltage transistor would be the way to go
[05:40:39] <sirpatrick> this is a consulting job you said?
[05:40:46] <Valen> it is
[05:40:47] <hetii> sirpatrick: no problem :)
[05:41:04] * Valen can hear the gears turning in sirpatricks head ;->
[05:41:10] <sirpatrick> LOL
[05:41:27] <sirpatrick> no I was just going to quiz you on its function because I like knowing that kind of stuff
[05:41:51] <Valen> its "science", measuring tactile response and a bunch of other stuff
[05:41:59] <Valen> it becomes a bit like a braille display
[05:42:11] <sirpatrick> I am going to go work on some studying and think on this. If I think of anything we didn't already cover I will let ya know
[05:42:33] <Valen> you should probably just go to sleep
[05:42:47] <Valen> study at stupid o clock doesn't generally help as much as sleep ;->
[05:43:20] <sirpatrick> yea I won't be useful for long. A quick read over my notes and nappy time. Luckily my class is later this evening
[05:43:28] <Valen> good ;->
[05:43:33] <sirpatrick> then one more final Wed and I am done until summer lol
[05:43:45] <Valen> nice
[05:43:49] <sirpatrick> anywhoo... pleasure talking with you. Will talk to you a little later
[05:43:55] <Valen> cya
[05:44:15] <sirpatrick> hetii:good luck with your application. If I figure anything out on this during my nap I will make sure to let you know :)
[05:52:11] <mitsakos> hi there. I wrote a simple firmware for Atmega168 just to output a square waveform with 1us width on PB1 . Here is the code http://pastebin.com/2hfLi6Li
[05:53:22] <mitsakos> but when i sniff it with a logic analyzer i get pulse which stops and after a few mS it starts again. It is like the MCU i reseting. I checked the Watchdog Timer Always on and it isn't set.
[05:53:34] <Valen> disable the watchdog timer
[05:55:14] <Valen> if its not the WTD take a look at the power supply
[05:55:27] <mitsakos> the fuses are : L: 0xa2 H:0xd7 E:0x01
[05:55:36] <Valen> put a disable WDT call in the setup
[05:55:56] <Valen> wdt_disable();
[05:56:00] <Valen> just to be sure ;->
[05:56:11] <Valen> before your delay 1ms
[05:56:17] <Valen> calculating fuses is messy
[05:57:09] <mitsakos> yes that works but why the watchdog is enabled?
[05:57:19] <mitsakos> the watchdog fuse isn't set
[05:57:22] <Valen> guessing your fuses are wrong
[05:57:32] <mitsakos> no they aren't
[05:57:33] <Valen> are you programming the fuses?
[05:57:58] <mitsakos> what do you mean? each time i flash the mcu?
[05:58:13] <Valen> as i recall at least on some chips you need high voltage to set the fuses
[05:59:22] <Valen> look, if disabling the watchdog in software fixed it, then there are 2 options, the fuse bit is wrong, or you have a broken chip
[05:59:22] <mitsakos> no it is the Atmega168 and i have programmed same mcu's hundreds of times
[05:59:52] <Valen> stastically its the fuses that arent set
[06:00:00] <Valen> I'd suggest perhaps verifying the fuse bits
[06:00:05] <mitsakos> i read the fuses with avr fuse
[06:00:19] <mitsakos> and i get Low: 0xa2 High 0xd7 Ext: 0x01
[06:02:03] <mitsakos> if you check these fuses the Watch-Dog Timer Always on isn't set
[06:04:28] <mitsakos> also i set the fuse "Clock Output on PORTB0" and i get the clock but it looks like it stops after a specific time and the starts again
[06:05:27] <mitsakos> here is a screenshot
[06:05:28] <mitsakos> http://oi62.tinypic.com/11r57uv.jpg
[06:05:50] <mitsakos> at this snapshot i have included wdt_disable();
[06:07:05] <Valen> food
[06:07:11] <Valen> bbl
[06:09:58] <Lambda_Aurigae> dude...for your fuses you posted, WDTON=0...which means it's on.
[06:14:36] <Lambda_Aurigae> high byte, bit 4.
[06:22:58] <mitsakos> I think something is going wrong with the chip
[06:23:10] <mitsakos> it makes no difference WDTON fuse
[06:23:16] <mitsakos> *the WDTON
[06:23:33] <Lambda_Aurigae> is your reset line floating or tied high with a 10K resistor?
[06:24:34] <mitsakos> no it's floating
[06:24:42] <Lambda_Aurigae> there's a problem then.
[06:24:54] <mitsakos> but a usbtiny is connected on the ISP
[06:25:07] <mitsakos> which i can imagine holds the RESET
[06:25:20] <Lambda_Aurigae> have you actually checked it?
[06:25:29] <mitsakos> nop
[06:29:15] <mitsakos> say that i corrected it. Is the output clock correct? for 8Mhz?
[06:29:19] <mitsakos> did you saw the image ?
[06:29:27] <mitsakos> http://oi62.tinypic.com/11r57uv.jpg
[06:30:02] <Lambda_Aurigae> I have no clue what those are supposed to be.
[06:31:29] <Lambda_Aurigae> it looks like something is pausing the clock, possibly.
[06:31:46] <hetii> Why this https://ideone.com/T19qup show just 0 and this https://ideone.com/M2zkdI works fine?
[06:32:12] <mitsakos> I'm talking about PB0 with the CKOUT set
[06:32:51] <Lambda_Aurigae> again,
[06:32:53] <Lambda_Aurigae> it looks like something is pausing the clock, possibly.
[06:33:11] <Lambda_Aurigae> what is doing it I have no clue, having not seen your code.
[06:33:20] <Lambda_Aurigae> is the thing going to sleep maybe?
[06:34:12] <mitsakos> this is the code
[06:34:12] <mitsakos> http://pastebin.com/2hfLi6Li
[06:35:33] <Lambda_Aurigae> faulty internal RC oscillator?
[06:35:42] <mitsakos> don't know..
[06:35:54] <Lambda_Aurigae> put an external crystal on it and see.
[06:36:03] <Lambda_Aurigae> will have to change fuses to match it though.
[06:36:08] <mitsakos> when i use the 8 div fuse which divides the clock to 1Mhz i don't see any delays
[06:36:35] <mitsakos> i made a thought to try it but i don't have a crystal at this time
[06:42:46] <Lambda_Aurigae> and, I'm off to work.
[07:40:14] <inflex> lo folks....
[07:40:23] <inflex> hrmm... damn, don't recognise anyone currently active here :(
[07:55:51] <Roklobsta> me
[08:24:51] <inflex> true true
[08:26:20] <tfd123> Doing a bad job at google again... I'm trying to add a circuit for powering my ATTINY84 with a 9v battery (I know I could get better performance off 3x1.5 cells, but I don't have battery boxes for them...)
[08:26:33] <tfd123> Any recommendations?
[08:54:38] <RikusW> 7805
[09:14:52] <inflex> yep, at least with the 7805 you don't have to worry too much about caps and oscillations
[09:17:40] <myself> my recommendation would be to buy some 3xAA battery holders off ebay :P You'll spend less on a ten-pack than you would on a single 9v battery
[10:06:30] <tfd123> inflex: with the 7805, datasheet reccomends a .33uf and a .1uf cap... anything else I need to throw in there, or will that circuit work great?
[10:06:59] <tfd123> myself: board isnt for me, so I don't care how much the batteries cost, :p
[10:33:37] <malinus> you don't really need a battery pack. I just use some tape and coil for most of my applications
[10:34:01] <malinus> as long as you wind them as small springs and use decent tape there shouldn't be any problems
[10:34:10] <malinus> but I wouldn't use them for life-supporting applications ;)
[12:02:45] <perole> hm, anyone got a stm32 eagle lib handy?
[12:02:54] <perole> google doesn't turn up anything useful
[12:18:24] <R0b0t1> What is approximate time of most avr instructions?
[12:20:16] <kastein> R0b0t1: some clocks
[12:20:33] <kastein> (it depends on your core clock rate, the instruction, etc etc etc. check the manual for details)
[12:21:18] <R0b0t1> Well, yes, I know it depends on core clock rate.
[12:21:24] <R0b0t1> but like approx ~1 clock?
[12:21:25] <R0b0t1> I think that's it
[12:42:05] <naquad> any recommendations on a good guide for AVR Assembly/
[12:42:06] <naquad> ?
[13:12:34] <Daulity> R0b0t1: moste 1 clock cyle a few 2
[13:16:03] <megal0maniac> R0b0t1: See http://www.atmel.com/images/doc0856.pdf
[13:16:08] <megal0maniac> naquad: Also see http://www.atmel.com/images/doc0856.pdf
[13:16:25] <naquad> thanks!
[13:17:01] <megal0maniac> Also http://www.avr-asm-tutorial.net/avr_en/
[13:17:27] <megal0maniac> It's dated, but the principles still apply
[13:18:37] * megal0maniac hereby relinquishes his _afk suffix.
[13:18:52] <megal0maniac> From now on, I am megal0maniac whether here or not
[13:56:14] <Tom_itx> megal0maniac are you here?
[13:59:53] * Tom_itx marks megal0maniac as megal0maniac_afk
[14:08:08] <Kev> man there's something wrong with my new mega328p board
[14:08:11] <Kev> -_-
[14:08:20] <Kev> "target doesn't answer"
[14:08:24] <learath> ?
[14:10:18] <Kev> I made a board this afternoon with an atmega328p and I can't find why it doesn't work
[14:11:00] <Kev> checked the connections, tried -B 4 with avrdude
[14:11:18] <Tom_itx> how did you check the connections?
[14:11:25] <Kev> it's supposed to be a blank chip
[14:11:27] <learath> I was about to say :)
[14:11:32] <Tom_itx> with an ohm meter? or continuity tester?
[14:11:33] <Kev> multimeter
[14:11:46] <Kev> ohm
[14:11:55] <Darkwell> hey there...do you have any recommendations about making a DIY lead acid battery charger ? Thought that with a microcontroller and switching voltage tegulator you should be able to do all the same stuff as those expensive ones that has desulphuring trickle charge etc ?
[14:11:56] <Tom_itx> pullup on reset?
[14:12:25] <Kev> yeah I usually go with a 10k, but i had to use a 8.2k this time
[14:12:36] <Tom_itx> won't matter
[14:12:56] <Tom_itx> ALL the GND and +V traces routed?
[14:13:18] <Tom_itx> bad karma?
[14:14:30] <Kev> 3-5-21 for gnd and 4-6-18(avcc) for vcc
[14:15:37] <Tom_itx> using the 'p' variation in avrdude?
[14:19:52] <Kev> yeah
[14:20:11] <Kev> just tried with another programmer just in case, no luck
[14:20:24] <R0b0t1> GuShh_Lap: r u havin a giggle m8?
[14:20:40] <GuShh_Lap> R0b0t1: why?
[14:22:05] <R0b0t1> just thought I'd ask
[14:35:55] <megal0maniac> Tom_itx: It will forever be a mystery
[14:35:58] <Kev> aaight, there was something wrong with my ribbon cable
[14:36:15] <megal0maniac> Sometimes I'm here, sometimes I'm not, sometimes I'm lurking
[14:36:30] <megal0maniac> Tom_itx: Also why are you ops?
[14:36:45] <megal0maniac> Thought that title was saved for special occasions
[15:39:56] <Tom_itx> megal0maniac i changed the topic and forgot
[15:40:08] <Tom_itx> happy?
[15:40:12] <megal0maniac> no
[15:40:26] <megal0maniac> I like the hat. Put it back on
[15:40:57] <megal0maniac> Oh, haha! dyndns surprised you too
[15:41:13] <Tom_itx> no surprise, just didn't care to buy it
[15:41:53] <megal0maniac> Surprise in that they've finally scrapped the free product after years of squeezing
[15:42:02] <Tom_itx> yeah
[15:42:25] <megal0maniac> Suddenly my hostname went to their page. Wasn't impressed. Also went no-ip
[15:42:54] <Tom_itx> i signed up with another one too but forget who
[15:44:11] <megal0maniac> I have a domain and have a CNAME record pointing to my dynamic hostname. Works nicely and doesn't matter how ugly the dynamic name is
[16:59:20] <malinus> Tom_itx, heh, it seems your programmer works with the arduino IDE ;)
[17:09:18] <Lirezh_> I have an atmega128, Port D0 is set as output and to 0V. I pull it up with 5k and as expected the output reads 0V. If I now connect this circuit to it http://www.hqew.net/files/Images/Article/images/1_2(25).jpg (only the circuit, the 3 other wires floating) Then the output on my AVR Port D rises to 700mV. What can cause that ?
[17:09:38] <Lirezh_> What an cause the AVR Port D Ground sink rise to 700mV
[17:11:05] <N2TOH> conductor current saturation
[17:11:18] <Lirezh_> but the resistors are 5k
[17:11:26] <Lirezh_> it can sink 10mA
[17:11:38] <N2TOH> for how many GPIO pins?
[17:12:04] <Lirezh_> hmz
[17:12:15] <N2TOH> 10ma times how many pins?
[17:12:26] <N2TOH> add all the current up
[17:12:41] <Lirezh_> got a jtag connected, I will disconnect everything now
[17:14:17] <Lirezh_> Hmm no all pins disconnected
[17:15:20] <Lirezh_> i just checked it can drive 40mA per pin
[17:15:25] <Lirezh_> total up to 400mA
[17:15:31] <Lirezh_> it is far from saturated
[17:15:39] <Lirezh_> whole power consumption is lower
[17:15:55] <N2TOH> got a picture of your circuit?
[17:16:24] <Lirezh_> the power supply and level shifter is the shematic here: http://electronics.stackexchange.com/questions/110164/bss138-levelshifter-in-use-with-avr-logic-low-is-at-700mv-instead-of-0v
[17:16:53] <Lirezh_> only difference is 4.7k instead of 5k. and I tested the same with 1.5 and 1.1k too (same voltages no matter the pullups used)
[17:17:28] <Lirezh_> the AVR is such a board : http://www.futurlec.com/ET-AVR_Stamp.shtml. quite bare bone
[17:23:44] <Lirezh_> my multimeter indead says that there are 30mA going through it if I interconnect it
[17:23:57] <Lirezh_> it's not 40mA but indicates you are right!
[17:29:02] <myself> gotta figure the meter's burden voltage (sum of resistance plus usually a diode drop) into the circuit too.
[17:29:31] <myself> for low currents at low voltages the meter burden can be killer
[17:29:50] <Lirezh_> I am meassuring it with a osci
[17:29:57] <Lirezh_> the voltage levels are correct
[17:30:18] <Lirezh_> N2TOH is right regarding the current saturation, I was searching this bug for th epast 6 hours ..
[17:30:30] <Lirezh_> I still have no clue why it sinks 30mA but that seems to be the issue
[17:31:38] <Lirezh_> I just don't understand how it can use so much current, it is limited by Rp which is 5k5k (so I would expect 2-3 mA but not 30!)
[17:32:05] <N2TOH> the problem is on the ground pin side
[17:33:01] <N2TOH> there are much few of them compared to the other pins, so all the current has to be carried on them, and due to the current squared multiplyed the resistamce law you get heat losses
[17:33:50] <Lirezh_> The total current of the circuit is less than 100mA
[17:34:39] <Lirezh_> but the current which flows from the level shifter is 30mA which is MUCH more than what I expect, 2mA would be normal
[17:35:38] <Lirezh_> the circuit is so simple I don't understand how it can happen
[17:36:05] <hjohnson> hurray for free samples
[19:32:21] <malinus> I'm writing the value of fuses to files, but those makes no sense. I also get "avrdude: safemode: Fuses OK (E:07, H:D9, L:62)". Are those the fuse values?
[19:37:23] <Lambda_Aurigae> looks like it
[19:37:42] <Lambda_Aurigae> did you use a fuse calculator?
[19:39:02] <Lambda_Aurigae> some chips only have high and low byte fuses...others add the extended byte
[19:58:41] <Casper> malinus: and reserved bits can read high or low, which can screw up somewhat the calculation and what you expect
[19:59:01] <tzanger> malinus: always mask off the bits you are not interested in
[20:16:52] <malinus> I've always used the atmel studio tool for fuses, this is a bit more confusing. so what exactly does avrdude save to file when I read fuses?
[20:23:44] <Lambda_Aurigae> muahahahaha..
[20:23:53] * Lambda_Aurigae are playing with smtp via telnet..
[20:24:12] <Lambda_Aurigae> might have to setup an ethernet connected avr to send email messages.
[20:30:49] <malinus> Lambda_Aurigae, hmm interesting. how would that work? Are those small chips actually capable of making a tcp/udp connection and receiving and sending data?
[20:31:01] <Lambda_Aurigae> yup.
[20:31:12] <Lambda_Aurigae> http://tuxgraphics.org/electronics/200606/article06061.shtml
[20:31:30] <Lambda_Aurigae> these guys do it with an atmega88 and an enc28j60 spi-to-ethernet chip.
[20:31:53] <Lambda_Aurigae> I want to tie it to my doorbell to send me an email when someone presses it.
[20:32:15] <malinus> i would suggest buying a already made pcbboard
[20:32:29] <Lambda_Aurigae> I have a couple of old cellphones, one of which will eventually get mounted to my front door and setup for 2 way audio/video comms.
[20:32:39] <malinus> I think those are like $5 with sending
[20:32:42] <Lambda_Aurigae> I built these before.
[20:32:53] <Lambda_Aurigae> on solderless breadboard and homemade pcb
[20:33:17] <malinus> sounds like a hassle compared to buying the breakout board. And probably much more expensive
[20:33:23] <malinus> but fun I guess
[20:33:35] <Lambda_Aurigae> not more expensive really as I have all the parts on hand.
[20:33:45] <Lambda_Aurigae> and want things to do with them.
[20:34:43] <Lambda_Aurigae> the magjacks I stripped out of a dead router
[20:34:55] <Lambda_Aurigae> the chips I have as samples for the most part.
[20:35:31] <Lambda_Aurigae> and I have piles of resistors and caps and other bits and pieces that I've collected over the years.
[20:36:10] <Lambda_Aurigae> thinking of ripping apart one of my older webcams and trying to interface the camera to the AVR.
[20:36:17] <Lambda_Aurigae> so I can take snapshots.
[20:36:33] <Lambda_Aurigae> heck, I might even have an old old parallel port webcam that I can interface to directly.
[20:37:25] <malinus> Lambda_Aurigae, good luck reverse engineerin some undocumented usb-camera
[20:37:28] <Lambda_Aurigae> if I can get that working then I can take pictures to send with the emails.
[20:37:32] <malinus> Lambda_Aurigae, how would you even start?
[20:37:40] <Lambda_Aurigae> most of the camera modules are documented.
[20:37:47] <Lambda_Aurigae> and I have a pile of different brands around.
[20:37:52] <malinus> oh, so you would go for the module, and skip the usb?
[20:37:53] <Lambda_Aurigae> people have reversed them here and there.
[20:37:57] <Lambda_Aurigae> oh, yeah.
[20:38:02] <Lambda_Aurigae> forget the usb interface.
[20:38:15] <malinus> I guess I could do that, because I have two cams, of which none have drivers for linxu anyway
[20:38:29] <malinus> logitech
[20:38:41] <Lambda_Aurigae> I've already got several android phones that are out of service and not on the cell network anymore..
[20:38:59] <Lambda_Aurigae> have been playing with using those as walkie-lookie-talkies
[20:39:25] <Lambda_Aurigae> connect to wifi with ipwebcam software on them...get two way audio and video.
[20:40:28] <Lambda_Aurigae> if I hook an avr to the doorbell it would be a simple overkill toy to send me an email if someone presses the doorbell...then I can remotely initiate connection to the old phone mounted by the door.
[20:40:41] <Lambda_Aurigae> or,
[20:41:03] <Lambda_Aurigae> eliminate the phone and just have it send me an email with a single shot picture from a webcam module.
[20:42:04] <Lambda_Aurigae> the avr photo version would require some external sram to store the data before sending though.
[20:42:07] <Lambda_Aurigae> which, I have.
[20:42:14] <Lambda_Aurigae> anyhoo, off to bed.
[20:46:50] <malinus> okay, this is great http://www.engbedded.com/fusecalc/
[20:46:52] <malinus> !!!
[20:47:19] <tzanger> yes, it's one of those websites that is referenced continuously here
[20:47:29] <tzanger> wormfood's avr baudrate calculator is another one