Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

Monday, July 21, 2014

Touchscreen on Raspberry Pi

A friend has a few Elo Touchscreens from a past venture, and I have racked my brain trying to figure out a use for them. After giving up on Android PCs, I took a stab with a Raspberry Pi Model B running the Raspbian image from Noobs.  Two obstacles presented themselves:

  1. The Raspberry Pi only outputs HDMI.  For now, I'm going to try an HDMI to VGA converter. Better to get this thing off the ground than hem and haw about a 'better' solution.
  2. The touchscreen is inverted.  For this, I installed the xinput-calibrator tool per the instructions on the Raspberry Pi forums given by msmithy12 and a helpful config guide:
sudo apt-get install libx11-dev
sudo apt-get install libxext-dev
sudo apt-get install libxi-dev
sudo apt-get install x11proto-input-dev
download http://github.com/downloads/tias/xinput_calibrator/xinput_calibrator-0.7.5.tar.gz 
tar xvzf (downloaded file)
cd (downloaded file)
./configure
make
sudo make install
Then, from the menu: Preferences/Calibrate Touchscreen
  1.  Do not immediately follow the instructions given when you run calibration (place the calibration in a /etc/Xll/...).  Doing so borked my Raspbian install.  Instead, create the file specified in /usr/share/X11/xorg.conf.d/.  I ran "sudo leafpad 99-calibration.conf" to create and edit the file.  After dropping in the calibration indicated, I restarted and found out it stuck.  Woo hoo!
 I will update this space with my progress.  Currently, the setup is:
  • Raspberry Pi Model B ($35)
  • Elo Touchscreen ET1939L (Pre-owned)
  • BYTECC HM-VGA005 HDMI-A to VGA Female Adapter/Converter ($20)
  • 1 x WiFi Dongle (Ralink RT5370 chipset) ($10)

Lessons Learned


  • Single User Mode could have beenused to save my Raspbian install.  It can be entered by adding init=/bin/sh to cmdline.txt.  I was using Noobs, so holding Shift while the PI boots got me into the editor.
  • I like Linux more and more each project.

Friday, July 18, 2014

OFBC: Inspiration and Research

Note: This is part of the Project Write-up for OFBC: One Fluorescent Beer Coaster

The Idea

As night descended at Toxic Barbecue at DEF CON 21, everyone was working through the meat and alcohol they'd consumed much too fast and in much too large a quantity.  Rather than move the party somewhere else (Las Vegas' Sunset Park is safe at night, right?), we began to experiment with cell phone screens, then their flashes.  The lights were bright, but they were also extremely narrow in focus.  

The Liter of Light project gave us an idea to use a liquid to diffuse the light.  As there was still copious amounts of alcohol left behind, we started experimenting.  This 'research' lead us to decide that Smirnoff Ice was the best diffuser.  Filtered beers were awful due to both the dark bottles absorbing light as well as the liquid having no solids to scatter any that was left. Smirnoff had the clear bottle and label as well as a ton of solids from the included fruit juice.  As this was a hacker party and not for frat boys, we had plenty left. The misogynists among us named them 'Bitch Lights' after the colloquial term for Smirnoff Ice: Bitch Drinks.  We had our product; now we needed to separate it from the phones.


Research

DEF CON 22 planning made us realize that we needed to make good on our promises made while too intoxicated to realize we knew nothing about how LEDs actually work.  First stop?  The local Hackerspace, of course.  SYN Shop is in downtown Las Vegas.  Multiple forum members are lighting and electronics techs on The Strip.  They pointed me towards specific packages, drivers and batteries.  I took this foundation and boiled it down to specifics.  I wanted the light to be composed of the following elements:
  1. Super Bright LED (1W, 100 lumens)
  2. LED driving circuit
  3. Battery (3-4 hours of time)
  4. Charging circuit (USB)
  5. Switch to turn it on
  6. 3D Printed Body
Armed with search terms from the forum, I found a wealth of helpful links.  I found LED packages that fit the "Super Bright" definition all over the web.  I learned a ton about batteries and chargers (did you know Sears still exists and has an online store?).  The most helpful site was Instructables.  There, I found several LED driver circuits that I actually understood.  After a trip to Frys left me bewildered with options, I learned to better read datasheets.  Finally, I had a working circuit design.

Friday, June 27, 2014

R2B2

I built a copy of Justin Engler's Delta Bot R2B2.  Here's how I did it with a revised parts list.


Inspiration

Justin Engler and his iSEC Partners team presented his PIN punching robot at DEF CON 21.  Even though it was, by his own admission, a last resort in cracking phone PINs, it received coverage in Forbes and other outlets. 


Build

The 3D prints from my brother's Replicator came out well.  The dimensions were correct overall, but I had to do some filing to get the mounting bracket to slot together.  The servos I used required me to file out the slots a bit as well.  The spokes from my servo mount were a little large, so I filed those down too.  Overall, it wasn't too tough to fit everything together.  When I build another one, I need to see if my problems were caused by the STL files, how the G-Code was generated or the calibration of the printer itself.

