Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
NoneMoreNegative
Jul 20, 2000
GOTH FASCISTIC
PAIN
MASTER




shit wizard dad

So sleepless :o:

http://www.thingiverse.com/thing:215558

Adbot
ADBOT LOVES YOU

salisbury shake
Dec 27, 2011
https://thingiverse-production.s3.amazonaws.com/renders/f6/3e/c5/2e/2e/dogemix_preview_featured.jpg

Usagi-Sauce
Dec 2, 2005

YAMOxNINJA
~otp~

Sagebrush posted:

listening to the flyback whistle like iron man's pulse cannons as it was charging up the whole bank was super cool

love that sound, want to use it prominently in game i'm not currently working on #3 (started 2006) even though now people are just gonna hear it and go "oh it's that iron man sound"

quadpus
May 15, 2004

aaag sheets
i'm setting up my new raspberry pi (thanks Sir DonkeyPunch!) and my usb wifi dongle needs external power. i could buy a good powered hub and call it a day, but when i start putting actual money into something like this it loses its fun, so i think i ought to make a power injector from garbage i have lying around.

namely, a cheap-looking regular USB cable, and a reasonably quality USB extension cable

basically I want to make this:

but with a female A connector instead of the micro-B connector.

i'm just not sure what i should do with the power of the upstream data connector. leave it disconnected? combine all the power wires together? combine with diodes so there isn't any back-feeding?

Base Emitter
Apr 1, 2012

?

quadpus posted:

i'm setting up my new raspberry pi (thanks Sir DonkeyPunch!) and my usb wifi dongle needs external power. i could buy a good powered hub and call it a day, but when i start putting actual money into something like this it loses its fun, so i think i ought to make a power injector from garbage i have lying around.

namely, a cheap-looking regular USB cable, and a reasonably quality USB extension cable

basically I want to make this:

but with a female A connector instead of the micro-B connector.

i'm just not sure what i should do with the power of the upstream data connector. leave it disconnected? combine all the power wires together? combine with diodes so there isn't any back-feeding?

if it were just a matter of supplying power to the dongle, you'd connect the grounds together but only connect the +5 from the power source, and connect the D+ and D- from the host (pi).

unfortunately, usb power isn't as simple as that, because to support powered and unpowered hubs the device has to negotiate for power with what its plugged into, so if the data signals are connected to something that will only support 100ma, as if it were an unpowered hub, the device won't be able to negotiate more even though your hacked power supply will provide more current (a powered device can supply up to 500ma). the pi has to act like an unpowered hub because if you are powering it thru the usb host port it can't draw more than 500ma

a cheap powered hub is probably yoru best shot

if you can get a powered hub though i think you can connect the input usb on the pi to the usb hub just to get power if it has enough ports, so you only need one ps.

Corla Plankun
May 8, 2007

improve the lives of everyone
do devices really negotiate for power over the bus or is that just a weird way of explaining I=V/R

Sagebrush
Feb 26, 2012

no, they really negotiate for power. the device isn't supposed to draw more than 100ma at any time unless it has communicated with the host and gotten a response that says "it's ok to draw more" at which point it may switch on its higher power features. standard high-power is 500ma but now i think some of the specs allow up to 2a for fast charging phones and so on.

generally if the device draws more than it's qualified for -- something you can easily do if you have say a usb-powered microcontroller like an arduino and you start running motors or solenoids off it -- the usb host will selectively disable the port to prevent damage. hopefully.

Base Emitter
Apr 1, 2012

?

Corla Plankun posted:

do devices really negotiate for power over the bus or is that just a weird way of explaining I=V/R

they're supposed to negotiate

if you have a powered hub, each device can draw up to 500ma. if you have an unpowered hub, though, and that's powered by a usb host, then the hub plus everything plugged into it can only draw 500ma total (without violating the specifcation, anyway). the usb standard defines 100ma as the "starting" current you're allowed to draw, then you ask for more, so that you can have a 4-port unpowered hub without going over 500ma from the host.

of course not every host/hub/device plays nice but that's how its supposed to work

