wayoutwest has added a photo to the pool:
wayoutwest has added a photo to the pool:
AttachmentSize hds-dorkbotpdx.png247.2 KB
I purchased a cheap USB power pack, thinking it would be ideal for powering small projects. But it automatically shuts off if the device isn't drawing a lot of power, since it's meant for charging cell phones.
Here's a 2 transistor circuit I built this morning that keeps it on with very little battery drain by using brief pulses.
Click "Read more" for the schematic, design details, and a PCB.....
I wish I would have thought of this idea, but it came from this forum post by "Jp3141". The battery pack automatically turns off if it doesn't see a high current draw. But drawing a high current for only a breif time is enough to keep its internal timer going.
First, I did some experimenting and found a 22 ohm resistor keeps the power on indefinitely. A 27 ohm resistor kept it on for 19 seconds. With no load, it stays on for only 13 seconds. So a 22 ohm load it is!
Just connecting a 22 ohm resistor to the 5 volt power is a pretty heavy load that would drain the battery. A 22 ohm resistor also burns about 1.1 watts, so it gets HOT. But the load doesn't need to be on most of the time. The next step was connecting a Teensy and transistor circuit to turn on the load under software control.
Here the 5V pin drives a LED in series with a NPN base-emitter junction, to apply about 2.3 volts to a 10 ohm resistor. Of course, the NPN transistor has high current gain, so most of the 230 mA that flows through the 10 ohm resistor comes from the battery through the collector.
A little experimenting determined pretty quickly that pulses in the 8 to 10 ms range usually keep the battery pack on, but it sometimes turns off after a couple minutes. 20 ms seems very stable.
Knowing 20 ms is needed, I switched from using the Teensy++ to this simple 2 transistor oscillator:
A quick napkin calculation seemed to suggest this would need a really large capacitor. But with a little fiddling, it turned out 22 uF was enough. This circuit creates a pulse slight over 20 ms appoximately every 1.4 seconds.
Here's another close-up of the circuit on the breadboard. Just 2 transistors, 1 capacitor, and 2 resistors.
I let this run for about half an hour, with the battery pack happily remaining on the whole time.
The average battery current is approx 3.5 mA.
While the transitors are on, the current is approx 222 mA (4.9V on 22 ohms). But the duty cycle is about 1.6%.
Of course, inside the pack, a switching power supply is running to step up the batteries from 3.7 to 5 volts, and it's powering those 4 blue LEDs. The internal stuff inside the pack probably wastes a lot more than only 3.5 mA.
Of course, then I did a quick PCB layout. I added a switch in series with the 100K resistor, so it can be left plugged in and turned off to allow the battery pack to shut itself off. It's a tiny board, only about the size of the USB connector itself.
I sent the files in to OSH Park. Here's their preview.
Here's the board on their site, if anyone else wants to build this:
The 5 parts are on the bottom side of the PCB. Here's a placement diagram:
Here's a list of part numbers:
1276-5649-1-ND 22 ohm resistor, 1/4 watt
490-1719-1-ND 22 uF capacitor, X5R, 6.3V
RMCF0603FT100KCT-ND 100K resistor
MMBT2222A-FDICT-ND NPN Transistor
MMBT3906-FDICT-ND PNP Transistor
WM17118-ND USB Connector
If you need to tune the timing for a different battery pack, increasing the capacitor makes the pulse wider and lengthens the time between pulses. Decreasing the 100K resistor makes the pulse occur more frequently, without changing the width of the pulse.
EDIT: my battery pack turned off a couple times times after many minutes. I increased the capacitor to 47 uF and it ran for an hour. 22 uF might be a little on the low side? If you build this circuit, a little tweaking on the capacitor or resistor values might be needed if your battery pack is different.
In a recent forum conversation, it was suggested my Encoder library has only been tested with rotary knobs and "lab" signals, not a high-res encoder turned by a motor, implying it might not work "in the real world". So I build this little test board and made a quick YouTube video!
There's an artsy dude who got his Kickstarter mentioned on boingboing. The project is a little mechanical counter with some smarts built in: every time you press a button, it computes and displays the next prime number. It's $120.
I had a couple of 6-digit counters that I got from Surplus Gizmos, so I thought this would be a fun afternoon project. It's almost like getting $120, except you can't spend it.
The video is an iPhone movie of my version computing primes from 137 to 167. During the development (ha! "Development!") I counted the number of primes between 2 and 1000000. There are 78,498 of them (first is 2, last is 999,983) and the largest gap between primes is 114, between 492,113 and 492,227. Just in case you're wondering.
The Teensy2 is overkill for this: the code is only 334 words (I think), and I have some ATtiny13s with 1K of Flash that would be perfect for this project. I just have to ressurect my Teensy-based ATtiny programmer...AttachmentSize prime.mp4_.gz1.61 MB
xnorman has added a photo to the pool:
What a mess, almost done thought!
Over the last couple weeks I've been working on supporting quality audio (44.1 kHz, 16 bit) on Teensy3 using very simple Arduino style programming. This weekend I added buttons and knobs to control parameters....
This work is still at an early stage. I hope to publish a first alpha test version in about 1 month...
Edit: just a bit more info: The library manipulates audio with a collection of input, synthesis, processing and output objects that can be connected together in almost any way. Audio connection objects automatically move the 16 bit data and run the synthesis and processing algorithms in the background, so the user's sketch isn't burdened with high bandwidth, real-time data manipulation. The objects provide functions that can modify their behavior (volume, oscillator frequency, note on/off, modulation, etc) which can be used with extremely simple Arduino-style sketches, because the objects automatically handle all high speed data computation and movement in the background, triggered by interrupts and DMA transfers.
Designing a sytem to make excellent quality audio on Arduino with powerful features but also extremely easy has definitely turned out to be quite a challenge. I'm still redesning the connection object's base class. Much work remains, but now with I2S and PWM output working, .wav file playing and DDS sine wave generation all working, it really feels like it's starting to come together. I hope to have the API stable enough (stable = unlikely to incompatibly change) for a first releast by October.
xnorman has added a photo to the pool:
Already getting dirty
This weekend I'm performing sound for a dance piece Light Noise that I've been working on for over a year. For the past year+ I've been refining a set of patches in Pure Data (PD) that I use to create conceptual sound and music for this piece.I'm doing all of my sound generation, synthesis, and manipulation in realtime using PD and a midi controller. My PD patch outputs 4 channel sound, to 4 speakers I installed around the dance floor I built yesterday at Disjecta. I've attached a PD abstraction to this post. In terms of input hardware, I've gone through several different control iterations. I'm now using a Keith Mcmillan Quneo for live input into PD. This gives me a pretty rich set of sensors that send USB midi into Pure-Data. The Quneo's standard, built-in visual feedback is nice, which saves me programming time. Additionally it has firmware level paging (bank buttons toggle all the sensors through several sets of midi CC's and note numbers). I also use a Livid OhmRGB for other projects - but with the Livid, I end up spending a lot of time programming the RGB leds to give me useful visual maps, and programming paging/banking functionality in PD itself. Limiting myself to the Quneo's default visual behavior frees me up to spend more time working on sound. For Light Noise, I'm using subtractive synthesis, granular synthesis, and sample manipulation. I thought it might be interesting to detail the subtractive synthesis techniques I'm using for this blog entry. Lately I've been inspired by a philosophical approach to subtractive synthesis that was pioneered by Serge Tcherepnin in the late 70s. The subtractive synthesis part of my patch uses an abstraction I made - based around this approach. I'm attaching the abstraction - but it needs a little explanation. Read on if you're interested: First a tiny bit of history - Serge Tcherepnin built analog modular synthesizers in kit form for students who interested in building their own synths who couldn't necessarily afford the more expensive systems offered by Buchla and Moog. Currently Serge systems are still available for DIY builders via PCBs made available from Ken Stone, in partnership with Tcherepnin. I have a Ken Stone DIY synth panel in progress on my work bench right now. In addition to the more typical/classical synthesizer building blocks (VCO, VCF, ENV, VCA), a typical Serge system includes an assortment of lower level synthesis blocks - voltage controlled slopes. These come in a variety of forms - here are some you can build: DUSG, VCS, NEG AND POS SLEW. Basically these modules take a trigger input, and in turn generate a voltage ramp up, followed by a voltage ramp down, followed by an analog pulse/trigger. With manual and CV control over the up and down times, you have a versatile one shot envelope generator for controlling another module. By patching the trigger output, back to the module input, you have a looping envelope - an LFO. You can then vary the period, and shape of the lfo with those two slope controls. The range is quite wide on these controls, and the module easily moves into audio range - at which point you have a versatile VCO with voltage controllable wave shape. The applications for a voltage controllable slope don't stop there - it is an incredibly versatile function block. I recommend this page for an excellent description of the module and it's possiblities. For Light Noise, there is a small section of the piece where I wanted to reference the sound world of the early west-coast electronic music concrete pioneers. (Think Morton Subotnick, Pauline Oliveros, and Ramon Sender) Since my hardware Serge isn't compelete yet, I made the attached PD abstraction, and a pretty simple control scheme. I set up 4 of these absractions, patched them into each other for modulation potential, and setup a bunch of presets using message boxes. I can play 'presets' from my Quneo, in way similar to a performance using a Serge or Buchla touchplate keyboard. These touchplates were classically considered to be more analogous to Music Concrete tape loops - than to a piano (or Moog) keyboard. Subotnick explains the touch plate keyboard in this video at 5:39. Each plate triggers a bank of knobs that send voltages to various modules - similar to my preset message boxes - that send values to sliders on my slope abstraction. For the PD nerds - my abstraction initially used vline~ as it's (very simple) core. But xnor fixed it up for me with expr~ instead - leaving it possible to use it as an audio processor w/out any array writing nightmares. Watch this space for audio (and possibly video) soon. But in the meantime - have a listen to the attached abstraction! Come hear/see it in action this weekend! AttachmentSize usg_e~.pd5.53 KB
We're excited to be hosting for Wendy and Mikey on (book) tour about
their unique, modern technological homesteading life!
And yes, it's taken most of a year to arrange, but we'll finally get a
When: Monday June 17th, 2013 - 8pm
Where: Backspace (115 NW 5th Ave)
Who: All ages -- open to the public
------------------------------ ------------------------------ -----------
In addition to having Glenn Phillips and also the Church of Robotron as
presenters, we will host an OpenDork session. This is an open-mic time
block where anybody may take the stage to talk about project or show a
When: March 25th, 2013 - 8pm
Where: Backspace ([link])
Who: All ages -- open to the public
Self Balancing Robots 101
Glenn's presentation will cover the basics of self balancing robots:
Sorry I'm late getting this out to the lists...I generally try and give
people a little more time to make arrangements, so sorry!
Tomorrow's meeting (Feb. 11th) will be held at Someday Lounge and
Backspace will be hosting a music event.
This is a casual meeting (no "formal" performances/presentations), but