Thursday, August 27, 2015

@MAKE #Electronics Experiment 32: Robot Cart (Part III - Cart is together)

The saga continues...

I put the pieces of the cart together as shown here:
I attached the hinge to the body only to expand the pilot holes to make it easier when I put the movable wheel assembly together (see upper right).  The wheel at the lower right has the mounting wheel for the motor ready to go.

Next step was the wheel assembly.  I needed 1" #6 bolts to put the 3 pieces together (each piece is 1/4").  Once I got it together I realized that it was upside down (the holes for the axle needed to be on the bottom), so took it all apart and reassembled.

Next was the driving wheel. The pre-drilled holes in the mounting wheel were not big enough for any screws I had or could get quickly, so I reamed them and used #4 sheet metal screws (needed 1/2"--another shopping trip).  Pan head screws won't do because the wheel needs to clear the motor. Even with flat-head screws I had to file down a small plastic cylinder on the motor, which has no use that I can discern.

Now I was ready to mount the motor. I was clueless here, but I thought ahead enough to buy a mounting bracket, which attaches to the motor with a #4 machine screw (again, 1/2" flat-head). I measured the cylindrical piece to the motor--it's 3/4". I drilled a 3/4" hole in the ABS side (3/4" from the bottom like the other wheels, and over enough so that the wheel did not extend beyond the front of the body--2.25" in). I had to file the hole to get the motor through it, but it's in and stays put. The bracket doesn't do much, but if I need to secure the motor later on, I can screw it to a piece of plywood that I secure to the frame.

The motor is a Solarbotics GM2 Offset Shaft Gear Motor. I used a Solarbotics GMW mounting wheel, and GMB28 Mounting Bracket.

