DorkbotPDX

Power Playground Project

Dorkbotpdx.org - Sat, 2015-02-14 09:54


Power Playground

Here's a few pictures of my latest project: "Power Playground."  It's a PMOS/NMOS H-Bridge with FETs that can handle 3 amps or so, plus a SPI current sensor, some switches & a rotary encoder (not stuffed yet), and a 7-segment display, all controlled by a Teensy-3.1 running FreeRTOS.

I made this because I'm always running into battery, power, inductor and transformer issues I don't have any experience with.  The idea is to use the H-bridge configuration and current sensors to experiment with moderate-current PWM, motor control, power-line synchronization, battery charging and discharging, etc.

The positive rails of the left & right half-bridges are separated so that I can run an experiment I've been wondering about: can you transfer charge from a battery at one voltage to a battery at a different voltage using an inductor and some smart commutation?  I think you can, but you never really know until you do it, right?

AttachmentSize Schematic72.97 KB PCB198.18 KB
Categories: DorkbotPDX, dorkbotpdx.org

[dorkbotpdx-announce] DorkbotPDX Code of Conduct

dorkbotpdx-announce - Wed, 2015-02-11 01:52
After about 8 years of disorganization, DorkbotPDX is (finally) adopting a citizen code of conduct: http://dorkbotpdx.org/code_of_conduct We're fortunate that member conduct has, for the most part, been a self-regulating non-issue. Our code of conduct is intended to establish broad behavior
Categories: DorkbotPDX, Mailing Lists

DorkbotPDX Code of Conduct

Dorkbotpdx.org - Mon, 2015-02-09 00:24
DorkbotPDX Code of Conduct


DorkbotPDX is committed to providing a socially safe and friendly environment for people doing strange things with electricity.  We welcome all, regardless of techical experience, gender, sexual orientation/identity, age, ability, ethnicity, religion, or physical/biological cybernetics.

DorkbotPDX expects attendees to be:

  • respectful - Don't seek to irritate, annoy, or otherwise disrupt others.
  • cautiously helpful - Share what you know, but don't assume you know more than someone else.
  • engaged - If you're curious and wondering, just ask.  If you're asked, try to answer or brainstorm.

Because we wish to foster an open, diverse, and engaged community, DorkbotPDX does not tolerate discrimination or harassment.  We are particularly sensitive to discrimination against and harassment of socially marginalized groups.

Any person in violation of these guidelines may be warned or asked to leave.  If you are aware of any behavior in violation of these guidelines, please notify a DorkbotPDX organizer.

Categories: DorkbotPDX, dorkbotpdx.org

Art and tech events this week!

Dorkbotpdx.org - Wed, 2015-02-04 16:54

We are extremely lucky this week to have THREE art/tech events happening here in Portland featuring artwork from some of our favorite creative coders. Have fun and support your art/tech community by coming out for these events! The first two are part of First Thursday and you can easily walk between them.

Dungeon Hacker at DIODE Gallery Thursday Feb 5 6PM-9PM 514 NW Couch Featuring Dan Cohen, Ryan Johnson, Andy Lunday, and Gabe Shaughnessy http://www.augmentedart.com/hack-the-dungeon/

Electric Fields by Jeremy Rotsztain at UPFOR Gallery Thursday Feb 5 6PM-8PM - 929 NW Flanders http://www.upforgallery.com/future/


ByteMe 4.0 at AFRU Gallery Friday Feb 6 6PM-11PM - 534 SE Oak St. Featuring Church of Robotron, Libby White, John Brown, Ben Purdy, and more! http://www.afrugallery.com/event/byte-me-4-0/

A few of us worked on the Church of Robotron install for ByteMe, so here's a far too large flier for it!

AttachmentSize byteMe_poster_04.1.png470.59 KB
Categories: DorkbotPDX, dorkbotpdx.org

something went wrong

del.icio.us links - Mon, 2015-01-12 06:00
Categories: DorkbotPDX, Member links

Dusg with knobs

DorkbotPDX Flickr Group - Sun, 2015-01-04 19:01

xnorman has added a photo to the pool:

Dusg with knobs

Reseq with knobs

DorkbotPDX Flickr Group - Sun, 2015-01-04 19:00

xnorman has added a photo to the pool:

Reseq with knobs

bracket

DorkbotPDX Flickr Group - Sun, 2015-01-04 18:17

xnorman has added a photo to the pool:

bracket

Connects the pcb to the faceplate. The bracket is held on the faceplate by two parts which may be either a jack or a pot

Dusg

DorkbotPDX Flickr Group - Sun, 2015-01-04 18:12

xnorman has added a photo to the pool:

Dusg

needs tuning and knobs

Dusg

DorkbotPDX Flickr Group - Sun, 2015-01-04 18:12

xnorman has added a photo to the pool:

Dusg

Resonant eq

DorkbotPDX Flickr Group - Sun, 2015-01-04 08:44

xnorman has added a photo to the pool:

Resonant eq

Resonant eq

DorkbotPDX Flickr Group - Sun, 2015-01-04 08:44

xnorman has added a photo to the pool:

Resonant eq

[dorkbotpdx-announce] BUNK is comping dorkbot tonight

dorkbotpdx-announce - Mon, 2014-12-29 11:14
To show their appreciation and as an advance apology for booking a party for Jan 12th, BUNK will be comping us some free pitchers of beer and some sandwiches! It's not bottomless (I think we're capped at something like 4 pitchers and 15 sandwiches), but I think it's a nice gesture. If you're c
Categories: DorkbotPDX, Mailing Lists

VS1053 Troubleshooting

Dorkbotpdx.org - Fri, 2014-12-12 10:30

Last night, I looked into why Adafruit's VS1053 only works with Teensy 3.1 at 24 MHz, but not 48, 72 or 96 MHz.

Turns out, the library depends SD.begin() to reconfiguring SPI.  It also runs data transfer code from both main program & interrupt context (causing havoc if the interrupt occurs at the wrong moment).  Pretty amazing it's worked on AVR for so long, but apparently it does crash sometimes.  Faster processors increase the opportunity for the problem to strike.

Hopefully my edits from last night will fix these problems for good.

 

Categories: DorkbotPDX, dorkbotpdx.org

Christmas lights notes

Dorkbotpdx.org - Tue, 2014-12-09 22:28

PySerial will tell you that the following baud rates are supported:
(50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 500000, 576000, 921600, 1000000, 1152000, 1500000, 2000000, 2500000, 3000000, 3500000, 4000000)

But it's lies, all lies!!  Well, some lies.  The fact of the matter is that by default the Raspberry Pi baud clock is set to 3 MHz, and the smallest baudrate divisor is 16, leading to a maximum baud rate of 187500, well below our target.  To remedy the situation we need to increase the base clock.  In order to do this, edit /boot/config.txt and add the following line:

init_uart_clock 100000000

100 MHz makes for a nice 2 Mbaud divisor of 50.

Categories: DorkbotPDX, dorkbotpdx.org

Improving Arduino's Serial Monitor Performance

Dorkbotpdx.org - Sat, 2014-12-06 20:57

Today I worked on the toughest Arduino bug... keeping the serial monitor from locking up or crashing with maximum speed printing from Teensy 3.1 and Arduino Due.

Here's Technical details and mini rant about Java performance.  Hopefully this (and other good work) will lead to future Arduino versions with a serial monitor that doesn't suck.

Categories: DorkbotPDX, dorkbotpdx.org

Strain Relief

Dorkbotpdx.org - Mon, 2014-12-01 00:50

I've struggled with appropriate wire-to-board connections over the years.
 

Here's one of OMSI's mainstays that I've co-opted that I'd like to share: 

all you do is

Step 1: add a hole in your printed circuit board

Step 2: route the wire through the hole

Step 3: solder the wire to the board

in this case its a 22 gauge wire, 0.1" through hole for strain relief, and a 18 gauge pin hole to solder to.


 Wire is strain releived at the board. Connector is off the board

Shift registers for 64 inputs/outputs and their wires.

Categories: DorkbotPDX, dorkbotpdx.org

Six Years of USB Development

Dorkbotpdx.org - Fri, 2014-11-28 13:54

Six years ago, in early Deceber 2008, I left the simple world of serial-based development behind and went native USB, releasing Teensy 1.0.  So much has happened and I've learned a lot in just 6 years.  I used to do everything by 9 pin RS-232 serial ports.  Those days seem so distant.

I'm now working on new and really awesome USB features for 2015...

Categories: DorkbotPDX, dorkbotpdx.org

Better SPI Bus Design in 3 Steps

Dorkbotpdx.org - Mon, 2014-11-24 18:11

Most Arduino SPI tutorials show this simple but poor SPI bus design:

A much better SPI bus design can prevent conflicts.  3 simple improvements are needed:

  1. Use pullup resistors on all chip select signals.
  2. Verify tri-state behavior on MISO: use a tri-state buffer chip if necessary.
  3. Protect bus access with SPI.beginTransaction(settings) and SPI.endTransaction().

Click "Read more" for details on these 3 steps.

Step 1: Pullup Resistors for Chip Select & Reset Signals

When multiple SPI devices are used, and especially when each is supported by its own library, pullup resistors are needed on the chip select pins.

Without a pullup resistor, the second device can "hear" and respond to the communication taking place on the first device, if that second device's chip select pin is not pulled up.  This is easy to understand in hindsight, but it can be temendously confusing and frustrating to novice Arduino users who purchase shields or breakout boards without pullup resistors.  Each SPI device works when used alone, but they sometimes mysteriously fail when used together, only because both devices are hearing communication meant to initialize only the first device!

A simpe workaround for devices without pullup resistor involves adding code at the beginning of setup.

void setup() { pinMode(4, OUTPUT); digitalWrite(4, HIGH); pinMode(10, OUTPUT); digitalWrite(10, HIGH); delay(1); // now it's safe to use SD.begin(4) and Ethernet.begin() }

 

Step 2: Proper MISO Tri-State Behavior

Most SPI chips will tri-state (effectively disconnect) their MISO pin when their chip select signal is high (inactive).

However, some chips do not have proper MISO tri-state behavior.  Fortunately, checking MISO tri-state is easy, especially when prototyping on a breadboard.  Just connect two 10K resistors to the MISO line, like this:

When all SPI chips are disabled, the MISO signal should "float" to approximately half the Vcc voltage.  If any device is still driving the MISO line, you'll see a logic high (usually close to 3.3V or 5.0V) or logic low (close to zero volts).  This test is so easy, it should always be performed by designers of Arduino compatible products.

Arduino shields and breakout boards with poorly-behaved chips should always include a tri-state buffer.  Adafruit's CC3000 breakout board is a good example:

 

Step 3: USB SPI Transactions in Software

Newer versions of Arduino's SPI library support transactions.  Transactions give you 2 benefits:

  • Your SPI settings are used, even if other devices use different settings
  • Your device gains exclusive use of the SPI bus.  Others will not disturb you.

These improvements solve software conflicts, allowing multiple SPI devices to properly share the SPI bus.

A typical use of transactions looks like this:

SPI.beginTransaction(SPISettings(14000000, MSBFIRST, SPI_MODE0)); digitalWrite(chipSelectPin, LOW); SPI.transfer(mybyte1); SPI.transfer(mybyte2); digitalWrite(chipSelectPin, HIGH); SPI.endTransaction();

SPI.beginTransaction() takes a special SPISettings variable, which give the maximum clock speed, the data order, and clock polarity mode.  The speed is give as an ordinary number, expressing the maximum clock speed that device can use.  The SPI library will automatically select the fastest clock available which is equal or less than your number.  This allows your code to always use the best speed, even on board with different clock speeds.

If your code will ever call SPI library functions from within an interrupt (eg, from attachInterrupt), you must call SPI.usingInterrupt().  For example:

SPI.begin(); SPI.usingInterrupt(digitalPinToInterrupt(mypin)); attachInterrupt(digitalPinToInterrupt(mypin), myFunction, LOW);

If you are developing a library that must be compatible with older versions of Arduino, which lack these SPI transaction functions, you can use SPI_HAS_TRANSACTION to check for the new version.  For example:

#ifdef SPI_HAS_TRANSACTION SPI.beginTransaction(SPISettings(2000000, LSBFIRST, SPI_MODE1)); #endif

 

Please Share and Use This Information

Today many SPI-based products for Arduino do not work well together.  My hope is this information can help all makers of Arduino compatible devices to achieve much better compatibility.

Long-term, sharing of knowledge is needed.  Please share this information and ask makers of SPI devices and libraries to consider these suggestions.

This article may be shared and copied under the terms of the Creative Commons Attribution 4.0 International License.  Please, copy & share!  :-)

 

 

Categories: DorkbotPDX, dorkbotpdx.org

[dorkbotpdx-announce] Fwd: Byte Me 4.0 Call for Submissions

dorkbotpdx-announce - Sun, 2014-11-23 12:58
AFRU Gallery has an open call for works for Byte Me 4.0, their annual showcase of technological art. This is a great opportunity to polish up and show off a project you've been working on... Call for works is below: -------- Forwarded Message -------- Subject: Byte Me 4.0 Call for
Categories: DorkbotPDX, Mailing Lists
Syndicate content