25 April 2020

OMG do old blogs ever die?

Can't believe this is still here. Well, what does one do when one finds a soapbox? Yeah! There's just one thing I feel a need to throw to the wind right now, in this time of COVID ..

Could we just PLEASE stop calling it 'lockdown'? PLEASE?!


Honestly, if you're not actually in prison, in what way are you 'locked down'?!

But words matter. And if you hear this irksome phrase 5-6 times every minute, it can wear on you. I think maybe people might be getting just a little crazier than they otherwise would, from this hammering on the implicit idea that you don't have a choice. You do have a choice! And most sensible people are voluntarily making the most sensible choice, which is to stay home and stay out of it. There are no damned locks here.

22 March 2018

Wow, this thing is still on

Surprised it's still even here, let alone functional. Hey kids, I got some notices from The Man that I have to tell you whether the page you're looking at uses cookies. Does it? IDK! I'll say this about that -- I personally am not trying to put cookies on your machine. If the mothership is, well, they claim they will have showed you a notice about that. How the world has changed.

01 September 2013

Mobile Posting Test Post

This is a test of the Mobile Device Blog Posting System. This is only a test! Brrrrrrrreeeepzzrch Welcome to the most boring content on teh internets. This is only a test. If this had been an actual blog post, pigs would almost certainly haven taken wing.

10 September 2010

Reading Stuff

Read five books in the last month or so:

Jack McDevitt's "Seeker", and "The Devil's Eye". These are both 'Alex Benedict' books, set about 9000 years in the future. McDevitt's not quite as hard SF as Niven or Baxter, but the stories are entertaining, and completely free of the teenage undead and squinty-eyed CG soldiers that seem to be displacing real SF from the SF shelves.

"Bad Boy" from Peter Robinson - this is the latest in a mystery series set in contemporary England primarily about detective (DCI) Alan Banks and company. While some of these are centered on murder investigations, in this one it gets personal for Banks. Burgess loses breakfast! I couldn't put this down, and read it in two days.

Gillian Bradshaw's "London in Chains" is a historical fiction that follows a woman who goes into the printing business in the 1640's. Considering that in the 1640's Parliament and King Charles each basically wanted the other to permanently Go Away, you can see that printing 'news books' for the masses would be a delicate proposition. This leads to some adventure with secret presses, some narsty villains, people getting hauled away in the night and taken to The Tower, and the diabolical machinations of Cromwell.

"Dark North", also Gillian Bradshaw, another historical fiction. This is set in Roman Britain, about an auxiliary scout who volunteered for the legions in Africa and ends up behind enemy lines on the barbarian side of Hadrian's Wall. Good adventure.

Labels:

02 June 2010

How to Get a Song Un-Stuck from Your Head

If you ever get an annoying song stuck in your head, it can be maddening, can't it? Like auditory hiccups, you just want it to stop. So I thought I'd share a trick that works, for me anyway.

First, find a source of music. Radio, iPod, Pandora, whatever, you just need some way to put other music in your ears. "But wait, I've already tried that", you say. But wait, there's more! Here's the trick: while playing the external music, try on purpose to recall the annoying song. It works best when the external, real music is kind of similar to, but distinctly different from, whatever's stuck in your head. By this I mean, if it's rock, go for different rock. If it's jazz, different jazz. In fact you can even use other songs by the same artist, but what really seems to matter most is that the tempo differs.

It's kind of a combination of two other tricks. One common cure is to find a copy of whatever it is, and play that, the other being to play something different and try to 'dislodge' the bothersome tune.

In the first approach, the idea seems to be "let's have it done with by hearing it end, in reality". Your mind is producing 'A', and you apply 'A' to your ears, and you hope to mesh up what happens at your ears with what happens in your mind, namely, that the song will stop.

The latter approach seems to hinge on the notion that, "if I hear something else, it will go away". Your mind is producing 'A', so you apply 'B' to your ears, and to really drive 'A' out, you focus your mind on 'B'.

The difference with what I'm advocating is that you actually try to mentally reinforce the annoying song while hearing something different. Your mind is producing 'A', you apply 'B' to your ears, but while hearing 'B', you really, really try to imagine 'A' some more.

Ok, hopefully it's clear what I'm describing now. Now you can be done with this post if you like.

Really? Still here? Ok, I think the deal is that, if annoying song 'A' is stuck in your head, you have this group of neurons that represents 'A', and that somehow a group like this can get in a pattern of activation that is self-sustaining. I think approach #1 seldom works, because it doesn't challenge the guilty neural assembly. If anything, it just encourages it. I think approach #2 works better, because at a higher level, you do make your brain switch the focus of attention to another, different neural grouping, one for some other song, but this doesn't necessarily mean that the 'A' group activity is disrupted. It's just a palliative for the consciousness, to divert attention. Once the substitute song is over, if group-A is still firing, you get the dreaded song back again. But if you try to recall 'A' while hearing 'B', this encourages group 'A' to try to assimilate the input from your ears, but the input from your ears is something else, doesn't match, and this disrupts the pattern of activity. If there is some specific quality of a pattern of activity that can make it self sustaining, this method stands a chance of driving the neural state off that self-sustaining track.

