All finished up this evening, at long last. The wood is swamp kauri, always forget how nice a finish it takes.
I decided to have a go at etching a board rather than using perfboard and am super glad I did, what a neat little process. I'm delighted with the results for a first attempt. Unfortunately after all that discussion about the resistor being in the wrong place, I managed to take it from the right place on my breadboard then draw, and place it in the wrong place on the board =(. It does divide but I only lose .1v or so on the N channel gate by my math.
Did you miss the YouTube link Larry? Or you mean under the hood. It's exactly what you'd expect there's not much to show, a servo for the lid and one for the arm. The head is stuck on the lid by a piece of tig wire holding it at the right angle hah
I would but, you'd find it funnier than the vid itself.
I'd rather you program it the way you would, then if I make a couple more for presents, I can use your sketch xD.
I would genuinely like to see how someone experienced would do it without libraries. I'm not super confident with timers and even if I was, strategically I don't know which bits would go in interrupt routines and the main loop.
Other than mine being a manual hack there are two reasons Id discourage it, one I discovered with these servos in particular I only need 2 pulses to make a servo track for and hold that position, for as long as it's powered up. So my for loops only iterate 3 times when max speed is allowable. And secondly my PWM wave form isn't strictly correct, the off time is fixed and not balanced with the on time for consistent period (i.e.. 20ms - on time). Both may cause other servos to fail or behave erratically. Lucky for me neither matter in this case.
These servos came out of a model helicopter, my guess is they have a "hold last position" function for if the RX fails.
I'll post the schematic when im at my computer later.
Sure, if it can be constructive I suppose but heed above advice as it will likely not work for most I guess...
The sketch and board layout reflects the fixed N-channels gate resistor and is not how mine is but, in any case...
Enjoy, with a grain of salt!
Actually one constructive thing I could add, I lightened my switch by swapping out the spring for one with less stiffness. I opened a few pens and found one that compressed easier. Cut to approx length then stretched until slop in switch was taken up. The servo struggled with the factory switch, but much snappier performance after this. I also machined an extension for the toggle knob, for leverage initially but it was probably not necessary. It does add to the look.
My only other thought is the hit switch function requires the switch to toggle for the function to complete (doing so improved response time). If someone unknowingly put their coffee on the box and bumped the switch, the servo would likely burn out and the circuit would run until batteries were flat. I thought I could timeout that function but that would disappoint the tough users who want to wrestle with the switch. You would only save the servo (not the batt), as there would be no way to power off the LDO with the switch held open, the best you could do is relax the servo then sleep the uC, and it'd require manually cycling. So I left as is. I'm sure there's a clever way around it.
On the code, add a few more comments to help yourself remember 1 year from now ;).
Also, you might want to look into using State Machine coding in future sketches and how to create timers using the millis() function to remove all the delay() calls.
There are some examples of both in the tutorial forum on this web site.
Haha good thought but I don't plan on using the sketch again if there ever was a 2.0.
I'll have a read up on state machine coding. I'm aware of utilising millis but i figured since there's nothing to do during delays, simple was better.
The box joints are done on a jig I made for my table saw. Another trick I was delighted to see work so well. Basically a 2 part sled, the front part you clamp your work to which has a pin the width of the saw kerf as a guide, which can slide between 'fingers' on the back piece (which is stuck in the table saw channels). You make the fingers by ripping a length of square stock the width of desired tenons, and cut it into 2xWidth lengths and stand every second one up.
I'll go fish it out if you want, a photo that might be easier hah.
6v - yes chemically etched, I had 30% hydrochloric acid lying around and bought a tiny bottle of hydrogen peroxide from a pharmacy in town for a few bucks. I'm looking for an excuse to try it again now haha.
The mask was printed on toner transfer paper and ironed onto the board. I exported the PCB layout into photoshop and manually added a bigger 'blob' to each device pad. The editing process per device in EagleCAD was arduous.
This one will do whatever size, if you can be bothered changing the fingers. It looks more complicated than it is but the back piece is just an open backed box with rails, holding a row of square stock alternating laying/standing. Some random size stock is cut at each side to hold them all firm. And the front bit just has a pin that matches the saw kerf. Finely tuned with an angle grinder and drill... So with the work clamped to the front, the saw can only cut an area that the pin can move between.
Pieces tap together tight with a mallet, right off the saw. Obviously only does square joints but it's great for knocking drawer carcasses together. If you were doing a lot you'd run a dado blade.
I too suffer from the tool and jig related sicknesses hah. Cool thread, thanks.
The bit is wrong here, should be 1/4" up spiral.
This jig is for 1/4" box joints, also have one for 3/8".
Use a 1/4" brass bar to set the bit distance from the fence and the bit height is set to 4/1000” proud the wood thickness.