Marco's Corner

Just another Software Developer's Musings

P1000269_1024OK, so we saw and played a bit with the MaKey MaKey at the Bay Area Maker Faire and it’s a fun little piece to play with. I have a fifth-grade teacher in the family, so the plan is to enrich the class room a bit;-)


P1000265_1024P1000268_1024I always want to look a bit behind the scenes to understand how things work. So after a bit of google-ing, I found that it should not be too hard to implement a DIY MaKey MaKey  with an Arduino Leonardo, some resistors and some alligator clip cables. I did have the Leonardo and some resistors (1 MΩ – a little bit smaller than the 22 MΩ suggested around the web) and found the cables at the local RadioShack. I found the original(?) sources in the sparkfun github ( and tried to adapt it a bit. I pushed my changes to a fork: Overall, the setup worked pretty well, I guess not as sensitive as the original, but OK for mostly parts-bin parts.

So, overall, I would suggest to buy the original MaKey MaKey when you’re interested in something like that or want to attract kids to electronics. I don’t think, the DIY version would save you anything. It’s just a way to see what’s `in the box’ ;-) It’s some thing to read specs but it’s a different thing to be able to create a working setup.

As always, have fun exploring;-)

— Marco


P1000224_1024I was thinking about a more flexible sprinkler controller for a very long time. We have circuits which would benefit from different patterns, from the normal lawn watering to drip circuits for some flower/veggie beds to some pots and even some soaker-hoses for trees.

When I saw Daniel’s setup @ Garden Automation, I knew that this is a setup I would like;-) (Daniel is an organizer/marshal @ RobotGarden in Livermore, were I hang around once in a while.)

I looked a bit more into OpenSprinkler and especially into the different setups. I liked the `real OS’ setups better than the Arduino-like version. And in the end, it came just down to availability. When I was ready, the BeagleBone Black was just on it’s way to the revision facelift. It was not in stock anywhere.  So I settled on the Raspberry Pi as base-board. I have both running here already, so it did not make a big difference;-)

So the current setup consists of the Pi, the OpenSprinkler Pi with a zone extension board, a SainSmart LCD Module For Arduino 20 X 4 with I2C daughter board and an USB WiFi dongle. The WiFi dongle is inside the box as indented, but the LCD module did not fit:-( I might look at a higher version of that box eventually. For now, it’s kept in place by two rubber bands;-) I want to use the LCD to display status info. It currently displays the hostname, the IP address and the current date/time. Eventually it should also display info about the running/upcoming program & station etc.

The WiFi connection is not as reliable as I would have liked:-( So I’ll have to play with that a bit more. But I’m not sure, if it’s the Pi or the access point:-( Something between the two. I saw times, when I could not ping the Pi from my laptop but it would answer to pings from the AP (the laptop was used to log into the AP’s web interface, so it could talk just fine to it).

I needed to control 11 sprinkler circuits, so I had to get the Zone Expansion Board. But the extra 16 zones looks like a bit of overkill;-)

P1000215-1024P1000219-1024The OpenSprinkler Pi board (from V1.2, I believe) also includes a 4-channel ADC (8 bit) and an relay. So I want to use one channel connected to a photo resistor and the relay to control the lights outside our garage. even while the relay is rated for it, I did not like the idea of running mains power into the OpenSprinkler box. So I control another relay (in the old mechanical timer box) with the included relay. That seems to work ok.

P1000216-1024I also added an AM2301 temperature/humidity sensor along with the existing rain sensor.  I hope to use that eventually in calculating the watering needs. So far, I can just get reasonable looking values from it with the Adafruit library;-)

So overall, the bits & pieces work together. I’ll need to get some cable fasteners next time I hit Home Depot. Unfortunately, we don’t have any of the blue wall colour left over, so the footprint of the old sprinkler controller will stay for now:-(

Now it’s just up to writing/adapting the software to do what I want;-)

As always, it’s good when you can control your own world;-)

— Marco


Update: I got some blue paint;-) So the setup looks a bit more finished now. P1000228_1024Also, that image shows the info on the display a bit better. The software is still not at the state wher I would be happy, but I have a working setup, so that will probably move slower now:-(



Update 08/20/2014: OK, a collected order from Digikey included a new case and my LCD display has a final place. It fits pretty good. I only had to remove the two top screw holes. Some more pictures as it looks right now.



For a long time, I was working with a very cheap multimeter, that I picked up somewhere at a sale. But I decided, it is time to upgrade to a bit better tool;-) Of course, when you look at electronics testing/measuring equipment, everybody knows about Fluke. But for me this is just a hobby, so those things are a bit out of my price range.

After long days thinking about it and searching the net, I eventually found the UT61E, which looks like a very nice tool. It also supports data logging to a computer which might come in handy at times;-) So that’s what I settled on.

After I got the DMM, pretty much the first thing I tried, was the connection to my Linux laptop via the UNI-T USB cable. I saw before, that it should work. But it turned out a bit more involved than expected. The best resource was probably Rainer Wetzel’s page to the UT61E . But I was also running into the `suspend’ problem. So the next page is UT61 , which has the trick with the suspend.

But overall, I did not like the idea to run everything as root as both pages suggest/require. So I wrote a little udev rules file, with seems to take care of both problems;-)

# UNI-T USB Adapter
# This file should be installed to /etc/udev/rules.d so that you can access the Adapter without being root
# type this at the command prompt: sudo cp 99-UNI-T.rules /etc/udev/rules.d
SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="e008", MODE="0666", ATTR{power/level}="auto", ATTR{power/autosuspend}="0"

Install that little file into /etc/udev/rules.d/ and restart udev and the next time you plug the cable in, it should just work without being root;-)

I hope this little gem helps the next guy;-)

Have fun,

— Marco

Just some photos from last night’s lunar eclipse. I was mostly lucky, the high clouds did not materialize as much as feared;-) I did only stay up until about the peak of the eclipse. That was long enough for me;-)



makers   beginnersOK, nobody knew what to expect for our Arduino Day event. But about 20 makers had a good time @ Robot Garden;-) Most knew their way around. But we also had a couple of kids who were new to the idea of `hardware hacking’ and liked the idea of an easy start. So instead of a big presentation, I gave them some 1-2-1 time;-) That worked pretty well.

