Wednesday, July 31, 2013

37 sensor kit from Sunfounder lab

So, I saw this kit on Amazon.  It seemed too good too be true.  The kit was priced right, it was less than 2 dollars for each board.  Of course many of the boards are not sensors, some of the 37 are emitters of various frequencies of light and sound.

The package arrived in just a few days.  It was small enough to have been left by my mail carrier in my mail box.  I opened the medium sized padded envelope  and pulled out a nice plastic case that firmly latched shut.  Opening the case revealed the 37 modules each in little plastic bags.  None of them were labelled and there was no documentation.  Each module seemed to be well made and I didn't see any badly soldiered joints. 

Freshly unpacked.

Everything came mounted on tiny boards.  These easily plugged into a breadboard and I was able to connect several different modules to an Arduino board.   I sorted the various modules 2 or three into a single small bag.  I used the picture from the Amazon web page to identify each item.  This got rid of more than half the bags and organized the modules by function.

The list of modules from Amazon:

1.Passive Buzzer Module
2.common-cathode RED&GREEN LED Module
3.Knock sensor module
4.Shock-switch sensor Module
5.Photo resistor sensor Module
6.Push button Module
7.tilt-switch Module
8.RGB LED Module
9.infrared-transmit Module
10.RGB LED Module
11.hydrargyrum-switch sensor Module
12.two-color commoncathode LED Module
13.Active buzzer Module
14.Analog-temperature sensor Module
15.Colorful Auto-flash Module
16.Magnet-ring sensor Module
17.Hall sensor Module
18.Infrared-receive sensor Module
19.Analogy-Hall sensor Module
20.Magic-ring Module
21.Rotate-encode Module
22.Light break sensor Module
23.Finger-Pulse sensor Module
24.Magnetic spring Module
25.Obstacle avoidance sensor Module
26.Tracking sensor Module
27.Microphone sensor Module
28.Laser-transmit Module
29.Relay Module
30.18b20 temperature sensor Module
31.Digital-Temperature sensor Module
32.Linear-Hall Sensor Module
33.Flame sensor Module
34.High-sensitive voice sensor Module
35.Humidity sensor Module
36.Joystick PS2 Module
37.touch sensor Module

There was also a download link that had more information about how to use the various modules. 

The download is kind of a mess.  The manual reads like it was machine translated from another language.  I need to work on cleaning this up and uploading it to github so that people can just drop in the library and have examples for all the modules, and modules that show how to wire everything up.

It was also not clear to me how to wire these modules up to an Arduino board.

Oh look, it is a DHT11 !  Ignore the G N D V, that is just gibberish.

Looking down from the top, brown wire is ground, red is 3.3-5v power, and orange is signal.


Overall the hardware is nice.  Everything I have spent the time figuring out I have been able to get working.  Many of these boards would be several dollars individually by themselves.  The humidity sensor itself is 5 or 6 dollars if bought by itself.  IR receiver's are $2 as a bare component.  Having the bare component mounted on small boards makes it much easier to breadboard up examples, and the components are much tougher mounted in the modules than they would be otherwise.  Especially for me, since as I get older my hands get more and more apelike.

The only possible thing that one might consider bad is that many of these boards are near duplicates... there are 4 modules that sense temperature, 3 hall effect modules, a couple RGB lights, and so on. A little less duplication and a little more variety might be good.  But this might also be seen by some as a good thing.  Maybe you want to explore how variations on these components all work. 

Unfortunately, if you are currently looking for something you can just buy and get working in a day, you must look elsewhere.  The sole negative, but it is a giant negative, is that the Arduino sketches and instructions on how to wire up these modules is fairly difficult to do.  I've been spending a couple of hours getting each sensor to work in an evening.  I like doing this, so no big deal to me, but this might be a deal breaker for someone else.

Another thing that would be nice would be to throw in a few 3 wire, 4 wire, and one 5 wire female to male connectors so that you can easily wire the components right up to the pins on an Arduino board.  I bought this wiring kit for the variety of wiring options it gave me for Arduino, breadboard, and Raspi.

Thursday, July 18, 2013

Update on my Raspbmc media player project.

The Infrared Remote control is working great now.  This means that I can just reuse a free old remote control and move the $20 wireless USB keyboard onto another project.    This also means that the player draws even less power now, the IR Receivers are amazingly low power.  I am re-using the old remote control from the media player that Netgear deactivated as soon as I hooked it up to the Internet. 

I got an IR receiver from Lady Ada's site here: for just a couple of dollars.  Plus shipping, so buy a lot of other stuff there too. *L*

I also bought the cable and bread board connector for the Raspi here: Since this is  reusable for many projects I consider it a tool and am not adding it to the cost of this single project.

If you want they sell a remote control with a configuration file all figured out for you already.  If you want to reuse and old remote, that is easy to do too.

I followed the directions on Ada Fruit as well and programmed my remote control in just a few minutes.

I had to type in the commands from a screen shot, here is something you can copy and paste from:

sudo modprobe lirc_rpi
sudo kill $(pidof lircd)

mode2 -d /dev/lirc0
irrecord -d /dev/lirc0 ~/lircd.conf

A lot of remote controls have been programmed already, and the config files shared at this site:

This receiver is so much more sensitive than any I have ever used before.  I can literally point the remote control 180 degrees away from the chip and it still reads the button presses.  The old media player would sometimes not get a button press pointing right at it.

I have three more of the chips and 3 more Raspi boards, so I will be adding a wire harness to each of these 4 chips and wiring up every Raspi I own with inexpensive IR. 

The Raspi's can also send IR so I will be working on that next. 

Monday, July 15, 2013

Reply from my Senator regarding illegal NSA data collection.