chargers are a different deal: the device detects that d+ and d- are shorted together, and that allows the device to draw up to 1A (or 1.2A? i can't remember). to get more than that (for say tablets) different manufacturers use other tricks on the d+/d- signals. apple chargers have resistor voltage dividers on those signals so an ipad can sense its plugged into an apple charger by sensing the analog voltage.

Bloody
Mar 3, 2013

Mathhole posted:

next make a markov image generator using okcupid profiles pics to train the model.

its weird because this thought occurred to me but sounded pretty :effort:

quadpus
May 15, 2004

aaag sheets
ugh this is why standardizing on usb power is so dumb.
so what do passive phone chargers do so that the phone knows its ok to draw more power?

Sagebrush
Feb 26, 2012

as base emitter says, cheap chargers just have the two data lines shorted together, and the device is supposed to read the continuity across them and recognize that it's a charger. apple chargers add a pair of resistors to the data lines instead, forming a voltage divider, so that apple products know not to mingle with inferior non-apple electrical supplies

Base Emitter
Apr 1, 2012

?

Sagebrush posted:

as base emitter says, cheap chargers just have the two data lines shorted together, and the device is supposed to read the continuity across them and recognize that it's a charger. apple chargers add a pair of resistors to the data lines instead, forming a voltage divider, so that apple products know not to mingle with inferior non-apple electrical supplies

drat you youre too fast

quadpus
May 15, 2004

aaag sheets
oh right. i skimmed that too fast

anyway i found a usb hub from 2006! it's USB 1.1, and it has a power port, but no supply to go with it. I found a 5V 2.4A power supply and hacked the correct connector onto it, and it looks like I have a working powered hub!

since that's working well enough for now, i only have to deal with your everyday linux wireless problems!

it didn't work on first try. dmesg says i'm missing firmware.
googled the driver name (carl9170) found the firmware, and copied it to /lib/firmware.

now i'm in business!

quadpus fucked around with this message at 07:09 on Dec 31, 2013

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!
yo i got this arduino uno for christmas and I'm thinking I want to build a robot with optional control from my iPad or some other OSC/serial poo poo. thanx to my job I can easily get little bits of scrap aluminum and wood, sometimes even mechanical parts. thoughts? tia

Doc Block
Apr 15, 2003
Fun Shoe
you can get wifi "shields" to add onto your arduino, so your ipad can potentially communicate with the arduino over wifi.

Shaggar
Apr 26, 2006
why would you shield the wifi? wouldn't that make it pointless?

Sagebrush
Feb 26, 2012

yeh you'll need the wifi shield. iirc the wifi shield libraries let you screw around with tcp and udp packets directly so if you know something about networking that's probably the best way to go. you'll have to program the ipad app of course as well.

if you want the easiest way of running little dc motors without blowing out the controller, the little $5 guys at the bottom of this pololu page are probably the b est http://www.pololu.com/category/11/brushed-dc-motor-drivers

if you need more power go up to hobby rc brushless motors and the simple speed controllers they sell on hobbyking. talk to them with the arduino servo library.

you can also roll your own pretty easily but eh running a simple tank-drive bot for $10 seems ok to me.

Shaggar posted:

why would you shield the wifi? wouldn't that make it pointless?

oh, you

if this post isn't sarcastic, a "shield" is a carrier board that sticks on top of the arduino and adds functionality while bringing the data pins up

Fanged Lawn Wormy
Jan 4, 2008

SQUEAK! SQUEAK! SQUEAK!

Sagebrush posted:

yeh you'll need the wifi shield. iirc the wifi shield libraries let you screw around with tcp and udp packets directly so if you know something about networking that's probably the best way to go. you'll have to program the ipad app of course as well.

thnx for all that. I was going to use the TouchOSC app for iPad (http://hexler.net/software/touchosc) since I had done some poo poo with it trying to build a control panel for a DAW, and really liked the look/ease of use. That, or the c74 app, and build it in MaxMSP, since I know that pretty ok too. the hardest part imo is going to be coding the bot itself.

Sagebrush
Feb 26, 2012

well, luckily coding the robot itself is super easy, if you use motor controllers that read normal servo commands it's like

motorleft.write(100);

to make the motor spin. really dumbly simple

NoneMoreNegative
Jul 20, 2000
GOTH FASCISTIC
PAIN
MASTER




shit wizard dad

Doc Block
Apr 15, 2003
Fun Shoe

Nice!

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
O(n lg n) voronoi diagrams onna sphere



with this done i can adapt my climate model to use a) whatever mesh i want b) a multigrid solver :toot:

coffeetable fucked around with this message at 20:26 on Jan 3, 2014

01011001
Dec 26, 2012

Sagebrush posted:

well, luckily coding the robot itself is super easy, if you use motor controllers that read normal servo commands it's like

motorleft.write(100);

to make the motor spin. really dumbly simple

yeah the arduino is dead simple for servo/motor control, just make sure youve got everything hooked up correctly power-wise because a lot of people gently caress that up

ps connect your fuckin grounds

GameCube
Nov 21, 2006