Just for reference, my prepared presentation as LibreOffice ArduinoDay.odp & ArduinoDay.pdf files;-)

table2table1Some photos (not taken by me;-)

As always, have fun exploring;-)

— Marco

Arduino Day 2014We will have our own event @ Robot Garden in Livermore, CA to celebrate the 10th Birthday of Arduino – The little computer that can;-) I brought it up, so naturally, I got to organize the event;-)

More information is available at the meetup page for the event.

I hope, we will have some interesting people and some good demos, but as always, the Arduino ecosystem lives from the participation of individuals;-)

I hope to see you there;-)


Scale - TestsScale - In BalanceOK, the “Compound Machines” event @ Science Olympiad is a closed event comprised of a written part and a more practical part, where the team needs to use a pre-built “scale” to determine an unknown mass with the help of a known mass. So I don’t have a real video or images of the event. All the pictures were done afterwards. The rules for the scale are in the official rulebook;-) I’ll just try to collect some “lessons learned” and some pictures for reference.

  • Use the longest levers which still fit into the rules. With longer levers, the significance of the limited accuracy of the length measurements decreases.
  • Find at least some parts with with “nice round” values. In our setup, the active length of the second class lever was 45 cm and the fixed side of the first class lever was 11.25 cm. That made the equation somewhat easier;-) Mu = 4 (a/d) Mk
  • Try to find good bearings;-) Brass bushings with brass washers on both sides worked kind of OK.
  • Make sure, you calibrate the apparatus with the hooks.
  • Include the masses of the attachment hooks where you hang the masses in your calculations!! We missed that part during the preparation and so the results were somewhat off during the competition:-(

Scale - DetailScale - Bushing So overall, the Millennium team was not very successful in this event. But there is always next year;-) I hope, the kids learned something regardless. Just to keep track of the spreadsheet: Scale – Spreadsheet

Have fun;-)

OK, this year, it was the second place for our team in the Maglev event in the San Joaquin County competition. I only saw the runs of our vehicle and there the problem was, that it was way too fast. The target time was set at 12 seconds. The successful runs were around 3.7 seconds:-( Way too fast. But trying to slow the car down and it would not start at all:-( So there is probably a better way. If next year has similar rules, I guess we need to experiment with side magnets to keep the car from twisting?! But at least the moving weight of 1950 grams (weight limit was 2000 grams) helped the score;-)

Maglev VehicleSome more details of Maglev Vehicle from the frontthe car. One of the EDF from last year (GWS GW/EDF55-300H’s) had to do all the work alone. A little bit a bigger battery, a two cell LiPo (7.4 V) with 5000 mAh just for the extra weight.

The maglev magnets were built out of  8*4 of the Kelvin maglev magnets each. That was partially needed to float the weight, but also to as weight low in the vehicle. They were glued together and to a steel profile at the top.  There was a little box between the magnet assemblies to keep them parallel to the sides. It was also used to add more weight low in the vehicle. All of that was attached to the plywood base via the usual Velcro strips.

Magnets separated from the baseMostly taken apartWe experimented with a 1.5 Ohm 20W potentiometer (actually a 3 Ohm potentiometer parallel to a 3 Ohm resistor, both rated at 20 watts). But that did not work so well. It worked as expected to slow the motor down. But even minimal slowing was too much to get the car started reliably:-( More to experiment with next year;-)

The blue rectangles in the last image are extra weights which were normally under the battery to come close the the weight limit;-)

Al always, have fun exploring.

Last night Paul Zander, Bob Smith, and I gave a presentation/demo for the Silicon Valley Linux Users Group on little computers ranging from Arduino to Raspberry Pi and friends. I believe the audience had a good time and we had interesting discussions afterwards. My slides are here SBC_SVLUG_mw (PDF)and most of my demos are described in more detail somewhere below;-)

As always , have fun exploring


I played with the Robotis CM-900 and the little MinIMU board before. But so far, I always used the Arduino libraries directly from Pololu. One example was my little teddy seat;-) This time around, I decided to take the Arduino out of the equation and and let the CM-900 do the I2C communication with the IMU. That seems to work pretty well after a couple of changes:

  • I think, I found a little problem in the OpenCM Wire library implementation. I posted the proposed fix at the RobotSource forum here.
  • I had to make some minor adjustments to the Pololu library sources to make them work with the OpenCM environment. Overall they are written very well and the switch from a 16bit Arduino base to the 32bit CM base was not a big problem. I forked the repos and my modified versions are available here: L3G library, LSM300 library & MinIMU-9
  • I’m running on Linux, so the requirements for the needed to be adapted a little bit.

But overall it works pretty well.

BioloidBack1_1000BioloidBack2_1000Since I wanted to keep the original Bioloid setup intact as much as possible, I had to find a new place for the little IMU board. I used a little wooden carrier and some double sided tape;-) Now on to the next step. Trying to get the robot to walk with the CM-900 instead of it’s original controller;-)

As always have fun.

— Marco