The local RC shop called Hobby People had most of the small and moving parts.  Servos, ball joints and such came in at under $30.  Lowe's had the right sized all-thread to finish the job.  One thing about the construction was that I originally bought 10mm hex cap screws to join the ball joints to the biceps.  The way the bicep is built, though, the joint tends to hit the side of the bicep and limit the range of the effector.  To solve this, I moved the ball joints outward with small washers.  This made the 10mm hex caps too short, so I went with 15's instead.  Redesigning the bicep to free up movement might resolve this problem.  I slipped a metal stylus pen through a rubber grommet and effector.  The stylus was grounded with an alligator clip onto the breadboard.

The rest of the robot (as you can see in the pic) are an Arduino Uno, a small breadboard and a four-legged stand I put together from a 1x2 and some angle braces.  The robot is held to the frame by a fender washer through the central hole of the mounting bracket.  The sketch had to be modified with the correct measurements on the actual robot.  Most everything matched, so that built my confidence.  Once I uploaded the sketch, I played around with the machine code and made it dance.  This is when I found out the ball joints were binding against the bicep.  I also dropped the robot, and the short hex caps made it go eveywhere.  D'oh!

I forked and cloned Justin's github to prep for writing some code and tidying up the notes.  Rather than cracking phone PINs, I plan to use this to punch card PINs on PIN Pads used in credit card processing.  I don't think I'll need the OpenCV code, so I'll have a blind version of R2B2 up in my own repository once I learn enough Python to be dangerous.

Finally, Marginally Clever has a new version of the delta bot that uses laser cut parts.  The R2B2 that Justin demoed at SXSW seems to have been made from this version out of acrylic.  Snazzy!  This comes with its own platen and looks mighty sturdy.  I might have to grab one and give it a spin.

New parts list

Count Cost Each Name Description
2 $1.94 Du-Bro 2123 3.0 mm x 10mm Socket Head Cap Screw (4-Pack) P/N 2123 Screws to connect effector to ball joints
2 $1.94 Du-Bro 2124 3.0 mm x 15mm Socket Head Cap Screw (4-Pack) P/N 2124 Screws to connect bicep to ball joints
2 $1.98 Traxxas 5347 Rod Ends with Hollow Balls Large Revo (12) Ball joints to form the arms from threaded rod
6 $1.04 The Hillman Group 44817 8-32 x 6-Inch Threaded Rod, 10-Pack Threaded rod for ball joints to connect bicep to effector.
3 $7.99 The Hillman Group 44817 8-32 x 6-Inch Threaded Rod, 10-Pack Servos that connect to bice. Most will work, but Hobby People has adequate ones for cheap
As needed Varies Washers,Flat,3mm DUB2109 and The Hillman Group 36-Count #6 x 3/8-in Zinc Plated Standard (SAE) Flat Washer Washers to separate arm from bicep and effector. Used to give arms maximum freedom.
1 $2.00 Like Hillman Rubber Grommet (5/16x5/8x5/8x7/16) Rubber grommet for effector to hold stylus
1 $4.00 Like Stylus pen Stylus for effector
1 $1.13 1 x 2 x 8 Spruce-Pine Furring Strip Body for robot
1 $1.13 1-in Zinc Corner Braces Braces to hold shape of robot
X $2 Bolt, fender washers and wingnut Bolt to hold robot to body

Friday, June 20, 2014

Obi-Wan Kenobi Light Saber Mod into an E-cig

Recently helped a friend modify an Obi Wan Kenobi .45 scale light saber into an e-cig.  The model is similar to the one in this Ebay listing, and is getting pretty rare.  They got the idea from a forum post that did a much less elegant job, but contains a slightly bigger battery.  Here are brutal steps for our build:
  1. Get the model disassembled.  You should end up with:
    • An end cap
    • Chromed plastic 6 spoke pommel cap
    • A die cast metal shroud
    • Plastic insert for metal shroud
    • Belt loop with screw
    • Red and brass buttons with screw
    • Die cast fore end
    • Plastic insert for metal fore end
    • 3x chromed plastic pins that hold the plastic insert inside the metal fore end
  2. Find a battery.  We were able to fit a 180mAh long cylindrical 3/8" diameter one into the case.  It had a button on one end that fit just right so the fitting just comes to the fore end and a hole can be opened in the plastic insert for the metal fore end to allow access.
  3. Vice the metal fore end by the wider cap (and not the base) into no-mar jaws and drill out the central hole with a 3/8" bit.  I would suggest a drill press for this operation, though a hand drill will do in a pinch.  A Dremel did not work for this due to hole size.  The metal is aluminium, so it shouldn't be too rough to do on most metal bits if you go slow and break your chips.  NOTE: we busted the spindly base off the wider fore end and snapped the 3  connecting bars by holding the fore end in the vice by the body of the fore end and not the cap.  They went back on with superglue after we matched up the shear patterns, but avoid this if at all possible.
  4. Gently vice the plastic insert to the fore end and drill it out to 3/8" as well.  While you have it disassembled, drill the hole for your the button on your battery as well.  NOTE: be careful not to deform the plastic insert in the vice.
  5. To reduce rattle inside the case, wrap some electrical tape around the parts of the battery that don't precisely fit (and are hidden in plastic).
  6. Attach a wooden or metal extension on the battery cap and drill it so the belt loop screw can be reinserted.  We used wooden dowel screwed onto the plastic cap at the end of the battery, then epoxied in place. The belt loop screw holds the metal shroud and plastic fitting to the battery in the same manner as the fitting and battery button hold the fore end tight to the battery.
  7. Attach your fitting and vape!
Fully Assembled

Coil Removed

Side View with all Vape connectors removed



Wednesday, May 7, 2014

Arduino and Other Electronics Projects

Miscellaneous electronics and microcontroller projects:

Make and RadioShack's Drawdio:
Initial test of this 20x4 character screen.  Notice the Haiku
Small Screen Blues
Screens 20 by 4
Focus encoded messag
As haiku does

 First fully custom project.  Writing a 'guessing' game that uses a RadioShack RGB LED Strip, the screen, LEDs, and 6 buttons.  Already maxed out the memory of the little chip on the Uno R3.
 Moving my dev environment to Raspberry Pi.  The borrowed laptop I was using is going to be repurposed and will live in an inaccessible place.  Here is the Pi running the Arduino IDE.
 Used Google, and knowledge from a class at SYN Shop, the local Hackerspace, to remove and troubleshoot this module.  It is a Blower Motor Speed Controller from my car's AC.  I found out the transistor in it is bad, but replacing it would take more effort than it is worth.

Wednesday, December 18, 2013

December InfoSec Links

NSA and Government
Shame on Feinstein: There is a cost to surveillance.
http://www.siliconvalleywatcher.com/mt/archives/2013/12/shame_on_feinstein_co.php?utm_source=buffer&utm_campaign=Buffer&utm_content=buffer54e85&utm_medium=twitter
RSA took $10mil to backdoor their crypto libraries.
http://www.reuters.com/article/2013/12/20/us-usa-security-rsa-idUSBRE9BJ1C220131220
EFF reviews how the CFAA ruined lives and slowed innovation out of fear:
https://www.eff.org/deeplinks/2013/12/2013-review-tragedy-brings-cfaa-spotlight
Getting the ungettable: The NSA's Tailored Access Operations Unit
http://www.spiegel.de/international/world/the-nsa-uses-powerful-toolbox-in-effort-to-spy-on-global-networks-a-940969-2.html
Backdoors R Us: NSA's backdoor catalog
http://www.spiegel.de/international/world/catalog-reveals-nsa-has-back-doors-for-numerous-devices-a-940994.html
Practical Tamper-evident Techniques
http://www.wired.com/threatlevel/2013/12/better-data-security-nail-polish/


Security and Cool Exploits
Via Chavaukin: 10 things Security should stop doing in 2014
http://blog.anitian.com/2014-stop-doing/
Acoustic cracking of PGP keys.  Fantasy attack made real:
http://www.cs.tau.ac.il/~tromer/acoustic/
SD Card Hacking
http://www.bunniestudios.com/blog/?p=3554

Target Breach Madness
International cards and those associated with a zip code fetch a premium:
http://krebsonsecurity.com/2013/12/non-us-cards-used-at-target-fetch-premium/
Putting a face on the Target breach:
http://krebsonsecurity.com/2013/12/whos-selling-credit-cards-from-target/
Target's faster checkout system explained:
http://www.quora.com/What-is-the-new-instantaneous-payment-system-being-used-at-Target
All PINs in the world leaked! (Tongue in Cheek)
http://pastebin.com/2qbRKh3R

Also hilarious: What happens when the common folk get a glimpse at the code behind:
https://twitter.com/neave/status/415533230579019777/photo/1

Monday, December 16, 2013

Bench Power Supply Complete!

Thanks to SYN Shop, the Las Vegas Hackerspace, I completed a bench top power supply.  I took a class that helped me build one from a kit.  The kit itself produced a 5v out and a configurable out that I ended up making 8.5 for Arduino.

One of the challenges of the class was to take that kit and enhance it.  I removed the resistor on the configurable channel and replaced it with a 10K Ohm potentiometer from Radio Shack.  This allows me to configure it for between 2 and 14.5 volts!



Some time later, I got tired of the alligator clips I used to connect to the two rails.  I replaced them with a barrel connector and switch.  My initial schematic was woefully flawed, however.  If I had completed it, I would have shorted the rails to ground through the switch, blown the fuse, and possibly smoked the voltage regulators.  Yeesh.

Thanks again to SYN Shop and Javid, the teacher who's kit made this possible.