Next was the limit switches.  They need to be in the front with the sensors out so that when they hit something the switch will activate the timer sequence and flop the relay for 5 seconds, reversing the motor. (See my post, including a video, on the circuit.) I drilled the holes (1/8") on both sides but only mounted one, using 3/4" #4 machine screws and nuts.  I'm keeping the other connected to the breadboard circuit for the final pre-completion test.

Next Steps:

  • test the circuit again
  • construct the circuit on an +Adafruit Industries Perma Proto Board and mount it on standoffs in an Altoids Tin with insulation on the bottom
  • test and rework as necessary
  • solder everything up and go


Here's what it looks like at this point:
Right view. Note the limit switch on the front.
Front view (driving wheel, motor. limit switch)


Rear view (moveable wheel assembly, hinge)

Left view (motor protruding through hole)


Monday, August 24, 2015

+Adafruit Neopixel Tiara on an Actual Tiara- Almost Built

Design change:  I have ruled out the CR1220's (not enough battery life, too hard to change), and the CR2032's (too bulky). +Becky Stern  was trying to push me towards a LiPo battery, and I resisted...but finally realized she is right. The 100mAh version is small and the right size to fit the tiara.

I sewed eacghneopixel to the tiara using silver
thread.  Here's the first, ready to go..
The "V2" on the back side happens to be on the
"data-in" pin, so I started there with each one.
Here's the tiara with pixels shown. I'm still have to clean up the stray threads.
The sewing took me an afternoon (not an expert), but I got it done and it's not too ugly.

Next I soldered the neopixels together (+ to +, - to -, DO to DI), then connected the Gemma to the first neopixel for a test, using alligator test leads--see the video. The soldering took a couple of hours. For each wire, I used calipers to measure the distance between neopixel pads, stripped 14", marked the desired length of unstripped wire (from the calipers), cut the wire 1/4" beyond, and stripped 1/4" off that end.

I did the data bus first, and used stranded wire.  That turned out to be a huge pain--it's too flexible and the ends are hard to deal with.  I switched to 22awg solid core wire for the power and GND busses. Much easier.  I will go back to stranded when I wire the Gemma, because I will need the flexibility.

Also, I discovered (or remembered, not sure which) that Gemma has an on-off switch on board.  That simplifies this circuit (I don't need to add a switch).

Next:

  • trim stray threads and wire to clean up as much as possible
  • re-sew at least one of the neopixels (some threads got burned during soldering)
  • secure and insulate the threads and wires with nail polish
  • add the 100mAh battery
  • glue the Gemma to the tiara
  • solder the Gemma connections to the circuit, attach the battery to the tiara.


Parts list:

Saturday, August 22, 2015

+adafruit Neoplxel Tiara on an actual tiara

This is an ongoing saga. I got the idea to put the neopixel tiara on an actual tiara for my granddaughter's Nursery School graduation in June. I could not find a suitable plastic tiara, and the the metal one I built needed so much insulation that it was ugly. Also, the Gemma and battery back make it unwieldy for a 5-year-old. Here's a video:



I found some plastic tiara's that are not great but the may do the rick. Here's a photo comparing the two:

I took the metal one down for her graduation, and I brought my spare, unwired.  She wore the plain tiara all day every day, but was not impressed by my circuit--as I said, ugly and unwieldy.So, back to the workshop. I'm planning something for her 6th Birthday this Fall.

I got lots of help from Becky Stern of Adafruit, on air on Wearable Wednesday, and on the Adafruit Support Forums. The code is the same as my Twinkling Daffodils, except that I use a different pin on the Gemma than I did on the Trinket for the Daffodils (convenience).

I took out another Gemma and programmed it.  BTW, since I last worked on this the Arduino IDE wend from 1.6.3 to 1.6.5.  I had 1.6.4 installed, with the Adafruit boards added in.  After I upgraded to Windows 10 last week, I upgraded the IDE to 1.6.5.  It was a completely painless upgrade.  I didn't have to reload any of the Adafruit stuff or any drivers, and Windows 10 did not interfere at all.

I plan to glue the Gemma behind the middle of the tiara, sew or glue the 6 neopixels in the loops (as in the metal one), and glue the battery pack to the front of the comb.  I can try CR1220s, but they will provide 40mAh.  With 20A for the Gemma and 20 for the neopixels (varyung colors and brightness and not on at the same time), they might last an hour.  (Thanks to Becky's tutorial on batteries.) The problem is that it's hard to change them.  I may have to glue a CR2032 battery holder, or maybe use the sewable holders.

Anyway, I have a fun project to work on while I'm doing the Robot Cart at the same time...and, Halloween is coming!

@MAKE #Electronics Experiment 32: Robot Cart (Part IIA-Better)

3rd attempt at the cart.  Used a hand saw this time, and my handy drill. I marked Xs on the pieces I want to cut out to remind me what I'm doing.

Cart is now fabricted.  You can see some damage from bending the frame, but it will do for now.  I may redo it if I like the final product and want to showcase it.
OK, so I can't follow directions. It's a good thing I bought 10 sheets of ABS, because I have ruined 2 now, and may need another.  I got through my measuring, drilling and cutting, only to see that I pu the cuts on the wrong side.  So, I measured and drilled again...that's the top photo..and took the step to mark the pieces that wanted to cut out.

I made the cuts. used my heat gun to soften the plastic, and bent the sides.  I left the final cuts (removing the short pieces on what would become the top) so I could bend those into a position to cut them.  It was ugly.

I'd like to say that I started on the wrong side on purpose (one side is textured and the other smooth), but it was by mistake. It turned out to be almost OK because I had significant shaping and deburring to do, using my Harbor Freight Dremelish tool.

When I bent the frame back to put the textured side out, there was some damage (see lower photo).  It's usable as-is, so I'm going with it.  If I really like the cart when it's done. I'll redo the frame.

Next:
By some 14" plywood, the hardware (hinge, bolts, nuts, screws), and maybe some 3" disks to use as wheels,  as suggested by James Floyd Kelly.

Friday, August 21, 2015

@MAKE #Electronics Experiment 32: Robot Cart (Part II)



So, carpentry and fabrication are not my strong suits. Evidently I'm not real strong on following directions, either. Anyway, this is pass one, and I'll keep at it.

The good news:  I proved that I can use the 12"x12"x1/8" sheets of ABS (that I bought from Amazon about a year a go thinking they's come in handy) for the main cart body.  They're not thick enough to screw into, so I'll add 1/4" plywood, or maybe see if I can find 1/4" ABS.  I was able to cut the sheet to 9"x8", drill holes for rounding corners, then cut the rest, and use my heat gun to soften it for bending into shape See Fig. 5-92 on p. 275.

Problems:
  1. I used the wrong saw. That's why the cuts look ugly.  I knew that, but I bought a reciprocating saw at Harbor Freight and have been dying to use it.  I'm going to a hand saw, maybe a coping saw. 
  2. I drilled 3 of the holes in the wrong place. The idea is to have 1/2" diameter holes to round the 4 corners of the cut ABS, but you need to drill the holes in the inside of the cut, not the outside (that's why you see some holes that don't appear to be random--they are just wrong).
Other than that it's great.  I'm ready for pass two, and I learned a lot.

Tuesday, August 18, 2015

@MAKE #Electronics Experiment 32: Robot Cart

I'm ready to start on this. First step was to gather the materials.  The parts list on page 268 is incomplete, although on p. 276 there's a "you will also need..." See the schematic on p.277 and this blog post by +James Floyd Kelly  (it's on experiment 31, but references shopping for 32). The 50K potentiometer shown in the schematic controls the time the motor runs in reverse before going forward again.
Make: Electronics by Charles Platt, Figure 5-98. p.277 (in the edition I have)

Also, the erratum on p. 277 mentions adding a diode or transistor. I'm going to try a diode (handsonelectronics says diode).

I found that my DPDT relays on hand are not appropriate. Some are latching relays bought for experiment 20, and the other was 12V, so I ordered two 5V DPDT non-latching relays from Amazon.

Charles spends a great deal of time on fabrication and not much on the circuit.  Since I care more about the circuit, and there are some issues with it, I'm going to build that first. I'm going to try to use plastic for fabrication. I have some 12"X12" pieces of ABS, and the shell of a multi-function printer that I tore-down.

Here's the concept:
When switched on, the cart moves forward until one of the microswitches hits something, it cuts power to 555 Trigger Pin 2, causing the the Output Pin 3 to pulse the relay, which then flops, reversing voltage to the motor, which reverses. The timer cycle (determined by 555 Threshold Pin 6 and Discharge Pin 7 as powered by the capacitor/resistor combination along with the Pot). When the cycle ends, the Output Pin 3 goes low and the relay flops back, causing the motor to reverse again (making it go forward).

The time it reverses starts at ~5 seconds (47uf cap*100000Ohm resistor = 47//1000000*100000 = 4.7). The Pot did not make much difference, if any. I thought it did, but it turned out that I had unhooked the 100K resistor. DUH.

I had other DUH moments in this, but I was helped immeasurably but people running into the same problems I did, particularly +James Floyd Kelly .  Thank you James. First, I bought a 5V gearmotor from robotshop .com. I fussed around for way too long trying to figure out how to wire it--then I noticed the two copper tabs on the neck.  Second, I was getting weird buzzing from the relay, and the motor was not reversing. I remember the symptoms from James' blog. My relay had different pinouts from the schematic. There are 8 pins. If you number them 1-8 starting with 1 at upper left and go counter clock-wise, I needed to switch pins 2 and 3 on one side and 7 and 6 on the other.  I could not find a datasheet for this relay, but I had a similar issue once before with another DPDT relay, so I guessed.

Third problem was the diode,  The motor would not reverse, but fortunately I had seen this before (thanks James), so I added the diode across pins 1 and 8 of the relay with the cathode towards pin 8.

I also struggled with wiring the switches.  I tested it with just the switches, power supply, and a meter, and came up with:
555 Trigger Pin 2  to switch1 NO prong, connected to switch 2 NO
Both NC Prongs connected to GND
Both COM prongs (on the side--at least on mine) connected to GND

If neither switch is pressed, current is flowing to the trigger pin through the 10K pull-up resistor making it high and thus the output pin is low. When either switch is pressed, the trigger pin goes low, making the output pin high, and flopping the relay and reversing then motor.  The output pin stays high until the 47uf capacitor dishcarges (4.7sec) to the threshold pin, making it high and setting the output pin back to low, flopping the relay back and the moving the motor in the original direction.

It works.  Here's the video.

Monday, August 17, 2015

Windows 10 may just be worth the price

I upgraded 4 computers to Windows 10 with the free offer, and assisted with a fifth.

So far, when it works it seems to be OK. However, there were problems.

Note that the Microsoft support forums indicate that these have been around since early in the pre-release process, so Microsoft is well aware of the problems. They choose not to fix them before releasing the product, and  even more inexcusably, chose not to warn users that these problems were possible and provide a simple workaround.

Critical Error:
Screen flashing, making PC unusable (2 out 5 computers)
After installation, everything appeared to be OK, then I entered the log-on password and the screen went bonkers.  There was a simple fix for this (ctrl/alt/delete, Task Manager, More Details, File/Run Net Task, msconfig, services, then battle the flashing screen chaos to find "Problem Reports and
Solutions Control Panel Support" and "Windows Error Reporting Service" and untick them.  It's very difficult to spell msconfig with the screen blinking wildly, but perseverance is rewarded. Reboot and it's OK.

There were 16 pages of comments on this on the MS Support forum, and I soon as I encountered it, my brother called to say he got the same thing (he's the 5th computer). So, this is something MS let happen to their users, with no help.

Serious Error:
Unable to set up a Homegroup
This is another that was widespread.  Click on Homegroup, there's an option to join a homegroup. Follow through with the old password  and MS tells you it can't find the old Homegroup but won't let you create a new one.  The answer, for me, was:

  1. Shut down every computer on the network but one 
  2. on the running computer, go to C:\Windows, enable hidden file acesss (file explorer "View" tab, tick "Hiden Items" )., then navigate to C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\PeerNetworking and delete everything that starts with "idstore" (there may be 1-3 files). If the files aren't there, try another computer (after verifying that you can view hidden files).
  3. reboot
  4. go to Homegroup, create one, and write down the password
  5. start up each of the other PC's, click Homegroup, join, and give the password that the first one got
Serious Error:
The above worked on the first computer, then I was able to add 2 more.  On the 4th, however, I got a message, after entering the password, that I needed to enable IPv6.  I checked my adapter configurations, and saw that it was enabled.  On the interwebs, I found that I needed to edit the registry (search for regedit and run it, then navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip6\Parameters and double click DisabledComponents to edit, and set the value to zero.

First problem: there was no Parameters entry under Tcpip6. I pointed this out to the MS Engineer on the support forum, and got no response. I thought about it for a while and wondered if wireless was an issue.  One of the other computers that upated successfully was wireless, but... So, I disabled wifi, shut down the computer, plugged in an ethernet cable, started up, and viola, I had the registry entries listed above. I updated DisabledComponents to zero, exited regedit, and rebooted.  I was able to join the Homegroup.
This is another common problem, although not as widespread as the others.


These are what are known in the business as bugs.  Users have a right to expect that known bugs will be fixed or that simple workarounds will be provided and that users will be warned ahead of time.

There is no excuse for this.



Tuesday, August 11, 2015

Sketchup vs 123D Design

Let me say from the start that this is not a fair comparison.  When you start using anything, you have a lot to learn.  I started with SketchUp, found it (and me) lacking, and decided to explore 123D Design.

Criterion #1--free. Both qualify.  Why these two?  SketchUp is well-known, and 123D Design is used by the guys on +Adafruit Industries 3D Hangouts (+Noe Ruiz an +Pedro Ruiz). 

I bought a generator this Spring (Harbor Freight, 7000W) and decided to build a house for it.  Since I needed plans, and since I am threatening to buy a 3D printer, I decide to use the opportunity to learn a design tool for 3D models.  I started with SketchUp.  There are some very good tutorials, but my complete ignorance really got in the way. I was able to create a model, and then a beeter one once I figured out that I messed up by leaving stuff around and inadvertently combining sections. Here's the second try:

This was good enough to build the house, but there was enough stuff that was wrong and/or didn't fit to make me want to try something else, so I went to 123D Design.

123D Design documentation is awful. There are a few tutorials, but they're short and basic. Using what I'd learned from SketchUp I was able to start. I needed the tutorials, because there are enough differences to require that. Once I got started, I went to one of +Noe Ruiz's "Layer By Layer" videos on the adafruit blog. I learned enough technique to be able to use the tool. Here's what I wound up with:

I made some more design decisions in the process, but I like this much better.



The moral of the story may be to keep working at it, but I think I'm going to stick with 123D Design. As I said, it's not a valid tool-to-tool comparison becuase I was learning through the whole thing, but I thing 123D has a better interface, even if it is undocumented.  With +Noe Ruiz 's help, I'll master it (or at least get good enough).

@MAKE #Electronics Experiment 31: One Radio, No Solder, No Power with thanks to @sqfield (+Simon Field)

This is one of those things I've wanted to do for over 55 years.  If I'd only had more motivation and more support, I would have.  Water under the bridge, so here's my attempt now.

First of all, contrary to Charles' title, there was solder: I was too aggressive with my stripping to create the tapes in the coil, and cut the wire, so I had to solder the two pieces together and add some heat shrink for insulation.


Parts ready for assembly: coil with taps ever 50in, wrapped around vitamin bottle, spool of solid core 22awg hookup wire for ground--40ft left after the coil, germanium diode (on top of the white spool), 100ft og 16awg stranded wire for antenna, piezoelectric earphone, hose clamp to connect ground wire to water pipe. The earphone I bought (from SciToys) has a plug on the end, so I bought a jack for it from Radio Shack and connect the ground and earphone wires to it.

This is +charles platt 's experiment, but he directs the reader to scitoys.com for parts. This website, run by +Simon Field, has a wealth of fun projects.

Before adding the coil and the antenna, I tried a couple of suggestions from SciToys. First, I touched one end of the diode to a water pipe for ground and the other to the ground contact on the phono jack. I held the audio input (left, because it's a stereo jack and the left is where the contact on the mono earphone is) to use my body as an antenna. Got nothing.  Next, I taped the hookup wire to the water pipe and cut off a length of wire that would allow me sit in a chair on my patio, and connected that to the ground on the jack with an alligator clip.  I connected one end of the diode to audio input and held the other end, again being the antenna. Still nothing.

There is an AM tower within about 3 miles, so I think I should be able to get something. Next, I tried adding the coil and the 16awg antienna.  There is lightning in the area for the next couple of days, so I stayed inside: I ran about 60-70ft of wire up the basement stairs through the living room and around the family room. Then, I went back to my basement workshop and assembled what you see in the photo below.
The black and red wires at the bottom go to the water pipe and upstairs.  The green alligator clip lead goes from ground on the jack to the taps on the coil. The red alligator clip lead goes from the diode to audio input on the jack. The paper clip hanging from the tap (upper left) marks where I heard something.
When the weather clears I'll try the antenna outside, but here's what I got:

  • I heard static right away in the earphone
  • When I moved from tap to tap, the static went away--silence
  • At one pint, on one tap, I heard some Spanish--SUCCESS! I couldn't get it back, but I'm happy
I will post again after I move outside. I have some other components too, like a variable capacitor and a coil+ferrite rod, so I will plan adding those while I'm waiting for the weather to clear.