btw, had you guessed? I'm reading Oliver Sacks' "Musicophilia" right now.

robot update

Despite not having posted in about a month, there is some progress with the rolling robot:
  • the opto-isolators on the L298 solder-board all have all necessary pull-up resistors
  • the gearmotors and the caster wheel are mounted to the deck giving a close-enough approximation to level
  • i've co-opted my 7A-Hr SLB from r/c aircraft starting duties and strapped that to the chassis
  • the L298 board is mechanically affixed onto the chassis

    Now what remains to do is get the arduino physically mounted and do some wiring. I don't want to mount the arduino too permanently, as this is only a temporary controller just to prove out the motor driver board. To my way of thinking, the arduino is to control logic, as the breadboard is to circuit verification; a flexible, re-usable, temporary measure. Anyway, since it doesn't weight anything and there shouldn't be any strenuous accelerations, it's probably going to find itself tethered in place by the wiring.

    Also the 'duino needs a power supply. Originally, the entire point of creating the opto-isolated L298 board was to have the logic and the motors run off separate batteries. I'm thinking, since I have a pile of 'C' cells, and some battery holders for same, I might just rig a 6-cell, 9V source for the arduino, just so I can say the opto-isolated dual battery thing works. Then I fully intend to dispense with the logic battery and try running the 'duino from the same 12V battery as the motors. Ok, I'll put a serious filter in there, but if the AVR can run from the same battery, then in future, I can eliminate the bulky opto-isolator-and-extra battery setup.

    Now there's a little bit of design to deal with, even in this throw-away prototype configuration. The L298 has three control lines per H-bridge; each half of the H-bridge has a high/low drive and there's an over-all enable. I intend to apply the PWM to the overall enable, and drive the other controls Low/High or High/Low to make the H-bridge function like a big old DPDT switch. Then there need to be some pin assignments.

    Then there's a pinch of software necessary. For this round of tests, I intend to read control input from those paddle potentiometers. The AVR chip on the arduino reads these with 10 bits of precision, for a range of values of 0 to 1023. So the quick-n-dirty 'design' I have in mind is to cut this range in half (bit shift right 1), and treat it like a 9-bit 2's complement number. Input from 0 to +255 will translate to PWM values 0 to 255, with the other controls at Low/High. Input from 0 to -255 will also translate to PWM values 0 to 255, but with the other controls at High/Low. So I should get 255 speeds in both directions.

  • 06 May 2010

    One Step Forward, One Step Back

    Tonight's goal was to get that motor driver board fired up and turn some motors. Well ... things didn't quite progress that far. But progress was made nonetheless.

    The 298 driver board has six opto-isolated inputs, three for each H-bridge in the 298. First step was to tweak the arduino to operate three digital outputs, so at least the 298 board could be tested one half at a time. This was easy enough, just using digitalWrite() on pins 2, 3 and 4. Not having a lot of instrumentation, it would be hard to tell if the 298 board would even be getting any input, so before wiring to that, I connected pins 2, 3, and 4 each to a regular LED in series with 470 ohms to ground. This gave visible confirmation that the test sequence in the arduino was working correctly. The test sequence was just a cycle through all 8 combinations of the 3 bits to control half the 298, sitting about 1.25 seconds in each state, just about long enough to get stable readings on the DVM.

    Next came the 12V smoke test on the 298 driver board, in isolation from the logic of course. The concern here was whether the board was wired up correctly. So I connected the return side of the driver to the battery, put the DVM across the battery to monitor that, and momentarily made contact to the positive battery terminal with the board's Vcc line. Open circuit this battery was showing 13.25V, a little low but not abnormally so for this kind of battery. A couple of quick taps with no exploding capacitors later, I noticed that with the driver board connected, the battery dropped to 10.5V. Not good. The driver board wasn't even driving anything, should be pulling maybe 50mA at most, and the battery should be good for 10 times that current.

    So now for a reality check, I hooked the battery to my r/c plane starter motor and hit the switch. Absolutely nothing. This battery was on the charger all last week in preparation for this, and here it was, dead. Well, it was on the shelf for about four years before this last week. Then I noticed, amongst the other things printed on the battery, there at the bottom, "Replace every 3-5 years". Oh well, that's the step backwards. Did I mention my r/c plane starter? Yeah, it came with its own 12V sealed battery, about five times bigger than the one depicted last post. A quick spin of the starter motor confirmed *that* one was not dead. Back in business!

    The size of the plane battery was a bit worrisome. If something shorted, this battery would make the event just that much more exciting. So, for a current limiter, I used that plane starter motor. It's practically a piece of wire, compared to the L298 driver setup, and it has a switch, and even if the 298 board totally shorted out, the most energy that would be involved would be no worse than that from hooking the starter to the battery directly and hitting the switch, which is the normal operation for those two things. OK, so the circuit under test is now L298 board return connected to battery (-), battery (+) to the starter-motor with integrated switch red clip, start motor black clip to L298 board +V line. DVM across the battery. Brief contacts with the starter switch resulted in (1) virtually non-existent droop on the battery voltage (2) a complete lack of the start motor spinning madly and (3) No Smoke. Time to connect the 298 and the arduino!

    But wait - what to use for a load for the L298 board? The chassis with the motors is too big for the coffee table I have taken over for a lab bench. Instead of using a motor, I put two LEDs back to back, then a 2K-ohm in series with the LEDs, and put that across one of the H-bridge sections. Using two LEDs like this, each one protects the other from reverse voltage excursions. One is biased backwards, but only by the forward voltage drop of the one that's lit. This way it's easy to see which way the current is flowing. Using 2K-ohms with a nominal 12V and figuring 1.5V for diode drop would put about 5mA through the LEDs, just about right for easy visibility.

    Fortunately the 298 driver was working according to the design, there were only a few moments of confidence-shaking loose breadboard wires (typical), and once the wonky wires were tamed I had confirmation from the LED setup that (1) code in the arduino was producing the test sequence, (2) the arduino was in fact driving the opto-isolator inputs hard enough, (3) the opto-isolator outputs were driving the L298N well enough, and (4) the L298 H-bridge was gating the motor-output leads to +12V and ground as controlled by the test sequence. Success! Well, with lights standing in for motors. For half the board at least. I didn't solder enough leads onto the 298 board last night to test the other section.

    And there's tomorrow's plan: get the setup off the breadboard, get some nice soldering done and hook up actual motors. If I get that far, then cable up those archaic game paddles and maybe do some test driving. I mean, load testing. Yeah.

    05 May 2010

    Fired up the soldering iron

    Not letting this robot thing fizzle out, I pushed for more progress tonight. The immediate goal is to put the Arduino Duemillanove on the chassis, tie it through the L298N motor driver to the motors, and try to drive it around with tethered controls.

    Sounds simple enough, until you try it. Tonight's free time was consumed entirely by trying to get that 'tethered controller' part operational. The result? I do now have two potentiometers, in relatively nice hand-held cases, hooked to the arduino, and the arduino producing two channels of PWM, which currently just operate LEDs. The rest of the post is just the gruesome details.

    The controllers started life as Apple 2 paddle controllers, probably dating to about 1978 by the look of them. Just one of those weird sorts things you end up with in your electronics re-purposing bin. Anyway, after no doubt being used for some truly epic Pong sessions back in 1978, then gathering dust for a while, they are now going to be reincarnated as a low-tec robot control input device.

    There are two 'paddles', each one having a potentiometer and a momentary switch, and they are Y-cabled to a 16pin DIP header. (Funny what passed for a consumer product connector back in those days.) Some re-wiring was required. Not sure how the Apple2 dealt with them, don't even need to know, just suffice it to say that the wiring in there was strange, some kind of rheostat/270ohm thing. Whatever. I re-wired them to provide a 0 to +Vcc output, and while in there, rigged the switch to be normally open with contact to ground. The DIP connector plugs nicely into a breadboard, too.

    So with two analog inputs of the arduino, a quick 'sketch' (honestly, that's what the arduino IDE calls a project) to copy AIN0 to PWM pin 9 and AIN1 to PWM pin 10, and there's a demonstration of a system that should be able to provide PWM to actual motors, just as soon as that L298N can be rigged up.

    Here's the arduino, skating around loose on top of the breadboard but jumpered to a pair of LEDs, standing in for the motors, and to the controller input. The 16pin controller input is that large black boxy thing in the bottom center.


    and here's the L298N driver board, and the battery for motive power. That tangle of stuff on the left is the L298N, some bypass caps, and you can just make out the TO-220 case of the 7805 and 330uF bulk cap that will provide isolated logic power to the L298. Motors connect on the left side, and that entire right half of the board is six opto-isolators. Told you it was ugly!

    Anyway, that chewed up a couple of hours, but tomorrow, that 298 is going to trade electrons with that battery, and with any luck at all, the smoke will stay inside the little plasticky things.

    Labels: ,