Dear Mr. [Name Redacted]:
Thank you for sharing your concerns regarding the recent revelations of data sharing between Verizon and the National Security Agency (NSA).
According to documents released in the press, the Federal Bureau of Investigation (FBI) sought permission to collect data on cell phone use of Verizon customers as part of a classified program aimed at preventing acts of terror in the United States. The Foreign Intelligence Surveillance Court (FISC), which oversees requests for classified electronic surveillance for foreign intelligence gathering, approved at least one request that Verizon provide the FBI and National Security Agency (NSA) with select call log data for Verizon customers. The FBI claims the data collected and shared includes routing information such as originating and receiving phone numbers, individual mobile subscriber numbers, calling card numbers, and the time and duration of each call. It does not include content of the call, or the personal location or identification information of customers.
The FISC was created in 1978, and is composed of 11 federal judges. Its authority to grant access to business records was established under the USA PATRIOT Act and was extended in 2008 and 2012.
Thank you also for sharing your concerns regarding the National Security Agency’s (NSA) data collection program “PRISM.”
The Director of National Intelligence (DNI) recently confirmed reports that the NSA has used a classified computer system known as PRISM to collect foreign intelligence information. The system contains communications of foreign citizens located abroad that have been collected by internet service providers and delivered to the NSA for analysis. The DNI also released a public fact sheet about the program. It is available at:
PRISM’s information gathering falls under procedures that were passed in the FISA Amendments Act of 2008 (FAA) and extended by the FISA Amendments Act Reauthorization Act of 2012. While the internet service providers subject to information requests have not been confirmed, the DNI stated that all information was provided after the law enforcement and intelligence agencies’ requests were approved by the FISC.
I fully support efforts to protect our nation, but such efforts must not compromise the very foundation that makes our country great; our civil liberties and Constitutional rights. Many questions, including the breadth of the information gathering, the extent of information about U.S. citizens that was gathered, and the length of time that the information was kept on file, must be addressed.
It's critical that we find a balance between security and freedom. Protecting our national security is critically important, and we still need to learn more, but any sort of overbroad surveillance is cause for serious concern. I voted against the Patriot Act in 2001, the FISA amendments in 2008, and the extension of Patriot Act provisions in 2011. I will continue to support measures that protect our nation from terrorism while also reforming the most dangerous parts of this law to protect our civil liberties and constitutional rights.
I will continue to closely monitor this situation as additional details about both incidents come to light. Should any legislation related to intelligence gathering and our civil liberties come before the Senate, I will keep your views in mind. Thank you again for getting in touch with me.
                         Sherrod Brown
                         United States Senator

Wednesday, July 10, 2013

Flexible, Low Power, Yet Powerful Computing System.

What I would like to have is a computer with many programmable circuits so that the system can reconfigure and rewire itself on the fly. 

When you want a music player or a video player, or a video encoder, or whaterever, it loads the codexs onto very low power circuits and the main CPU idles as it only does enough to keep data fed between the memory, disk, screen, and the circuits.  Imagine a computer that could play 1080P video while encoding the video at the same time in real time and only draw a few watts of power.   Imagine being able to convert a half dozen videos at the same time, in less time than your most powerful computer can do it now, and still draw less than 10 watts. 

A few dozen common protocols and functions could be permanently loaded into ASICs so that they are always ready to go without any setup time.

The computer could be upgraded by just replacing the ASICs with newer ones, or stacking more

Tuesday, July 2, 2013

Makerbot Replicator 2 has an Extruder Feed Problem.

But the community already had a fix before I even got my printer.  The symptoms are varied.  Prints won't stick to the platform no matter how carefully you adjust the table.  You might just get a missed layer here or there, which really weakens a print.  Or you might get the dreaded air print, when you leave a job that is going to run for 12 hours and you come back to find it only printed half the job and is now just merrily printing nothing into the air.

The problem is the design that came from the original reprap and is a common design issue with many of the modern printers that derive from this venerable ancestor.  There is a hard plastic nub that presses the filament against the extruder drive gear.  The nub is positioned with a hex screw whose position is behind a fan and some wires.  I had issues each time I adjusted the tension on the nub because I would move the wires and the heater would lose power and not maintain temperature until I pressed the wires back into the connector.  The only tension on the nub is from a tiny rubber o-ring, but any more than minor fluctuations in filament diameter would cause the filament to stop feeding.

The problem part, from it's location in the top of the printer, to it's placement on the stepper motor, to where it is in the plastic housing.

Driver stepper motor in place on extruder head from center to right.
Motor and drive gear removed from extruder head.

The assembly that guides the filament and presses the filament into the drive gear.

The solution to the problem is to print an upgrade part from Thingiverse that fixes the problem.  This can be found here:

This is my fix in place before I put the fan cover back in place:

One problem that I had with this upgrade was the high cost of shipping for just a single part, or having to buy far in excess of what I needed for this one project.  Another was the time to get the parts.  I foolishly orded

So what I am proposing to do is to offer the 9 kits that I made up for sale, either just the hardware or the hardware with the plastic piece, just in case you waited too long and your printer can no longer print.

The kit with the plastic parts printed and fit together looks like this:

Kit assembled and printed in Yellow plastic, red and green are also available.
Update May 2013

It looks like Makerbot finally recognized their problem and are having a batch of replacement parts made to update their machines in the field.  I paid $9 for the "free" upgrade, which they claim is for shipping and handling, but that was months ago and I have yet to get the parts to do the repair.  I suggest still doing this fix until you get the mass produced replacement parts.

Dec 2013
I got the replacement part a couple of months ago, finally.  Was too busy in college to upgrade the printer at the time.  Going to tear into the printer at the beginning of the year to finally fix this issue.