-
Respite Randomness
07/27/2017 at 09:40 • 2 commentsI've been on a few days Respite. While Bea goes off to spend time with her mates and have a laugh, I kick back and chill out. Plus I'm not bothered about the competition now and have de-stressed considerably. I should not have entered in the first place; it put pressure on me I dont need and to be honest winning anything significant is pointless really.
I could buy my house I suppose, then I can run a business out of it.
But a residency I couldnt use would cause me pain, and little cash prizes only prolong my suffering; the reality is I'm just fucking about with servos and scrap. More servos and scrap aint going to change that, and I cant even teach, let alone manufacture or supply anything in a poxy little council maisonette. All I get to keep of anything I earn unless I work full-time and get off benefits, is 20 quid in a week.
Would you give the government 90% of the commission on one of your paintings? Doubt it, even if you didnt want to flaunt working for more than 16 hours in a week to produce one. Honestly, the only reason I do anything is because I get suicidally bored sat on my arse waiting for Bea to snap her fingers otherwise.
Anyway...
I managed to do a bit of research on a missing component I needed to make reliable flex circuits. I have some etch resist I bought as a kit. It worked great, but the developer and literature for it vanished during the move and I hadnt seen either since. Still didnt have developer, but at least I know what it is now.
NaOH... Hmm, sounds familiar, Sodium Hydroxide...
Probably the last of this I'll be able to buy over the counter, thanks to the morons who will use whatever is to hand to hurt others as well as their own stupid selves. I'll be careful with it, like I would the sulphuric and hydrochloric acids I can no longer obtain. As it is I'm reduced to metal-salt etch because the alternative is Ferric Chloride, which is nasty, hard to dispose of, costs a fortune and is only available mail order. I have Bicarb and Copper Sulphate though, both are better than table salt. About a table-spoon of this per litre of water should do it, and I can just pour it down the drain the same as the etching solution.
I had a spot of bother with the communications in the processor board. It seems the CP2102 is setup to drive the 5v Atmels at 3.3v level, which works ok. That means I shouldnt need a level shifter so the ESP module can talk to them over serial. I will need one to step down the voltage when the Atmel talks back though.
So I've added a 3.3v Zener and some current limiting resistance between them. This is in programming mode, the 6.8ohms dont affect the USART, and the Zener just blocks the Tx voltage from ground as it should. In run mode the ESP Rx is driven by the 5v Atmel Tx, however this drives the Zener into breakdown and it bleeds off the excess voltage to ground.
Sneaky
While messing around pulling chips and scratching my head over these issues I discovered a great method of pulling multipoint SMD devices off a board again, useful for repairs and harvesting alike.
Because I only had one 117 regulator handy and suspected the chips for the faults, I wound up moving it about a bit and they arent easy to desolder without a hot-gun or oven.
Adding an ESP makes that completely impossible. I've ruined more than one PHH device trying to harvest it or work with it because those edge connectors are delicate at best. They were never designed to be desoldered in the first place...
Using just a fine-tipped iron and a piece of Kapton tape folded in two so it isnt sticky, I heated the pads one by one and slipped the tape between the device and board to break the solder without lifting the device and straining the PHH pads. It works cleanly and simply. :-)I also tried the silicone-paper backing from the metal tapes, which works but not as well because it's thicker and frays. And regular paper is also a little thick, frays, and drags the solder everywhere but also works in a pinch.
Just Garbage
I've had a chance to cool down and not just blame my tools like a bad workman.
I have barely used these since I bought them, one had a ZIF socket because I used it as a programmer for raw chips, and it was more often than not tied to the other one for flashing.Strike 1
Despite this, one of the Uno's has a dead 117 regulator, so when I jumpered the ADC to 0v, 3.3v and 5v, I got a reading of 0 instead of 640 in between the 0 and 1023 I expected to see. I only discovered this when I tested it with a multimeter. I didnt suspect it was broken, because the other one behaved the same.
Strike 2
That one has a broken trace somewhere and the ADC doesnt work on that one either. The 117 is ok on it though. Being 5v Arduinos, the digital ports work just fine.
Steeerike 3, you're outta here
The FTDI chip in the Mega2560 has failed completely. It isnt bricked; I cant recover it by reflashing if the USB port cant even see it, but I can still use the 2560 via a USART and power it from USB. The ADC works perfectly, throwing me into confusion as the chip isnt swappable.
Stinking up the place
Just to add insult to injury, I upgraded the IDE so I could program the ESP with it, the old version doesnt support the binaries. Bad move, Arduino have added a Serial Plotter, like the rest of the IDE its written in Java via Processing. Most people, granted, only have one monitor and would never find out you cant run Inkscape and Plotter side by side. It does something nasty to the display, PrintScreen cant capture it and clicking on Inkscape just segfaults it all the time Plotter running. I lost hours of foot templates I had minimised and forgot to save before testing the comms, and it only blew up when I maximised it.
And that, my friends, was responsible for me not putting a walking robot in the competition. My motherboard, had I been brave enough to parallel-test the sensors and it together, works perfectly. It was faulty genuine Arduino boards responsible for the chips not working all along.
Bad workman my arse, serves me right for not buying cheap knockoffs and expecting trouble. -
Serendipitous Circuitry
07/21/2017 at 08:26 • 0 commentsI made an interesting discovery while building the brains. Both of the ESP modules work!
I dont know what I did wrong, and I've had this apart and back together again before I gave up. However this is module 1, the assumed dead one I put in there while I was soldering so I could check the wires as I soldered them in.
I pulled the only SMD 3.3v regulator I have off the board and experimentally jumpered the module to take a 3.3v supply instead of 5v, however I didnt notice it was module 1 despite labelling them lol. Forgive the sh*t soldering, like I said its been apart a few times. The regulator went onto the motherboard to drive any module and comes off the ATMega328 supply. I've bodged the wiring on them somewhere as well, they dont power up. I've done something stupid, thats what you get for wiring from memory. Bad Toad.
However, to my surprise the ESP module did work. I knew it powered up, but I never managed to get it to communicate before, sat on its breakout with the regulator onboard.
I swear he just winked at me ;-)
Ewww, Lua. Loaded, Used, Archived... I have a problem with the plethora of general-purpose languages that have sprung up. I like Python, I like C++. Python is written in C++, shares some syntax with it and basically forms a higher-level and more flexible way to create machine code. C++ of course just does it the hard way, and all languages are ultimately written in it, so the syntax becomes a matter of personal preference. Mathematics and logic are not good subjects to apply preference to, so unless a language has a specific use, it doesnt have a point IMO, and Lua just adds another dialect to the pot. There are exceptions to this, for example MIT's Appinventor was designed specifically to be written graphically in a browser and compile into a framework so it has a rigid syntax and is very hard to type and read so it was necessary to build an entire language rather than build a graphic interface to an existing one. Lua on the other hand just appears to mash-up some of the more fluid syntaxes from other languages and to be honest I find it confusing. I've written in several different Assembly languages, Microcode, many Basics including VB, Forth, Pascal, VBS, JS, C, C#, Python. I've managed to avoid Ruby and Lua because I take one look at their code and my brain barfs up all the others it reminds me of.
Success!
Finally I managed to get all three processors working after a significant rewire. I've checked and double-checked, but I cant see any difference between the two circuits other than the prototype is a bloody mess...
Much neater and cleaner. I also added pin headers to my programmer board so it plugs into this one, allowing me to flash the ESP. The plug to the left needs a flylead added to carry the reset signal and then the ATMegas can be flashed onboard too.
I can add it to the modified programming interface. This plugs in either way round, at the moment it breaks out the three RX/TX/GND groups into plug headers. Upside down it supplies power and jumpers the three processors into RUN configuration so they talk to each other in a ring for testing. Eventually this will be supplanted with a battery connector containing the just the RUN jumpers and power.
The brain, with programming interface. Now fully functional except for software and pin-headers which I've run out of. Again... ;-)
I just thought I'd add this because it made me laugh.When I bought a set of SMD caps and resistors, plus some LEDs and other bits and bobs with the intention of learning to handle them, I found a strip of resistors marked 000 and wondered in what circumstance I'd ever need them. And even if they were resistors at all, if they didnt have any resistance.
Now I know what they are for...
Recovering SMD components without an oven isnt that difficult. Most of them arent worth having, caps are unmarked and too small to test easily anyway... I folded a piece of Kapton tape in two so it was no longer sticky, and slid it under the regulator while heating the tabs one by one with the iron. A bit of acetone to remove the flux and its good as new. Transistors and other devices including small ICs, and probably even board-on-board devices like the ESP should just pop right off. I'll try this later and see if it is as easy to remove as the regulator.
-
A thunderstorm, how fitting
07/19/2017 at 00:15 • 0 commentsIts flashing lightning and thunder out there so I thought it best to not design on the computer in case the power went out and I lost work. I hate that...
So I tinkered with brains instead ;-)
More Power!
This is the 'Supercomputing' board to power my robot. It still needs harnesses for the servos and a plug-socket for the ESP's I2C port. Thats the strip of pads along the bottom edge. Brilliant breakout design I have to say...
Its a Twinduino at the moment, the pins sticking out under the ESP jumper the Serial RX and TX using a connector block, but this can be replaced with a board containing more processors and/or an RPi to expand it further. I also have a Bluetooth module I can interpose here to communicate with it, with no additional work.
The little board top left is an accelerometer with an I2C interface. Using that and the Serial as a ring system, I can run standalone or jumper in a whole range of other hardware.
This gives me at the moment
- 24+9 x GPIO
- 12+1 x ADC
- 1 x I2C
- 1 x Wifi Access point
- 1 x Wifi Static Network
- 1 x Bluetooth
- 1 x 160MHz main core
- 2 x 16MHz parallel processing cores
- 1 x Multi Device Expansion Port
- 1 x Gravity Reference
- Reprogram the parallel cores over Wifi (uses a GPIO per core)
A shout out to Peratech
I've mentioned this stuff before. I bought it years ago when it was experimental, and its become one of my secret weapons. I have 4 of these embedded in the Quad's legs I was going to recover anyway, but I've found the cache I had tucked away.
I thoughtfully bought a whole bunch, now it's vanished into Industry and is hard to come by unless you buy loads of it. Heheh, I kind of saw that coming.
Its pressure sensitive conductive plastic, which is a b*d to make. I've tried, I'll write it up when I have time to make more because it's simple but not as sensitive as Peratech's.
Why's it called QTC?
Quantum Tunnelling Compound pulls a neat trick. It's just plastic, but it has lots of tiny conductive spiky balls like nanoscale chestnut husks embedded in it. When the plastic is compressed these spines interlock, some touch, most just move closer together. The close-together ones transfer charge via a capacitive effect - the electrons jump across the dielectric between the spines when they are close enough.
Progressive pressure brings more of the balls closer together so the resistance decreases linearly as pressure increases.
This, and the accelerometer, are central to the robot being able to balance on one of it's legs.
There will be three of these built into each foot, and I think I can get away without using hard plastics beyond the little bits of polyethylene already used. Pinching the QTC between the top of the toe and the ankle tube should be enough to get a clear reading off it.
The toes turned out to be a bit longer than I imagined in comparison to the legs so I've made them a little shorter. Eventually the QTC will be integrated into the ankle skin along with the wiring.
I've deliberately left a gap so I can experiment with the position of the pinch sensor, which will be a piece of PET with Kapton and foil contacts folded over a QTC Pill and taped; it just slides into the gap between the ankle and toe. -
Taking Steps
07/16/2017 at 15:09 • 1 commentYou cant run before you can walk, and you cant walk until you can move.
Decal fits into an overall plan, and the ESP8266 fits into this quite nicely with a bit of a shuffle. I'm now working on the software side of things to implement it, having got one working.
I have to allow for certain things in my development strategy, and expansion is one of them. Particularly as you've decided to make me walk right now. Using this arrangement means I can jumpstart walking, just by embedding a ring-token protocol in the ESP8266 along with the access point and network bridge.
I can add the Pi and camera system later, as well as the mobile interface, as well as another processor for sensors in the return path if I wish, and I still have I2C spare on the ESP. I can also address as many servos as I like just by adding other ATMegas in the chain - they all have identical software onboard and are configured by software.
The software on the ATMegas is not complex:
- Listen on Rx for data packages
- Pass data packages on Tx not for their servos
- Acquire sensor data and send packages on Tx
- Sequence any data packets for their servos
And the ESP is very similar, except that it integrates command and sensor data with the PC so I can develop the walking routines on that, cutting out everything else for now.
I'm not being hissy about this, the whole point of Decal is to vanish the contents of that drawing into a layer that sticks to stuff and animates it, so if you want animation now its not going to be pretty.
OK @oshpark, you win this round. ;-) I'm getting old, and although I'm still flexible I cant do it as quickly as you can anymore. My interconnects are ribbon for now, until I get a reliable repeatable process figured out to make these circuits.The circuits are complicated enough in two dimensions...
The sensor circuit travels down the limb and wraps round it on 3 levels, with four independent sensors on each side of the limb. The system supports up to seven levels (or 4 layers with 7 sensors, or a combination).
Feet and a platform on top are next. Because the leg now has 4 servos opposed in pairs, the foot can be oriented parallel to the platform regardless of location under it. This also makes it really easy to calculate the servo angles.
-
Scrapped
07/04/2017 at 14:36 • 2 commentsThis I really dont understand. 400+ views, 6 skulls, no comments.
Thanks for the support from those who did like and follow, please see #Cardware for further development of the flexible circuits and aesthetics.
I'm using the advances I've made directly in Cardware instead; This is a one-shot hip template that can build an Origaime-style corrugated card part, or a Cardware-style cardstock one, or a DECAL-style composite one. Decal's architecture solves the wiring problems with both construction paths, and also adds compressible sheet materials to the extensive list of things Cardware already builds with.
Parts now use Decal's pre-adhesive layout instead of glue.
-
Gnarfle the Garthok
07/01/2017 at 17:14 • 1 commentThis looks overly complicated, and it is. Mostly because I need to learn the maths involved with flexible architecture, but also because its the only way I can skin this beast without using proprietary software.
The skin geometry is only the beginning.
In order to get the body to flex and transfer weight over the leg BOA stands on while moving, I'm using Bendertech. This isnt trivial, to give the processor an idea of the body position and estimate the weight distribution it has to model the response to the servo position.
Back in the real world, after a bit of tessellation to get this through the printer on two pages of A4 the sticky-back plastic and double sided tape brings this to prototype. I save the backing paper from the sticky-back plastic, more on this later.
The other side contains the touchsense circuitry same as the limbs, to make it simple it's applied before cutting around the perimeters of the segments. The foil crossing them is isolated by a layer of parcel tape that covers the upper half of each segment, forming a shield for the 'cabling' from the outside.
Each of the parts joins together with a cable.
The Kapton tape arrived, and I spent a couple of days swearing at it and the even-more-unmanageable copper foil tapes until I learned how to handle them. Those tracks are barely 2mm across, and are cut from a 10mm wide reel by removing it from its backing tape and applying it to the larger backing sheet from the sticky-back plastic. This makes it easy to scalpel and layout the parts, make layers with cutouts and complex outlines and produce a single circuit that peels off a backing sheet for application.
These interface directly to the flexible circuits in the limb decals too.
I discovered that the tape I bought does not have conductive adhesive. In a way that's not so good, it makes it harder to interface to the copper, however, it does mean I can apply it to a backed sheet of Kapton and chemically etch much finer circuits out of the 10mm tape. I can get away with limited spot-solder connections to bridge joins in the tape, and the backing and adhesives on all of them are chemical resistant. A bit of salt water wont harm them in the slightest, just as well because although I can work at half that scale, I cant cut the copper any finer than this without it tearing.
Plenty good enough for the body connections, but the limb cables have to be much finer.
-
DECAL From Scratch
06/27/2017 at 13:19 • 0 commentsAbout 6 hours uninterrupted hacking.
While Bea is on respite for a few days I can put linear hours into building and concentrate fully on what I'm doing. I only get this once a month so I make the most of it.
I decided to build a limb from scratch, photograph the templated parts and then video the final assembly. I'm also working on a better foot, I'm not happy with it and it needs another servo in the ankle anyway.
Laminating the printed skin with transparent plastic...
Cutting out the templated parts in sections for their procedures...
Adhesive goes on the bracing parts directly, they dont have any active circuitry...
So they attach straight to the polystyrene...
And can be cut out with a pair of scissors, then glued together with their own adhesive patches...
The finished cross brace parts...
Servo mounts and integrated connectors get the same treatment, they attach directly to the skin...
Then cut them out ready...
And add solderable connectors using double-sided tape... I've used Polyethylene for the bearers themselves, superglue wont touch it.
Connections to the front face are accomplished with a strip of copper... The horizontal foils are isolated from each other, they are covered with sellotape first and then the vertical foil covers that for shielding. I only want the horizontal faces to be visible from the outside to body fields, the 'cables' will interfere so they are behind an isolated foil.
The through-connectors are then soldered together with the front face connection. This wont be necessary when the new tape arrives, just lap it and the adhesive takes care of the circuit...
This is then covered with sellotape to isolate it from the next foil and so on.
... Lunch ...
-
Flexibility
06/25/2017 at 09:14 • 2 commentsTurns out I wont need to use cabling. According to Hackchat, OSHPark are in the process of rolling out flexible PCBs, an exciting development well suited to DECAL's architecture for a production run.
Meantime, it gave me an idea. Instead of messing about with ribbon cable connections, and trying to stuff a lot of cores through each successive joint on a limb I could go directly to flexible circuit, which would also allow me to spread the components into the limbs more easily.
A little bit of research tells me flex PCB is no more than Kapton and copper foil with a bit of etching. I can easily obtain small quantities of both Kapton tape and copper foil tape from eBay, and I have etching fluid and photo-resist spray, transparencies and an exposure box.
It shouldnt be too hard to create the limb parts so they solder together in a line. Using a single ribbon this way means I can run it up the limb on the servo actuator side and put an S in it beside each servo with enough slack to allow the joint to flex. From experience I know this configuration will stay tidily inside the joint axis; it's the same as the flex connectors in all manner of equipment with shuttles, like CD players and floppy drives.
Hacking Copper
I've got loads of aluminium foil tape, which is easier to get hold of than copper foil, and a lot cheaper. The only problem with it is you cant solder to it. Well, you can, but it needs a bit of tricksy chemistry to get the solder to alloy with the aluminium.
Turns out this doesnt work on aluminium however it does work on things like nickel and brass. Alu forms an oxide layer faster than the copper is laid down and the result is small beads of copper building up on the surface.You can see the plating building up in the bead. I got quite excited at this point, about 20 minutes in.
Unfortunately, after I gave it another 10 just to be sure, it was completely useless. The solder itself broke the beads away when I tried soldering it.
However I have discovered an alternative. From RapidOnline's documentation:
Which will make things like this a lot easier.Card prototype is solderable, but Kaptan would totally rock. I've been meaning to get some for ages...
This has 11 layers in it in places... And I managed to clip all of them with the scalpel and shorted the entire thing out cutting the servo port. D'Oh!
-
Stickin it to IT
06/24/2017 at 17:45 • 0 commentsI managed to find some decent double-sided tape to experiment with, and it works even better than I expected.
DIY Badge Engineering:
Custom Skin
I had a bit of bother using #TweetyPIE to build the skins with. It uses Python Imaging Library's Transform function which is a pain in the butt to use. For starters I'd need to rewrite it to take a rectangle and produce a polygon, at present it does the opposite.
It also doesnt handle curves or complex polygons, so I wrote a routine to morph one shape into another and used that to custom-fit the design.
It is fairly simple, it scans the shape bitmap line by line and finds the drawn portion, then scales the entire source image line to cover it.
from PIL import Image srcim1=Image.open('decal_im.png') # get the source image bitmap srcmap1=srcim1.load() # get the source pixmap into an array srcim2=Image.open('decal_sh.png') # get the source shape bitmap srcmap2=srcim2.load() # get the source pixmap into an array W,H=srcim1.size # get the width and height dstim=Image.new('RGBA',(W,H),'black') # make a new image to hold the curved copy dstmap=dstim.load() # get the dest pixmap into an array for y in range(H): # iterate rows x1=0.0 # reset left edge to left border while srcmap2[x1,y][:3]==(0,0,0) and x1<W-1: # look right for black pixels; x1=x1+1 # if a black pixel increment left edge x2=W-1.0 # reset right edge to right border while srcmap2[x2,y][:3]==(0,0,0) and x2>=x1: # look left for black pixels; x2=x2-1 # if found decrement right edge if x1<W-1 and x1<>x2: # avoid empty lines dw=x2-x1 # difference in width between borders and edges c=1.0/(W/dw) # coefficient of this for n in range(W): # iterate columns dx=(c*n)+x1 # calculate new position of pixel if dx<=W and dx>0: # if the coords are valid r1,g1,b1,a1=dstmap[dx,y] # get the pixel at the destination r2,g2,b2,a2=srcmap1[n,y] # get the pixel at the source r=r1|r2 # binary or them together g=g1|g2 b=b1|b2 dstmap[dx,dy]=(r,g,b,255) # write the dest pixel dstim.save('decal_cmp.png') # save the composited image
-
BOA 367
06/19/2017 at 13:40 • 0 commentsI've accidentally found a name for the robot I'm building using DECAL.
BOA isnt a snake tho. It stands on two legs to walk, so its going to need feet...
This is a major departure from the other parts I've done, so its a bit experimental. I've worked out geometry for the limbs already with Cardware, so I'm trying to match the style.
Each foot stands up on three toes, two at the front and one at the back. I had the idea to make it springy under the weight of the robot, but I suspect it will be only marginally so. The two layers are already very stiff, with a layer of PVA creating a stress across the arch it doesnt bend at all.
There is also another layer tensioning the arch underneath. This does a better job than the PVA which relaxes a little. I'll replace this with a layer of double-sided tape which will be an instant and solid fix.
The hinge mechanism to stabilise the joints turned out to be easy too, although will require a little bit of engineering to make a bearing that mates with the laminar adhesive. I've used a Felting Nail, cut down and glued in line with the servo actuator shaft on the inside of the leg section.
It still needs a bit of tube glued into the hip section so it doesnt wear away the polystyrene there.
Note the light catching the polymer skin makes the scales look disturbingly arterial with the cabling underneath. I wont make any jokes about serpentine blood supply, I promise. ;-)