power is hard :[

Doc Block
Apr 15, 2003
Fun Shoe


Building a little temperature logging thing. The actual thing won't use an Arduino, the one in the pic is just for testing. It's also gonna use this clock IC that I've got and a 16x2 LCD.

Can't decide what I should save the data to. The ATmega328 MCU has 1K internal EEPROM, and I've got a couple of 32K serial EEPROMs laying around. Both of those would make saving the data easy, and the 32K serial EEPROM doesn't need much beyond just hooking it up to the MCU's I2C bus, but I'm not sure how I'd get the data back out. I could save the data to an SD card instead of an EEPROM, but then I'd need a decent amount of extra logic since SD cards run at 3.3V and the rest of my project is using 5V. Plus I'd have a lot more code to write (the actual code is gonna be C, so using the Arduino SD card/FAT library is out).

Temperature readings seem ballpark accurate (haven't verified with an actual thermometer yet) and stable, at least.

Mathhole
Jun 2, 2011

rot in hell, wonderbread.

coffeetable posted:

O(n lg n) voronoi diagrams onna sphere



with this done i can adapt my climate model to use a) whatever mesh i want b) a multigrid solver :toot:

do you use great circles for your edges?

Mathhole
Jun 2, 2011

rot in hell, wonderbread.
i guess it probably doesn't matter because youre just going to integrate over the area anyway

Bloody
Mar 3, 2013

Doc Block posted:



Building a little temperature logging thing. The actual thing won't use an Arduino, the one in the pic is just for testing. It's also gonna use this clock IC that I've got and a 16x2 LCD.

Can't decide what I should save the data to. The ATmega328 MCU has 1K internal EEPROM, and I've got a couple of 32K serial EEPROMs laying around. Both of those would make saving the data easy, and the 32K serial EEPROM doesn't need much beyond just hooking it up to the MCU's I2C bus, but I'm not sure how I'd get the data back out. I could save the data to an SD card instead of an EEPROM, but then I'd need a decent amount of extra logic since SD cards run at 3.3V and the rest of my project is using 5V. Plus I'd have a lot more code to write (the actual code is gonna be C, so using the Arduino SD card/FAT library is out).

Temperature readings seem ballpark accurate (haven't verified with an actual thermometer yet) and stable, at least.



whatever you do don't use an sd card they're a loving pain in the dick to use

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Mathhole posted:

do you use great circles for your edges?

the edges are segments of great circles, yeah. the beachline is formed by spherical ellipses, w/ one focus at the site and the other at the north pole

e: here's the paper, though i adapted it heavily to avoid using any trig or a prime meridian

coffeetable fucked around with this message at 20:54 on Jan 3, 2014

Corla Plankun
May 8, 2007

improve the lives of everyone

coffeetable posted:

to avoid using any trig

why would you avoid trig when you're doing spherestuff

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Bloody posted:

whatever you do don't use an sd card they're a loving pain in the dick to use

nah sd is cool use all the sds

Bloody
Mar 3, 2013

peepsalot posted:

nah sd is cool use all the sds

incorrect

Bloody
Mar 3, 2013

then again every time i get to use sd cards its through bespoke artisanal embedded HALs or bespoke artisanal hardware-level controllers that are held together by baling wire and spit

one of those hardware-level controllers invented a new form of byte-endianness that i call middle-endian

it's where you take the nibbles of a byte AB and write them BA.

:psypop:

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



wth trig is a good poster dont avoid

Doc Block
Apr 15, 2003
Fun Shoe

Bloody posted:

whatever you do don't use an sd card they're a loving pain in the dick to use

if i do i'll probably just buy an SD reader breakout board from adafruit, since they have the 3.3V regulator and 3.3V-5V logic level converter right on the board and use SMD components so they're smaller than if I made one myself.

Doc Block fucked around with this message at 21:09 on Jan 3, 2014

GameCube
Nov 21, 2006

Bloody posted:

then again every time i get to use sd cards its through bespoke artisanal embedded HALs or bespoke artisanal hardware-level controllers that are held together by baling wire and spit

one of those hardware-level controllers invented a new form of byte-endianness that i call middle-endian

it's where you take the nibbles of a byte AB and write them BA.

:psypop:

well yeah there ya go. use an ~sd shield~ problem solved (and BOM quadrupled, at least)

Bloody
Mar 3, 2013

but but but you could cram an SD driver and FAT32 file system into your msp430 with a whopping five hundred and twelve bytes of ram and then

GameCube
Nov 21, 2006

i still have an msp430 sitting in its box that i picked up like two years ago when they were doing that $4.30 thing and i've done nothing with it. probably because the dev tools looked like poo poo

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Bloody posted:

but but but you could cram an SD driver and FAT32 file system into your msp430 with a whopping five hundred and twelve bytes of ram and then

nah dont bother with fat32 just use block device

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

peepsalot posted:

nah dont bother with fat32 just use block device

im just sharing traumatic past work experience dont worry thats what we wound up doing after the file system performance was unsurprisingly lackluster

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply