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
Doc Block
Apr 15, 2003
Fun Shoe
dunno if I have any shift-out registers jonny. It's been a long time since I looked at the data sheet for the LCD, so I'll see what can be done re: cutting down pin count.

I've got an ATmega32U4 coming in the mail along with some other misc parts. IIRC it has more I/O pins than an ATmega328. Would really like to just run this on a '328 and save the 32u4 for another project, though.

Decisions decisions...

Adbot
ADBOT LOVES YOU

NoneMoreNegative
Jul 20, 2000
GOTH FASCISTIC
PAIN
MASTER




shit wizard dad

aag radscorpions

Doc Block
Apr 15, 2003
Fun Shoe
Nice!

Doc Block
Apr 15, 2003
Fun Shoe
re: my beer fermentation temp logger, I've had a much better idea.

Gonna use the ATmega32U4 that's in the mail to run the whole thing, and since the 32u4 does USB I can have it act as a serial device when plugged into a computer, and accept commands over a virtual serial port. That'll let me eliminate the need for buttons to set the date & time on the device. It also means I can ditch the SD card and instead save the temperature data to a 32Kbyte I2C EEPROM that I've got, and then just barf that back out over the USB virtual serial port when commanded to.

Should let me get back down to one MCU. :w00t:

Doc Block fucked around with this message at 03:05 on Jan 7, 2014

GameCube
Nov 21, 2006

just stick an antenna on it and set time w/ the atomic clock problem solved

Sagebrush
Feb 26, 2012

so now i'm making a sound-reactive thing for my bike lights. but i have to prototype it in software first



never really done any sound analysis stuff before so this is interesting. i really doubt that the teensy has enough power left over to run a real-time fft as well as bang out 96 separate 24 bit leds at 30hz, so i think i'm going to add a bluetooth modem (these are like $3 from ebay china, great) and run the fft on an app on my phone. makes the most sense also since that way it's a hell of a lot easier to handle the microphone and/or mp3 reading or whatever -- no need to reinvent the wheel with the electronics. microphone is going to be kind of a pain because of the fft lag and bluetooth lag tho, so i'm going to start with just playing mp3s and having a variable delay that u can dial in to synchronize the lights with the music.

then i just need to stick a motorcycle battery on the back and a couple of decent speakers and i can start a rolling rave at critical mass. i have never been to a rave before in my life.

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

Sagebrush posted:

so now i'm making a sound-reactive thing for my bike lights. but i have to prototype it in software first



never really done any sound analysis stuff before so this is interesting. i really doubt that the teensy has enough power left over to run a real-time fft as well as bang out 96 separate 24 bit leds at 30hz, so i think i'm going to add a bluetooth modem (these are like $3 from ebay china, great) and run the fft on an app on my phone. makes the most sense also since that way it's a hell of a lot easier to handle the microphone and/or mp3 reading or whatever -- no need to reinvent the wheel with the electronics. microphone is going to be kind of a pain because of the fft lag and bluetooth lag tho, so i'm going to start with just playing mp3s and having a variable delay that u can dial in to synchronize the lights with the music.

then i just need to stick a motorcycle battery on the back and a couple of decent speakers and i can start a rolling rave at critical mass. i have never been to a rave before in my life.
you can do fft on avr pretty well apparently
https://www.youtube.com/watch?v=HTRjjKfaV00
and if you have teensy 3, then thats even more powerful. sending 69kbit/s for leds is not that much

Sagebrush
Feb 26, 2012

yeah, i've seen a few of the arduino/avr ffts and generally they are really impressive but it really does chew up a lot of cpu time. if you have a 16mhz chip most of those demos are running it flat out. i might save some time in my code if i rewrote some of it to be smart with bitwise math but right now, to do some basic processing of colors programmatically and then drive the whole string i can only hit about 50-60hz before it noticeably doesn't get any faster. this is consistent with what other people have reported too

and it's a teensy 2.0...i couldn't run the neopixels off a 3 because it's an arm core and the library requires an avr. i mean i could rewrite the whole library myself to run on an arm, i guess but that seems like a version 3 or 4 project, i'm only on about 1.1 right now

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
possibly stupid question: could you use a circuit/FPGA to compute the fourier transform for whatever points you need?

peepsalot
Apr 24, 2007

        PEEP THIS...
           BITCH!

process it all in analog bandpass filters

Sagebrush
Feb 26, 2012

fpga, definitely. overkill though. analog circuit...maybe? i'm not super great with that kind of analog voodoo. though you could also use some kind of filter network i guess?

i have it divided into 48 averaged bins though so any analog system of equivalent functionality would be pretty complex

peepsalot posted:

process it all in analog bandpass filters

exactly, feeble minds think alike

Sagebrush fucked around with this message at 02:02 on Jan 10, 2014

Bloody
Mar 3, 2013

fpgas aren't overkill just get a small one and then kill yourself because now you have to write vhdl or verilog and use some hideous development toolchain

itll do ffts good though

Usagi-Sauce
Dec 2, 2005

YAMOxNINJA
~otp~
current getting a 3d printer working at the hackerspace status: the mendel belongs to someone who hasn't been around in a while so there's no loving with it until he shows up. played with the cupcake a little, it's 100% stock, i managed to get the extruder running for long enough to print the first layer of a 15x15mm raft before it jammed.

i guess "upgrade extruder" is at the top of my istp list now.

minor projects completed: i replaced the 3.5mm jack on my nephew's headphones and did an incredibly ugly job for which i am completely unapologetic because that kid needs to take better care of his stuff before i bother my nuts with aesthetics.

i found a scrap of 1/2" pvc pipe i'd forgotten about so i'm making another flute, i fuckin' love flutes

Corla Plankun
May 8, 2007

improve the lives of everyone
IIR bandpass filters are probably the easiest way to do frequency responsive stuff

fft would be a waste unless you want like a million freqbands at once

Usagi-Sauce
Dec 2, 2005

YAMOxNINJA
~otp~

Corla Plankun posted:

IIR bandpass filters are probably the easiest way to do frequency responsive stuff

fft would be a waste unless you want like a million freqbands at once

48, so yeah basically a million

unixbeard
Dec 29, 2004

made this for nye, it uses a kinect to get depth, opencv to find blob and is mildly audio reactive. All done in openframeworks

https://vimeo.com/83001696

Sagebrush
Feb 26, 2012

sweet, what did you do with it? project on a wall or smth? i feel like it woudl be kind of lost on anything less than a 105 inch curved uhd tv

unixbeard
Dec 29, 2004

Yeah the place where the party was at has a projector but it kinda gets in peoples eyes, so it ran on this massive tv screen.

cowboy beepboop
Feb 24, 2001

Bloody posted:

fpgas aren't overkill just get a small one and then kill yourself because now you have to write vhdl or verilog and use some hideous development toolchain

itll do ffts good though

xilinx :allears:

quadpus
May 15, 2004

aaag sheets
I'm trying to run one of these VFDs:
http://noritake-vfd.com/cu20045-uw5a.aspx
with my raspberry pi.

I found this guy's code for a different VFD with extremely similar specs:
https://github.com/thisoldgeek/RPi_SPI_VFD

can anyone tell me if that should work? right now all I get is a single exclamation point when I run it.

not much, but kinda exciting nonetheless!


These should be the specs for the two different VFDs
https://drive.google.com/file/d/0B8jaVqjrPHhjdUxlWUY0WmxEdG8/edit?usp=sharing
https://drive.google.com/file/d/0B8jaVqjrPHhjN3Q2ZXUzV1hIRFE/edit?usp=sharing

also, i hope I'm hooking it up correctly.
i've got JP13 shorted to enable serial mode.
code:
VFD CN3--RPI GPIO   
VCC   1--2  5V
SI/SO 2--19 MOSI
GND   3--6  GND
STB   4--24 CE0   
SCK   5--23 SCKL
NC    6--

quadpus fucked around with this message at 03:37 on Jan 12, 2014

Sweevo
Nov 8, 2007

i sometimes throw cables away

i mean straight into the bin without spending 10+ years in the box of might-come-in-handy-someday first

im a fucking monster

Doc Block posted:

Ugh. Looks like I'm gonna have to use two MCUs for my stupid beer temperature logger thing.

The 16x2 LCD I want to use needs 11 pins, plus I need 4 for reading/writing an SD card, another pin for SD card detection, 2 more for talking to the real-time clock (via I2C), an analog pin for reading the temp sensor, a pin for controlling LCD power (via transistor, probably), a pin for reading the LCD power on/off switch, and pins to check other buttons (for setting the time, date, view highest/lowest temp, etc.).

All the input buttons can be connected through a shift register, but that's still way more pins than one ATmega328 has. I've got an old ATmega168 that I can use to drive the LCD, so it isn't quite as wasteful as two ATmega328s, but still...

you can read multiple digital inputs/switches with one pin if you connect the inputs through a resistor ladder to an a/d pin. you can easily get 6 inputs on one pin

Doc Block
Apr 15, 2003
Fun Shoe
Actually I'm gonna try using a shift register for controlling the LCD, and use a serial EEPROM for saving the data so I don't need the 4-5 pins for writing to an SD card (the EEPROM does I2C, which I'm already using for talking to the RTC, so it doesn't cost any extra pins).

The MCU is an ATmega32U4, which can do USB, so it'll just barf out the data and set the date/time on the RTC when plugged into a PC. I just need to design a circuit that will cut off external power when drawing power from USB. A plain ol' PNP transistor on the positive rail should do the trick, right?

Doc Block
Apr 15, 2003
Fun Shoe
For non-computer/electronics/technology idiot spare time projects, I'm making my first batch of home brewed beer. Bottled it earlier today, and now it's carbonating. Hope it doesn't taste like poo poo. :w00t:

syscall girl
Nov 7, 2009

by FactsAreUseless
Fun Shoe

Doc Block posted:

For non-computer/electronics/technology idiot spare time projects, I'm making my first batch of home brewed beer. Bottled it earlier today, and now it's carbonating. Hope it doesn't taste like poo poo. :w00t:

the earliest known recipe for beer had poo poo in it so whatever else you've done you can probably call it progress

quadpus
May 15, 2004

aaag sheets


Well I got this thing working!
I guess the main problem was that the code I found writes the text all as a constant stream of bytes, but my VFD doesn't seem to support that. I gotta send them one at a time, including the start byte each time. I don't even see that feature being available in the docs for that samsung VFD so I wonder if it ever worked.

Sagebrush
Feb 26, 2012

Sweevo posted:

you can read multiple digital inputs/switches with one pin if you connect the inputs through a resistor ladder to an a/d pin. you can easily get 6 inputs on one pin

yep. here is an example of a guy reading four buttons on a single pin, if you need something concrete (i would)
http://hackaday.com/2014/01/10/a-business-card-that-plays-simon-says/#more-111983

quadpus
May 15, 2004

aaag sheets
btw here's the link for my VFD again: http://noritake-vfd.com/cu20045-uw5a.aspx $18 seems really cheap to me, and it does serial i/o as well as being HD44780 compatible so I highly recommend it!

Doc Block
Apr 15, 2003
Fun Shoe

Sagebrush posted:

yep. here is an example of a guy reading four buttons on a single pin, if you need something concrete (i would)
http://hackaday.com/2014/01/10/a-business-card-that-plays-simon-says/#more-111983

That's p cool, but the only input button I have now is the "power" button for the LCD, which in reality just wakes up the MCU and tells it to turn on the LCD and start PWM'ing the LCD backlight (and display the current temperature, as well as high/low temps).

spankmeister
Jun 15, 2008






quadpus posted:

btw here's the link for my VFD again: http://noritake-vfd.com/cu20045-uw5a.aspx $18 seems really cheap to me, and it does serial i/o as well as being HD44780 compatible so I highly recommend it!

that's p cheap

i wanted to order one (plus a 2x20) but they won't ship outside of the us and canada :argh:

EIDE Van Hagar
Dec 8, 2000

Beep Boop

Bloody posted:

fpgas aren't overkill just get a small one and then kill yourself because now you have to write vhdl or verilog and use some hideous development toolchain

itll do ffts good though

verilog is gods own language

lol if your babby high level language cant specify what happens at each clock, thats barely even computering imo

Mathhole
Jun 2, 2011

rot in hell, wonderbread.

kwinkles posted:

verilog is gods own language

lol if your babby high level language cant specify what happens at each clock, thats barely even computering imo

going from cpu code to gpu code was awesome. you have to write so much closer to the hardware. i imagine going to an fpga is like that times 10.

NoneMoreNegative
Jul 20, 2000
GOTH FASCISTIC
PAIN
MASTER




shit wizard dad



Ia! Ia! I shouldn't have had that Cthurry! :cthulhu:

Notorious b.s.d.
Jan 25, 2003

by Reene

Mathhole posted:

going from cpu code to gpu code was awesome. you have to write so much closer to the hardware. i imagine going to an fpga is like that times 10.

in vhdl you are specifying the hardware

Doc Block
Apr 15, 2003
Fun Shoe


edit, context: finally got some more time to work on my beer fermentation temperature logger. was having a bitch of a time getting this loving LCD to work with my ATmega32U4. took the same LCD code, flashed it onto an arduino with my little USB programmer, and it works flawlessly. either the m32u4 board's power supply doesn't supply enough juice to run the LCD (backlight lights up fine, though), or the m32u4 is fried (it's a surface-mount part, and I might've applied too much heat when I soldered some header pins to the little PCB it's on to make it breadboard-able).

Doc Block fucked around with this message at 23:42 on Jan 18, 2014

jony ive aces
Jun 14, 2012

designer of the lomarf car


Buglord
cool now make it say "winter yospos" and put it in ur sig or w/e

bring back old gbs
Feb 28, 2007

by LITERALLY AN ADMIN
finally completed my thesis project:

GameCube
Nov 21, 2006

today i remembered that there's a project.log forum :wth:

Sagebrush
Feb 26, 2012

Werthog 95 posted:

today i remembered that there's a project.log forum :wth:

what, seriously? or do you mean diy?

GOT VIRUS FROM MP3 posted:

finally completed my thesis project:



i'm not sure what to say

GameCube
Nov 21, 2006

Sagebrush posted:

what, seriously? or do you mean diy?

can't see it in the forums list but here it is http://forums.somethingawful.com/forumdisplay.php?forumid=265 and it's apparently still active

Adbot
ADBOT LOVES YOU

Arcsech
Aug 5, 2008

Sagebrush posted:

what, seriously? or do you mean diy?

its a subforum of coc: http://forums.somethingawful.com/forumdisplay.php?forumid=265

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