#robotics Logs
Mar 23 2013
#robotics Calendar
00:23 Lola8088 rue_shop2, whassup buttercup?
00:23 rue_shop2 cleanup!
00:24 Lola8088 rue_shop2, TTthhhhhhpppthhht!
00:26 Lola8088 rue_shop2, the interwebs have superglued my eyeballs and if I stand up, they'll fall out.
00:26 rue_shop2 har har
00:29 rue_shop2 mmm fix the vise...
00:36 RifRaf just got new accel working then ripped of the usb header again
00:36 rue_shop2 again?
00:37 RifRaf yep, will solder again under microscope and do it properly
00:37 RifRaf its just a mini usb surface mount, so not real strong
00:38 RifRaf and testing the accel puts strain on the connector
00:38 RifRaf when i forget to think about it
00:38 rue_shop2 ah, silly engineers thinging solder is for mechanical fastening
00:39 RifRaf yep, but will use superglue as well
00:39 RifRaf the other one fell off too but has stayed on since i did that
00:40 RifRaf btw me accel was just sleeping, i had to wake it up with 3.3v to the sleep pin
00:58 RifRaf back in business, soldering tiny stuff is so nice when you can see it
02:36 yahweh .status
02:37 yahweh Wrong channel.
03:05 rue_house hah
03:13 yahweh Rue
03:26 RifRaf productive day, 3 new sensors working and logging data to rs232 and sdcard
03:27 RifRaf pressure, different brand accel, and ir pair
03:28 RifRaf mega328 is 99.8% full again, mostly the sdcard though
03:31 theBear i got one computer more or less running again, which i been meaning to get going, it's almost a twin of another machine i got, but it can reduce cpu voltage, and trying to save power/money and use less machines, that's good at the moment, athlon-xp just fsb throttled doesn't exactly use not-much power at full voltage :)
03:31 theBear soldered up that sdcard socket i mentioned last night, looks good, feels good, should probably plug it in and test it tho <grin> ..
03:31 theBear hooray :)
03:32 RifRaf yep, if it don't work i should just send you one of these, worked first time
03:32 RifRaf card holder on small pcb, like me homemade one but way more robust
03:33 RifRaf card locks in firmly
03:33 theBear oh, this isn't for me, it's some little car-lighter-socket -> radio transmitter -> linein jack + builtin mp3 player thinger i'm fixing for a few beers or maybe a smoke :)
03:34 RifRaf oh cool, well test it then
03:35 theBear shitty design too, no wonder the thing mounted only on the tiny smd pins snapped off, the hole in the casing is maybe 1/3mm too 'high', so before it was fiddled by me, the card forced the socket up off the board, which is jammed hard into a few tabs and a flat section in the plastic casing
03:36 theBear i THINK it'll test on the usb socket, the lighter power seems to be regulated in the barrel (didn't open that far, don't care :) and then runs thru the usb socket mini-pcb and up to the main board... doesn't feel worth plugging in the bench psu just for that, still most stuff packed up from the recent workbench moving
03:37 theBear kinda cool little thing tho, aside from the sd/mp3 player with a few buttons and a tiny tiny lcd, just linein -> radio transmitter powered is handy for modern cars you can't use 'fake casette's to do a linein
03:37 RifRaf yep
03:37 theBear i ended up with a little tiny belkin transmitter a few years back for a similar kinda job/trade, but it's single aa, and it doesn't last for a 2hour drive, which kinda sucks balls
03:38 theBear had a few beers, sorry for rambling, but you should see the subjective/opinion question i punished #motion with 10 mins ago :)
03:38 theBear longer than all this put together :)
03:41 theBear you ever done general purpose 'surveillance/security' camming around your place with motion ? the pc that handles it is OLD, and can't do full res/framerate if i want it to encode when motion is detected, trying to decide how to get small details a bit more visible but still have it useful (ironically, lost a security cam most likely right in front of the loungeroom cam recently, been trawling thru vids where you can ALMOST makeout things like securi
03:41 theBear ty cams on the table/workbenches, kinda painful)
03:43 theBear if i knew which black smudge on the table was the cam, it'd be MUCH quicker to narrow down when it was misplaced or perhaps went walkies (current shortterm house-monkey/boarder occasionally brings home questionable women when he been drinking for example :( not long now tho)
03:43 joga I've used motion sometimes, it's pretty nice for simple things
03:43 joga of course proper vms stuff allows you to do complicated pixel search etc
03:45 theBear mmm, MANY years ago rif got a few of us interested in the motion-tracking side of things, we all made up a few little avr-based servo/stepper rigs and had our little webcams following us around the room :) since then i come across a cam here and a capture card there, so i keep a few around, handy for stuff like working out if someone visited while you were out, or some crazy ex-aquaintance of the female variety has been bashing on your window/door w
03:45 theBear hile you aren't around causing noise complaints
03:46 theBear yeah, but proper vms stuff doesn't run 3 cams comfortably on my p3-1000 WHILE it does web/authoritive dns/gw-firewall-nat/public-ish mailserver/db etc etc for me, all the while using very little power and making very little heat :)
03:46 joga my work involves security cams but I had a tiny ptz webcam at home for a while too, watched the cats with it heh
03:46 theBear p3-1000 is only about a 40w proc running flatout :)
03:47 theBear also good for screening doorknocks if yer napping or lying around watching a movie, and for fun i got it playing a bigben doorbell kinda noise on this desktop if someone is near the frontdoor when i'm around :)
03:47 joga heh
03:47 Jak_o_Shadows I'd have a webcam like that, except I can't be bothered running wiring everywhere
03:47 theBear and for cool points i can view it with only about a second delay from my phone ANYWHERE :)
03:48 RifRaf ok back now, was off trying to take aa picture, but flat batteries in camera
03:48 RifRaf i used motion alot with mini itx pcs
03:48 joga quite a few years back I was away from my apartment for a couple of weeks and knew that during that time a repairperson would come around to fix some things, so I put a webcam+motion to alert me on irc when it sees someone
03:48 RifRaf was about the smallest
03:48 theBear Jak_o_Shadows, i cheated, backdoor is just a couple meters up and across the top of the curtain rail, loungeroom is at the end of the curtain rail, modem/pc straight down from there by the phone socket, and shared half an existing cat5 witha little balun winding sneakiness/butchery and a splitter so i just need a 3meter cat5 across one side of the kitchen to get the front window/door :)
03:50 theBear got an old vga -> bnc tails i put a 'special' socket on the back of the pc for 3 inputs + 1 audio + 12vdc out, so all the messy stuff is at the corner of the curtain rail
03:50 joga analog cams?
03:50 theBear was very educational messing around with simulated transmission lines and various balun/transformers (mostly handwound on random old cores from psus etc) and the scope.... doing 60hz -> a few meg is an interesting challenge
03:51 theBear yeah, 1 ntsc b+w (good with ir/dim situations, waterproof, ex car reverse camera, originally used SOMEWHERE in the making of the matrix 1 and/or 2), a nice little pal lipstick full colour, and a no-case old crappy one in the front window
03:52 theBear got an old 4*bt878 with 16 input multiplexer from an ex pub security machine, it 'doesn't exist' but i reversed it a bit and modificated an existing kernel driver for it, been working great for about 7 years now
03:52 joga I have like 40 4-port capture cards lying around at work
03:53 theBear this one is err, idis or kodicom, whichever one ISN'T in the stock kernel
03:53 joga or more actually, but their number will increase as we get rid of the last old cams
03:53 theBear one of these days i migth even get around to submitting my patches so i don't have to keep up with syntax/keyword changes over the years
03:54 theBear baluns and transformers really are fascinating once you kinda understand the math and do a bit of playing/scoping... specially things like sneaky common mode choke AND impedance changing baluns, and trust me, 3:4 (75->100-110ish for cat5) is NOT a common one
03:55 theBear 1:4 or 2:1 etc etc are all super common on ham sites, but this one took some learning and fiddling
03:55 theBear in the meantime, i understand transformers and inductor and magnetic theory better than ever
03:55 theBear dammit, you gotta tell me off when i ramble like this, i drink and my fingers get excited... at least tell me to stick to the point :)
03:56 RifRaf is all good, i love a good ramble, if i could contribute any more i would
03:57 theBear also got some good experience/practice with weird triggering/viewing 'modes' on the scope (dual 20mhz analog, more or less standard kinda thing) ... messing around between closeups of high freq where you can almost see your hand moving in front of the cam, then switching it WAY up high and fiddling the all the trigger settings so you can view a frame or two and sync like a tv, etc etc
03:58 theBear worked out how to do 'fake' differential with a+b modes inverting one channel and things like that, for testing common mode rejection and amount of balancing out of freakishly low turn count coils (super high freqs are 'weird' magnetically, and when yer doing a 'series' style balun that looks like wires as you get close to dc, just a few turns can do amazing things)
03:59 theBear if i ever stumble across a video-speed opamp i gotta try doing active balancing for the send end, it's surprisingly good now, but when i plug the pc into the split about 30/3 meters down the shared cat5 i get some soft diagonal bars that i'm PRETTY sure are mains freq related
04:02 theBear tempted to be REALLY 'dodgy' and try putting an audio line on top of the dc pair in the cat5 one of these days, that'd be the height of ghetto 'coax is too expensive' kinda butchery
04:09 RifRaf todays project, best thing is all the parts are working correctly on day one :)
04:10 RifRaf http://imagebin.org/251354
04:10 Jak_o_Shadows sorta wish i had an oscope
04:12 Jak_o_Shadows and an understanding of how this hex convert/buffer (4009UB) is meant to work with an open collector
04:12 RifRaf like an old 4000 series ic?
04:13 Jak_o_Shadows yeah.
04:13 RifRaf well its not in this mims book, will try another
04:14 Jak_o_Shadows I was under the impression that I supplied GND, +5v to power it, +Xv, and it would output high signals at +Xv
04:14 Gargantuasauce_ i had a look at the datasheet, it looks like it only converts down and not up :/
04:16 Jak_o_Shadows thats, um, annoying. I have the datahseet in front of me, on paper, but I don't really understand the specifics.
04:16 Jak_o_Shadows is that the bit in "High to Low level logic conversion"
04:17 Gargantuasauce_ just look at the very first graph in http://www.datasheetcatalog.org/datasheets/320/108575_DS.pdf which may or may not be the same doc
04:17 Gargantuasauce_ fig 3
04:18 Gargantuasauce_ and vcc is apparently not supposed to be greater than vdd
04:18 Jak_o_Shadows Different docs, but I wouldn't be too surprised if tiat's correct
04:19 Gargantuasauce_ what do you want to drive with it
04:20 Jak_o_Shadows Was going to use it to drive a mosfet. This mosfet wants a higher voltage
04:21 Gargantuasauce_ if having the mosfet on with the mcu off/starting up is ok, you can use a pull-up resistor on the gate and an open drain output on the mcu
04:22 Gargantuasauce_ you could also use a fet with a lower on Vgs, i recommend ntd4906
04:22 Jak_o_Shadows That would be ok, but i've never really understood pull up resistors
04:23 Gargantuasauce_ well the way an open drain output works is it either has high impedance to ground and +v (which is its on state) or it effectively is a short to ground (which is off)
04:24 Gargantuasauce_ the pullup resistor just allows the gate's voltage to be low when it's in the latter state (without sinking a bunch of current from +v to the output)
04:24 Gargantuasauce_ and high when it's in the former
04:25 Gargantuasauce_ do you know how a voltage divider works?
04:25 Jak_o_Shadows yes.
04:26 Gargantuasauce_ you can consider the OD output to be a very high resistance in the on state, and a very small resistance to ground in the off
04:26 Gargantuasauce_ and that forms a voltage divider with the pull-up resistor
04:29 Gargantuasauce_ also you have a couple other optons including a pair of BJTs in one of several configurations to drive the gate, or an IC specifically for this purpose called a gate driver
04:30 Jak_o_Shadows Yeah. If i can get this working, it'd probably be best and easiest?
04:31 Gargantuasauce_ well if you ask me the best and easiest is to just use a fet that can be driven by logic levels
04:32 Jak_o_Shadows haha
04:33 Jak_o_Shadows So when mosfet not on, uC is acting as a drain.
04:34 Gargantuasauce_ yes, sinking a little current through the resistor
04:35 Gargantuasauce_ also if you want to do high frequency pwm you'll need to actually drive the gate high and low
04:36 Jak_o_Shadows http://imagebin.org/251356 is what i'm thinking of atm.
04:37 Jak_o_Shadows where the bottom gnd is the uC
04:39 Gargantuasauce_ looks like a mighty fine smoke generator
04:40 Gargantuasauce_ you probably want the top and bottom rungs of the H bridge to not be on at the same time :V
04:40 Jak_o_Shadows haha
04:41 Gargantuasauce_ monolithic h-bridges at least have built in logic to ensure that never happens
04:41 Gargantuasauce_ you might want to do the same so that a software error will not result in instant combustion
04:42 Jak_o_Shadows Was planning to, using some logic gates.
04:43 Jak_o_Shadows Also, basically link opposite ones?
04:43 Gargantuasauce_ yeah
04:43 Gargantuasauce_ though you probably want a mode where both low sides are on
04:43 Gargantuasauce_ for braking
04:45 Jak_o_Shadows I just put switches into the schematic, right on the gate of each fet, just to fiddle around and try and see what it does.
04:45 Jak_o_Shadows Simulation software DOES NOT LIKE
04:46 Gargantuasauce_ also bear in mind the gates have a small capacitance
04:46 Jak_o_Shadows Yes, but apparently that largely changes switching time?
04:46 Gargantuasauce_ that and their behaviour when left floating
04:47 Gargantuasauce_ they will maintain their on/off state if simply disconnected
04:48 Jak_o_Shadows Yes, I remember connecting a 100k resistor between two pins to fix that
04:50 Jak_o_Shadows between drain and source I thnk
04:50 Gargantuasauce_ it would have been the gate and one or the other
04:51 Gargantuasauce_ wait hold on
04:52 Gargantuasauce_ using n-fets for the high side switching makes driving a bit more complicated
04:53 Gargantuasauce_ because the voltage on the high side of the motor will be close to +v
04:54 Gargantuasauce_ meaning in order for those high side fets to be on, the gate has to be at Vcc+Vgs
04:54 Gargantuasauce_ this is where those gate driver ICs come in real handy
04:55 Gargantuasauce_ because they have built in charge pumps that facilitate that
04:55 Jak_o_Shadows Is that circuit I linked, once I linked opposite fets, not a smoke generator?
04:56 Gargantuasauce_ the high side fets either won't turn on or will settle with Vgs in the linear region
04:56 Gargantuasauce_ and will probably dissipate enough power to asplode
04:57 Gargantuasauce_ you might also want to look at integrated h-bridges, the L298 is very convenient if it serves your current needs
04:57 Jak_o_Shadows I had a brief look, and I have 1, but I need at least 6 amps, probably more.
04:58 Triffid_Hunter Jak_o_Shadows: making a motor driver?
04:59 GuShH L298, do they come with free spider webs?
05:00 Triffid_Hunter Jak_o_Shadows: I used HIP4082 in my last motor driver, works excellently well. suggest you do the same
05:01 Triffid_Hunter it handles everything required to drive 4x N-channel fets, including shoot-through prevention/dead time logic
05:04 Triffid_Hunter Jak_o_Shadows: http://triffid-hunter.no-ip.info/esc_sch.png http://triffid-hunter.no-ip.info/esc_brd.png https://picasaweb.google.com/lh/photo/TYZEKttEzL-Gs6jMMpW0rNMTjNZETYmyPJy0liipFm0 http://github.com/triffid/ESC if you want to see mine.. it's good beyond >15A if you pick Rsense appropriately or use the ACS712 option
05:05 GuShH 64MB!
05:08 Gargantuasauce_ no freewheel diodes?
05:08 Jak_o_Shadows That seems like a decent idea...
05:09 Triffid_Hunter what's 64MB?
05:09 GuShH your microsd
05:09 Triffid_Hunter Gargantuasauce_: yeah I skipped them.. 15A diodes are massive compared to the PCB area I was targeting
05:10 Triffid_Hunter GuShH: oh yeah, got from an old phone I found in a bin, still works great
05:10 Jak_o_Shadows Triffid_Hunter: What control circuitry/voltage does it use? Was planning onusing an msp430, which is 3.3v
05:10 GuShH I want some small ones for datalogging but I couldn't find any
05:10 Gargantuasauce_ why bother when a gigabyte is <$1
05:10 ShH eyer
05:11 Triffid_Hunter Jak_o_Shadows: it's using an atmega328p on internal 8MHz osc at 3.3v. can just as easily use 5v if you switch the reg but I wanted to make sure it behaved at 3.3
05:11 RifRaf using a 4gb sd here is is datalogging well, and can plug into pc to read it
05:13 RifRaf at 1 reading every 10 seconds will take a while to fill, but will have some good data to look at in morn
05:13 GuShH log-a-boner
05:14 Triffid_Hunter Jak_o_Shadows: that's the little MLC chip on the left :)
05:16 Jak_o_Shadows haha, little
05:20 Triffid_Hunter Jak_o_Shadows: anyway, the HIP4082 really takes all the hard work out of driving a H-bridge.. I just set the two high side lines according to what I want then drive one of the low side lines with PWM
05:21 Triffid_Hunter Jak_o_Shadows: so I can access ALL the drive modes :- brake (short motor), cruise (leave motor open), locked antiphase (motor connected one way, then the other to supply), drag brake (motor connected to supply, then shorted) or plain throttle (motor connected to supply then left open) in both forward and reverse
05:26 Jak_o_Shadows tha'ts handy
05:27 RifRaf hip4081/2 rules, have used quite a few as well
05:30 k_o_Shadows sighs. It's all the small things that add up eh, especially if you plan on accidentally blowing som
05:32 Triffid_Hunter Jak_o_Shadows: it's definitely worth the ~$8/ea or so that they cost
05:34 Jak_o_Shadows Leaning towars that, yes
07:24 GuShH RifRaf: did you get the lcd to work?
08:34 jennie Hello
08:37 GuShH rue_house: ideas on where to get some "free" spring steel sheet?
08:37 gmag_ hello, is it feasible to connect one of those wifi usb devices to a PIC18F4550?
08:37 GuShH I need to make my own version of this http://www.kermatdi.com/servlet/the-378/Intake/Detail
08:38 GuShH gmag_: it's not simple
08:38 jennie rue_house:
08:38 jennie here ?
08:38 GuShH a wifi module with i2c or similar interface is your best bet
08:38 gmag_ GuShH, but assuming 18f4550 permits usb protocol it should work
08:39 GuShH it's not as simple.
08:40 ace4016 not sure what the specs of the chip are, but if it's a USB wifi adapter and the chip supports USB communication...it could work
08:40 GuShH of course it could
08:40 GuShH and it will, but he wouldn't be asking if he knew the answer
08:41 GuShH hence, go for a simpler route.
08:41 GuShH i2c or similar is your finest choice.
08:43 gmag_ if it gets very complex with usb I probly go for a UART (or I2C) camera: http://www.cmucam.org/
08:44 gmag_ ace4016, exacly that was my thought, if microchip claims their 18f4550 allows USB then it should work
08:44 GuShH just stay away from anything that says "arduino" or "shield"
08:44 gmag_ GuShH, :) why?
08:44 gmag_ you dont like arduino?
08:45 ShH looks at ace4016 and then looks back at g
08:45 ag_ wonders why GuShH is looking everywhere like craz
08:46 ace4016 lol
08:46 ace4016 i'm not a fan of arduinos
08:47 gmag_ ace4016, I started my electronics path with PICs, which make me more a PIC guy than an arduino
08:47 gmag_ ace4016, free samples from microchip are great
08:47 gmag_ never had to buy a PIC actually
08:48 gmag_ it's just sad that we need to use their tools to build a project in C. Never used SDCC but dont think I can build stuff for pic18f family
08:49 ace4016 heh, kind of the opposite for avrs :P
08:49 ace4016 pick your poison
08:49 gmag_ :)
08:51 GuShH friggin 110hp tdi going at 35hp is NOT COOL, DAMN YOU VM
08:51 GuShH I mean VW
08:51 GuShH :/
08:59 GuShH limp mode is fun though, it starts to smoke black and run like an old piece of shit.
11:20 rue_house http://eds.dyndns.org/~ircjunk/images/p1040884.jpg <-- who is building that with me?
11:28 yahweh Hey Rue_mohr
11:31 jennie I am building
11:31 jennie lets start
11:43 rue_house hey
11:43 rue_house jennie, dont put in the op[-amp yet
11:45 rue_house jennie, have you assembled any of it yet?
11:45 rue_house start with the diodes, for each phase, then to the power transistros, and the 2222 for the top transistor
11:46 rue_house one of the robotics kids cancled on me, so this wont be too much
11:50 rue_house yahweh, ?
12:06 jennie I havent put Opamp yey
12:06 jennie yet*
12:06 jennie sorry I was distracted
12:26 yahweh Rue!
12:27 yahweh Would you want 3 matching LCDs
12:27 yahweh 1600:1200 20.1"
12:28 rue_house isn't that wide format?
12:28 yahweh No, it's 4:3
12:28 yahweh Math dude
12:28 rue_house :)
12:28 rue_house its morning
12:28 rue_house wel ok
12:29 rue_house I found the replacment bulb for that projection tv
12:29 yahweh There's an ad on CL for 6 matching ones. He's willing to sell separate but I'm willing to bet he'd drop his price if we bought them all.
12:29 yahweh 1600x1200 is getting to be a very expensive format. :(
12:30 yahweh Cheapest new I can find on line is $400
12:30 rue_house ah, I have like 20 15/17" lcd's just recently
12:30 rue_house not into putting money into it
12:30 yahweh Haha, yeah
12:30 yahweh Are any of them 5:4?
12:30 yahweh 1280x1024
12:30 rue_house all 4:3
12:30 yahweh :(
12:30 yahweh I hate 1080p
12:30 rue_house 5:4 isn't wide...
12:31 rue_house yea
12:31 yahweh It's ruined everything else.
12:31 rue_house the guy who made widescreen popular is an ass
12:31 yahweh Movie industry
12:31 yahweh And their marketing.
12:31 Tom_itx lcd pannel marketing
12:32 yahweh at smaller size 1080p sounds bigger because it's measured corner to corner.
12:32 Tom_itx saturate with one then change it
12:32 yahweh a 19" 16:9 monitor is tiny, a 19" 5:4 is huge.
12:32 yahweh Tom
12:32 yahweh 's got it.
12:33 yahweh http://sunshine.en.craigslist.ca/sys/3682041847.html
12:34 yahweh Pretty good deal if they're in decent shape none the less.
12:34 rue_house oh 40-50!
12:34 rue_house hmm
12:34 yahweh I bet he'd sell the whole lot for $200
12:35 rue_house hmm what brand
12:35 rue_house think he might trade fora working 50" projection tv?
12:36 yahweh http://h10010.www1.hp.com/wwpc/ca/en/sm/WF06b/12142134-12142136-12142136-12142136-12142200-12326632-67478465.html?dnr=1
12:36 yahweh I doubt it, you could ask though.
12:37 yahweh brb
12:41 yahweh The panel is Samsung
12:43 yahweh oh wait no, LG
12:43 yahweh Well, it's not optronics or the other chinese one.
12:44 yahweh That's what's important.
12:46 yahweh http://news.cnet.com/8301-1001_3-57575827-92/china-chooses-ubuntu-as-state-endorsed-operating-system/
12:46 yahweh XD
12:46 yahweh That's something for everyone right there.
12:47 ace4016 not sure why that matters >_>
12:49 yahweh I had a chuckle.
12:50 yahweh Doesn't the idea of turning your software over and seeing "made in china" written on the bottom kind of irk you a bit?
13:10 RifRaf GuShH, LCD works but still has the initialising isses
13:45 yahweh So you around Rue?
13:45 yahweh I might pop by.
14:10 rue_shop2 yea
14:12 ocei3ko Best program for simulating circuits?
14:18 RifRaf ocei3ko, what kind of circiuts?
14:18 ocei3ko Electric ones.
14:18 RifRaf why not just make em
14:19 ocei3ko Heh
14:19 ocei3ko What about planning?
14:19 ocei3ko Is geda the best for that?
14:20 RifRaf never used it really, don't do alot of planning either
14:21 Tom_itx rif just dives in head first
14:21 Tom_itx figures out how to swim once he's in the water
14:21 RifRaf yep, and seem to learn better that way
14:24 ocei3ko Heh, seems like a big project would need some planning
14:28 RifRaf sure, but what kind of circiuts do you want to make?
14:32 ocei3ko Atm Im just learning
14:32 RifRaf breadboard and a couple of multimeters can plan alot, but dunno how complex your 'electric ones' are
14:33 RifRaf well learn by doing, screw simualations, you won't even know how to drive them
14:34 RifRaf much more rewarding making that led blink in real life
14:35 fRaf goes back to solder suc
14:36 RifRaf putting same header pins on a few lcds so i can swap them around and try nut this issue out
14:59 Rif shorted out my usb ports, but seems they have a resetable fuse, all working again
15:00 RifRaf thought i had killed programmed again
15:00 Gargantuasauce_ usb ports have such wonderful protection
15:00 RifRaf ok 16x2 line lcd has same init issues
15:00 Gargantuasauce_ i accidentally sunk ~12v into the 5v rail and it took it like a champ
15:01 RifRaf yep is not the first time all the wires on desk have done this kinda thing
15:05 RifRaf hrm, this must be the ports i am using for the lcd maybe
15:05 RifRaf have recently moved away from the pins shared with isp, because i had to unplug lcd to flash
15:06 RifRaf maybe this jtag issue i had ages back, will check fuses and see what they are set to
15:36 RifRaf is SPI same as ISP ?
15:37 RifRaf or can i turn off SPI programming fuse bit if i always use the ISP interface?
15:56 RifRaf well so far no luck
15:57 ocei3ko If a multimeter shows 10v on a 9v battery, and 1.6 on a 1.5v battery, is something wrong?
16:02 RifRaf try replace the multimeters battery unless you know its new
16:02 RifRaf is the 1.5v rechargable?
16:02 ocei3ko I dont mean the battery inside the mm, I mean when testing the voltage on said battery
16:03 RifRaf yes i know what you said
16:03 ocei3ko and no, neither battery is rechargable
16:03 ocei3ko i dont see why the mm would be off by one
16:04 RifRaf have yu got access to another meter?
16:04 ocei3ko No
16:05 ocei3ko The mm hasnt been used much over a year or so, but the battery hasnt been changed at all
16:08 ocei3ko Think this is broken?
16:11 RifRaf nope, just not accurate, try another battery or another meter is the only way you will ever know
16:12 ocei3ko Ah ok, why would changing the battery make a difference for voltage readings?
16:12 Tom_itx dead battery will not show good voltage
16:13 ocei3ko Ah, ok
16:13 ocei3ko I mean the one inside the mm
16:13 ocei3ko s/i/you/
16:14 RifRaf swap your 9v batterys, put the one that says 10v into the meter
16:14 ocei3ko Alright, will do when I have the tools available
16:14 RifRaf and then measure the other one from the meter and lets see wat you get\
16:14 RifRaf er like a screwdriver?
16:15 ocei3ko Yeah
16:15 RifRaf find one so we can fix the problem
16:15 ocei3ko Don't have one here
16:16 ocei3ko With regards to storing batteries, is there any problems with just putting them in a box? I assume it wont be a problem for the ends to touch things
16:16 ocei3ko I really dont see how it would be a problem
16:18 RifRaf well it can be a very big problem if the wrong bits touch, try touching 2 car batterys together, or some decent lipo cells
16:19 GargantuaSauce or, you know, don't
16:19 ocei3ko I was thinking about something connecting both ends of a 9v, for example
16:19 GargantuaSauce yes it is very easy for those to be shorted by a metal object
16:19 GargantuaSauce stick tape over the terminals
16:22 ocei3ko alright, done
16:24 ocei3ko Is it worth buying an Arduino?
16:25 RifRaf no but a cheap clone is a pretty good deal
16:40 RifRaf ok i found a big issue that i need help with, my project is at 108%, which is no good
16:41 RifRaf but,, 21% of the space is used by a single function i made to determine a colour from the HSL values
16:41 ocei3ko what issue?
16:42 ocei3ko is this hardware or software related?
16:42 RifRaf would anyone like to take a look and suggest ways i could make it more efficient
16:42 RifRaf software
16:42 ocei3ko me
16:42 RifRaf cool :)
16:42 RifRaf will pastebin the function
16:43 RifRaf this is the file colour.h http://pastebin.com/3XTS5eMx
16:44 GargantuaSauce don't put function definitions in header files
16:44 GargantuaSauce put function declarations in them
16:44 GargantuaSauce and then define the functions in c files
16:44 RifRaf its basically i huge chuck i wanted to remove from main code, but if i don't include this file i save 21% of the sapce i have available
16:44 RifRaf GargantuaSauce, i am ready to listen and make changes
16:45 RifRaf ok so i need to make a c and h file for colour
16:45 ocei3ko No offence, but that is really ugly
16:45 RifRaf lmao, i can't code my way out of a wet paper bag
16:45 RifRaf but somehow it worked
16:46 ocei3ko colour.h holds function declarations (int foo(void):), colour.c holds function definitions (int foo(void) {})
16:48 RifRaf i made that code by using colours and seeing what values they were in HSV then making a line of code to trap the values and make it a colour
16:48 RifRaf no planning watsoever :)
16:49 RifRaf simply because i don't know how to plan for something that i don't know i am making, things just happen
16:49 ocei3ko Is that function really needed?
16:49 RifRaf only when i want to turn HSL values into human readable colours
16:50 RifRaf the project revolves around a colour sensor, so is kinda handy
16:50 RifRaf am yet to see how wasteful my code is for the sensor itself :)
16:51 RifRaf but if i could 1/2 the space that code uses then i can use the sdcard
16:51 ocei3ko I have no clue how to help with this function. Seems like a logic problem more than software. All I can say is that you're probably doing this completely wrong, though technically speaking it "works"
16:51 GargantuaSauce the way I see it you basically have two choices
16:52 GargantuaSauce you can expand your knowledge of the language to the point where you can actually recreate that code in a terse and efficient manner
16:52 GargantuaSauce or you can use a microcontroller with way more storage :V
16:52 RifRaf more storage it is :)
16:52 RifRaf funduino here we go
16:53 RifRaf was hoping to find something smaller than the jump from 32k to 256k
16:53 RifRaf but it really does open some doors
16:53 GargantuaSauce i know i sound like a broken record at this point but i really think you're setting yourself up for failure with that approach to coding
16:53 GargantuaSauce or at least, misusing your time
16:54 RifRaf GargantuaSauce, ok in winter when its cold i promise i will spend time learning to code from the book again
16:54 ocei3ko K&R is only 280 pages or so
16:54 ocei3ko Can do that in two days
16:55 Tom_L not absorbing all of it
16:55 RifRaf :/
16:55 RifRaf takes me 2 days a page
16:55 ocei3ko Tom_itx, Right, but a quick read is better than nothing
16:55 RifRaf maybe i will speedread it a few times
16:55 RifRaf you are right
16:56 ocei3ko On the subject of absorbing, how does on commit stuff to memory easily?
16:56 RifRaf lol wats memory
16:56 GargantuaSauce by understanding it
16:56 ocei3ko Hmm
16:56 GargantuaSauce memorizing it as arbitrary information is useless
16:56 SorcererX short term or long term memory? :)
16:56 RifRaf mine was lost long ago
16:57 GargantuaSauce anyway fwiw as far as that function goes i'd reimplement it using an array of structs containing the pre-defined colour values and pointers to strings containing their names
16:57 RifRaf things come back to me after i relearn them, so its not really like memory i think, but i know i've done it before, more like deja vu
16:58 GargantuaSauce and then the function would just be a for loop and a comparison, probably with a tolerance defined by a parameter
16:58 RifRaf ok will imprint those last two lines into the code till they make sence
16:58 GargantuaSauce noooo
16:59 ocei3ko lol
16:59 RifRaf i know you know wat you are talking about
17:00 ocei3ko Seeing this is almost as bad as seeing camel case code.
17:00 GargantuaSauce ok here's an analogy
17:00 GargantuaSauce archery
17:01 GargantuaSauce you have to know how to hold your body as you grasp the bow and draw the arrow
17:01 GargantuaSauce that's the knowledge of the language and platform
17:01 GargantuaSauce you also have to see the target and line the arrow up with it
17:01 GargantuaSauce that's a mental model of your code's design
17:02 GargantuaSauce you can't just shoot arrows until you hit the target
17:02 RifRaf k
17:02 GargantuaSauce you'll kill someone!
17:03 GargantuaSauce approach an implementation by laying out the information you have access to and the information you want to infer from it
17:03 GargantuaSauce and try and come up with a transformation between the two of minimal complexity
17:03 GargantuaSauce before even writing a line of code
17:04 RifRaf yep i get wat you are saying
17:04 GargantuaSauce ok
17:04 GargantuaSauce i really wish i had some idea how to approach this pedagogically
17:04 GargantuaSauce i feel incapable of explaining the process because it's ridiculously obvious to me :/
17:05 GargantuaSauce anyway i'm worried that the more you blunder-code the more entrenched you'll be in that approach
17:07 RifRaf so where do people learn to code? at school or did everyone teach themselves?
17:07 Tom_L self
17:07 GargantuaSauce bit of both for me
17:08 GargantuaSauce i have a bachelors in compsci but most of where i am came from self-study while frustrated with the shitty courses involved in that
17:08 SorcererX RifRaf: self, then school, then more self, then school, then more self, then work, then more self, then work, then more self.. ad infinum
17:08 GargantuaSauce and i have a couple stupidly complicated work projects under my belt
17:10 RifRaf GargantuaSauce, so if I could rewrite that function a better way do you think it would use alot less that 7kb of flash memory?
17:10 GargantuaSauce yes for sure
17:10 GargantuaSauce all those big compound conditional statements are a whole bunch of instructions
17:11 RifRaf hrm ok them, i am done with projects for a bit, or at least have several i can use to learn new code with
17:11 GargantuaSauce unifying them all into a single set of comparisons would bring down the code size to a little more than a single colour's worth in the current implementation
17:11 RifRaf so nothing new till i learn more about code for a week or two
17:12 GargantuaSauce that's probably a good idea, i bet you can gain a pretty decent understanding of how structs and arrays work in that time
17:12 GargantuaSauce also you might want to try the compile flag -Os in the meantime as a stopgap measure
17:13 RifRaf to optimise?
17:13 GargantuaSauce yeah it optimizes for code size
17:13 SorcererX -Os optimizes for size
17:13 GargantuaSauce very handy for this purpose
17:13 RifRaf am already as optimised as a can be, is 135% if i dont :)
17:13 RifRaf discovered that one last week
17:13 GargantuaSauce oh and do move all your function definitions out of the .h files
17:14 RifRaf yes will do
17:14 GargantuaSauce the result of having it that way is the function is included in the binary for each #include
17:14 GargantuaSauce which is probably a big part of the space problem
17:15 RifRaf oh wow, well that sounds like the first thing to do then
17:15 SorcererX with header guards, it should only be included once regardless.
17:16 RifRaf oh, i just looked on my bookshelf and found C for Dummies ,is this worth having a look at again?
17:16 RifRaf i have obviously been here before
17:17 GargantuaSauce i dunno about those books, their quality varies wildly
17:17 SorcererX I think I looked at that once, it has very little info on very many pages :)
17:17 GargantuaSauce i'd say stick with tcpl for now
17:17 RifRaf or stick with the tcpl
17:17 RifRaf okies
19:15 Willdude123 Where can I get an irobot create in the UK?
19:15 Willdude123 I robot don't do international shipping.
19:35 KimLaroux Willdude123: this? http://www.robotshop.com/eu/productinfo.aspx?pc=RB-Per-04&lang=en-US
19:36 KimLaroux wait does this even include the bot...
19:36 Willdude123 That's really expensive.
19:36 KimLaroux Oh yes, it does
19:37 Willdude123 It's only supposed to cost $130
19:37 KimLaroux yeah they don't seem to stock the vanilla Create
19:37 KimLaroux maybe you can contact them and ask
19:39 Willdude123 Looks like http://www.zagrosrobotics.com/shop/item.aspx?itemid=712 ships to UK, but after VAT, it'd cost around £150
19:40 Willdude123 I'm going to an exhibition where iRobot are exhibiting, I might ask them there.
19:43 KimLaroux they exhibit in the UK, but don't distribute there?
19:53 Willdude123 They still sell their main product, robotic vacuum cleaners.
19:54 Willdude123 I wonder about the raspberry pi on one.
19:58 KimLaroux why don't you contact them directly and do some PR?
20:01 Willdude123 What do you mean?
20:02 KimLaroux Call the representatives in the UK and tell them a story
20:03 KimLaroux like you're a student interested in AI and would like to develop using their platforms
20:03 KimLaroux =D
20:03 KimLaroux Who knows - you may end up with a free one
20:04 KimLaroux if you're convincing
20:23 Willdude123 I am a student interested in AI.
20:24 ace4016 lol, well then now you don't have to lie
20:24 ace4016 use your uni address for credability
20:24 Willdude123 I wonder if an arduino could be powered somehow from an I robot create.
20:24 Willdude123 I'm not a uni student though.
20:25 Willdude123 I'm a 9th grade (year 8) student interested in AI.
20:25 ace4016 ah
20:25 ace4016 unless its a group of you, they might not then
20:27 Willdude123 What would an output do on an irobot create??
20:28 Willdude123 Or an input.
20:29 GargantuaSauce if you can afford it you might want to start with lego nxt or something
20:29 GargantuaSauce probably would do a better job of helping you learn the fundaments
20:33 ace4016 there are probably cheaper learning platforms than the irobot create
20:33 GargantuaSauce something modular would be a good idea too
20:39 KimLaroux yeah honestly, there's plenty of choice http://www.robotshop.com/eu/robot-kits.html
20:39 GargantuaSauce also shop around
20:39 GargantuaSauce that source has really high prices
23:56 Triffid_Hunter Willdude123: AI eh? I would strongly suggest you plug an arduino into an RPi and go from there
23:57 Triffid_Hunter Willdude123: the arduino is excellent at low level I/O, such as hard realtime signal generation and various other things. The RPi has a nice balance of cpu speed vs power consumption for robotics applications, you can do all your heavy number crunching on that, ie openCV, kalman filtering and similar