Older blog entries for The Swirling Brain (starting at number 86)

Just a reminder that you can get robots.net on your desktop by using the robomenu widget rss news reader!

1885 downloads so far!

A guy here at work is into pipe organs. He found out that I know how to program and now he's trying to rope me into helping him with the controller. The controller is an Opus Two controller. It has a controller board which does midi and has a smart media card to store instructions, output boards (for controlling the pipes), and input boards (for reading the keyboard and stops), etc. He does most of the work for theaters but also does work for some churches. It all seems interesting but my time is short and to take on another project would just bust me I think. My wife wasn't too keen on it either as she has lots of honey-dos. I have my own hobbies too and not really wanting to take on someone else's hobby. I kind of feel torn because this guy is sort of my mentor right now at work and I don't want to tick him off. Anyway, he wants me to do all this work for free which is another turn off. So, I told him I can't do much right now and left it at that. He sort of gave me the dead-pan stare like I left him out to dry. Oh well

I guess I again have gotten to busy to write. Apologies to myself and others who care. :-)

Hey! I got a new job! Yea! I'm working for JC Penney's in their Meeting Services group! Basically, I'm an A/V Tech guy helping with setting up computers and big screen plasma monitors and making sure everything is working. JC Penny's in Plano Texas has a huge campus of 8 connected buildings each having 3 floors and there's a lower level basement thing too. It's a lot of walking and pushing stuff, but the exercise is good for me! I pretty much like it a lot. The work is fairly easy, the people are really friendly, the building is beautiful inside, etc. I guess I haven't been introduced to the politics yet, so all is great! The only downside is the insurance that was promised turned out to be bad. Instead of being hired by JCPenney's I'm hired through a temp agency, and that leaves a lot to be desired. I'm hoping I'll get hired on relatively soon, but until then I'll be paying huge insurance premiums so my daughter's insurance doesn't lapse. I looked and some insurance quotes online and they're pretty high! So basically, I'll just be working to pay for the insurance only until I can get hired.

I've been selling lots more stuff on ebay! I've been able to make some decent money so that has been supplementing my income. Only drawback is that it takes a lot of quality time to do it which I don't have much of anymore.

I keep hoping I can participate on robots.net. I'm trying to keep my hopes up that I can. I'll try to do what I can. Sorry again that I've been absent through all of these life changes!

Just a reminder that the "RoboMenu" widget can be downloaded for free from Yahoo's Konfabulator site. The site says the RoboMenu has been downloaded 1683 times!!! Wow! I keep the RoboMenu running on my desktop all the time and I love it! You will too! You can keep up with Robots.net news with just a twitch of your eye!

Just a reminder that the "RoboMenu" widget can be downloaded for free from Yahoo's Konfabulator site. The site says the RoboMenu has been downloaded 1604 times!!! Wow! I keep the RoboMenu running on my desktop all the time and I love it! You will too! You can keep up with Robots.net news with just a twitch of your eye!

24 May 2006 (updated 25 May 2006 at 04:23 UTC) »

Well, I took the plunge and posted my LED display module on ebay.

24 May 2006 (updated 24 May 2006 at 08:32 UTC) »

Well, I've been making RBSs still and selling them on ebay. I've tried painting them, but I'm not sure I like the way they come out. I started work on another granfather clock. This is the one that the computer I spoke of before will be added to. I'm not really happy with the elevator system, but I guess it's ok. It sort of warbles a little. The clock face back I made from a thin piece of clear plastic sprayed with frost paint. I sort of messed it up and so I decided to scratch it up, and the texture came out cooler than if it were plain! I really like it! I made the clock hands a nice metalic blue against the white frost backface, it looks kinda cool.

I had a guy in England email me to comission 3 RBSs. I gave him a quote and haven't heard back from him. Probably because the shipping would be $50 a box for 3 boxes!!! Yikes it's expensive to ship overseas.

While working on the Grandfather clock and messing with the analog hands, I thought it would be better to make a digital display for the clock instead. So I looked into making a dot matrix type LED display. I figured out I could fire up 6 5x7 led blocks with one 16f877a pic chip! So I made a PC board and hobbled together some software based on my scheduler code, and incorporated the i2c stuff and came up with a 6 character LED module! It looks pretty cool. You can see it here. (you'll also get to hear some VBS background music on the video that my daughters and I made a few years ago for fun!) The code has one process that updates the display constantly, one process that parses incoming data from a buffer, an i2c interrupt that fills a buffer, and various functions for doing all the commands that get parsed, two fonts one regular and one narrow, and not to mention all the scheduler code stuff. I managed to get it all hobbled together fairly quickly (in a few days?) since I already had a lot of the things made for other projects, I just had to gather them and dump them all into this soup mix. I'm fairly happy that I got it initially working so quickly. So I got to thinking, I went through all this work to make myself an LED module for my RBSs, I wonder if anyone might want to buy one also. So I'll probably test it some more and then put it on ebay to see if it will sell. I haven't seen anything like it around, so it may be something someone might want. I'll probably try to list them around $50 and see if it goes. If not, I'll just use it for an RBS so no biggie if it doesn't sell. For the board, I made it fairly versitile where I could add 9600 baud serial to it later since many people would rather have one with rs232 than i2c. So, there's a header block for the serial, but the programming for it's not done yet. Also, I've added other things, such as address selection, and such, but that's not programmed either. I made the i2c incoming data protocol as if it were receiving serial commands so it'll be easy to adapt the parsing routines to either i2c or serial. It'll just take the text out of the same buffer and parse it. Anyway, it's good and bright and very slick. I'm very happy with it. I'll probably try to make it more fool proof and put a watchdog timer and such in it to try to make it as bulletproof as possible. Anyway, I've been having fun playing with it.

Hey, we might have a new dog! The dog was hanging around our garage and it looked pretty hungry. It was very friendly so when I reached down to pet it, I could feel the poor things ribs really bad. Like anarexic! So I got a couple of bowls out for it, one with water, and another with some old oatmeal cookies we had and the dog just wolfed them down. Well, me and my daughters sat outside for a while and played with it. Of course by then, we tried to get inside, but the dog kept trying to go with us. Finally, we sat out a box with one side cut out and put a towel in it for a bed and it's crazy, but the dog went right in and laid down. So the next morning, we came out, and there was the dog in its bed and happy to see us. Like we couldn't get rid of it cause it found someone who would feed it. So we sort of adopted it or it adopted us. Well, my daughters have been begging for a puppy forever but my wife was the hard one to convince. We decided to fence off the kitchen and keep it there. I mean, this puppy, is really something. It rarely ever barks. It waits to go outside every morning before pooping and tinkling. When we go outside, it rarely goes beyond 20 feet away and is usually so close you're tripping over it. You call it to come back inside, and it does farily easily. When inside, it plays with you when you're around, and is fairly peaceful when you're not. It's like this thing is totally trained to be good. I'm totally shocked. It's really unbelievable. Well, we went to the neighbors around and talked to them about it, but no one knows anything about it. So, we've had it about a week so I guess it's ours now. We named her Scamper Germany Brown. You can see a picture of her here.

At church, we've started having an electric guitar and a bass guitar on stage with the piano and organ. That's really a big step for our church. So far none of the "keen-agers" have said anything negative and for the most part all I've heard is good things. It's been a lot of work. I've been helping them learn the songs for a couple of hours on Monday, and then we meet an hour early on Sunday to go through the songs again. On Sundays, we've had some funny technical things. The first sunday, the sound guy thought there was something wrong with the sound so he brought the guitars down to almost zero volume. Then the next sunday he wasn't there, we left the sound up and it sounded great. The next sunday he wasn't there either, but our youth minister went upstairs and inadvertantly turned them down. I just don't get it. Everyone seems to love it, but we can't get the sound system to let them play!

Since I'm the music minister, I'm sort of in charge of the sound system. Well, I've been wanting to get a new wireless lapel mic for our preacher because our current one is old, it's the old FM type, and it makes rudes noises every once in a while. The new one however, which is UHF and has many newer features, costs $399. So we've been sort of begging for money from the congregation for a couple of years now and we have a "microphone fund" so if anyone wants to designate a donation, we're ready to accept it! :-) Well, anyway, some wonderful soul at church donated like $600 to that fund, and in business meeting it was approved to go ahead and purchase it! Wow, that was cool! So now, I just have to go get it! I know it sounds silly, but I'm really glad and happy about that! It's like a ray of sunshine!

22 Apr 2006 (updated 22 Apr 2006 at 05:44 UTC) »

Well I'm finally finished making the 30 RBSs! Hopefully that will free up a little of my precious time to do some other things I've been needing to do that have been stacking up.

My little RBS business has helped keep me going for a while now. I guess you could say I finally have a real business now! It barely sustains us, but I've been out of a job for about a year now other than making RBSs and other odd jobs, so I guess it's sort of going. It really needs to make a lot more money before I really will feel comfortable with calling it my day job, but at least it's keeping our mouths feed for now.

When I haven't been making RBSs, I've been working on my computerized RBS. The computer part has been coming along nicely if a little bit slower than I've wanted. I'm hoping to get all of the electronics part finished soon.

I've got about all of the bugs out of the scheduler so that it works fairly well. It can run several processes (10) all at the same time. I have a process servicing the LED, LCD, RTC, Keyboard, Sensors, Buzzers, RF Commander, Elevator Motor, Clock Hand Stepper Motors, Lights, etc. Some processes do dual duty like the keyboard and rf commander are both handled in one process.

I made the 16x2 LCD display big characters by making 8 graphic characters that can be used 4 or 6 at a time per character. They look fairly good. I can display the time in big characters so you can see them far away. When the menu isn't used for a while, it switches to displaying the time.

I got the I2C thing figured out. I had to bit bang it since the pic16F877a eval board I was using didn't wire them right. But no biggie, I sort of wanted to know the ins and outs of it anyway. So I got the RTC clock giving me the time, the EEprom storing preference data, and above all, I've made a pic16f84a i2c port expander to drive the stepper motors for the clock hands. Yep, that's right I bit banged and i2c slave chip too that handles 2 stepper motors and a few LEDs with PWM for dimming them. I'm really liking i2c for distributed computing. I'm thinking it's so nice that I may make some more little i2c modules and such. So basically, right now, I have a main computer that handles the menus and such, and a second computer that handles the steppers and leds and such, and rtc and eeprom all on the same i2c bus (well actually, eeprom is on a separate i2c bus but I'll probably change that). Anyway, I like that i2c bus way of doing things!

I've had a few problems with the DC motor since it likes to reset the processor when I turn it on. I added a few capacitors and it seems to have gone away.

I also had problems with that 1F cap. It poped! I had another and it worked a while and popped too. I guess they're very delicate. I don't know why they popped. I replaced them with 1000uf caps. For the clock, I wired a 100uf cap directly to it's vdd with a diode so when power goes away the 100uf cap powers just it and doesn't power everything else. That keeps the EEprom going for about a minute. That should be long enough for most brief power failures. I thought about putting a bigger cap on it but I added it to the bottom side of the board so it wouldn't look so nasty hacked onto the top so I used the small 100uf cap.

I replaced the non-working buzzer out for a little speaker from an earbud headphone. I made it do low, med, and high pitched with long and short beeps. It's not too loud and it's kind of cute. I don't know if it would cause problems with anything electrically, but it seems to be a good cheap solution.

For the clock hands, I found out the steppers I bought were 24 step steppers. That was a little disappointing because I thought they were 200 step steppers. 24 steps alone is really not good for a clock. 60 or more steps would be ideal. So I switched to using half step logic. That got me 48 steps per rev so that would be ok for the hour hand. For the minute hand I decided to make gears out of wire. Wire gears would keep the look for a wire RBS. I'd have a 12 tooth pinion gear and a 15 tooth drive gear for a 1:1.25 ratio or 60 steps. That just barely is good enough for the minute hand. Really I would have liked double that but making a bigger gear out of wire is harder to make. I have the two opto sensors working for the clock hands so it can tell when the motors are at top dead center then it can position the hands for the rest of the time by steps alone.

Just about everything is working on the electronics. I have some more software I want to add and I still have a whole bank (2k) that I haven't used used and some more here and there.

I'm really looking forward to seeing this clock being built and finished. I have a few other people that seem interested in seeing it working too. Of course, my wife just thinks I'm nuts. I've pretty much learned to ignore her. She just thinks things are cool when they bring in money.

I've downloaded express pcb and sch and played around with it a little. I'm hoping if this electronic RBS thing works out that I may start making a few custom boards so that I don't have to solder everything point to point and kill lots of my time and effort. I think I want to make everything modular and use a standard i2c header on everything with power, ground, SCL, SDA, and a few other pins. Something where I could reuse a module for another project if I wanted. I'm sort of into the electronics stuff again for now since I've just built a few things and hacked some electronics stuff lately.

I got my PIC16F877a Eval board in the mail from Hong Kong. It had absolutely no documentation other than what was on the web page (which was very sparse)! Wow! Anyway, I had already scoured the pics on ebay to figure out pinouts and such. I had written a test program before I received the board. I burned the program into the pic, and with some tweaking actually got it up and running! I'm fairly happy with it. I have a 16x2 LCD with backlight, a 4 digit LED display, 4x4 keypad, Real Time Clock, EEprom, buzzer, serial, and other junk. There's probably better computer boards out there, but this has keypad, display, and i/o for $40. I'm pretty happy with it. I don't think I could have bought all the parts and assembled for less! Saved me a lot of work that I was planning on doing. I'm glad I found it.

The LCD and the LED displays share the same PORTB. That's really weird because they're always conflicting with each other. You send a LCD command and it shows up on the LED display. You send a LED output and it messes with the LCD display. What I figured out was that if you set the LED the way you want, then before turning it off setup a LCD xy command then click the E line, the LED is happy and the LCD is happy. So, basically they're still conflicting with each other, you just can't tell it. So the LED runs fast enough with persistence of vision you don't see the little LCD command, and the LCD gets a xy cursor command, which you don't see either.

I also got a wireless 4 button remote from the same guy. Again, absolutely no docs except what was on the web page. The receiver board was simple so I went ahead and hooked it up to the 877a board. I made it so that when you press button A on the remote it displays A on the keyboard. Also for keys B, C, and D. Yea, it works! So now when I build the RBS, I can have it remote controlled to drop a ball or adjust the time or lights, etc. by remote! Cool.

I arranged the keypad buttons on the eval board be like so:


      +-----+-----+-----+-----+
      |  1  |  2  |  3  |  ^  |
      +-----+-----+-----+-----+
      |  4  |  5  |  6  | esc |
      +-----+-----+-----+-----+
      |  7  |  8  |  9  |  v  |
      +-----+-----+-----+-----+
      |  <  |  0  |  >  |enter|
      +-----+-----+-----+-----+

So I have numbers, arrows, escape and enter! I'm very happy with that. I need to figure out a good way to label the buttons (stickers or something). The 877a eval kit comes with a bread board! I used it to tie the keys input to ground thru 1k resistors so that they would work right.

So far, I have a simple menu where I can scroll up and down. I can go into a menu item with enter and I can back out of a menu item with esc. Right now it just displays a simple menu: set time, ball drop pref, about. The about menu item is all that works right now. If you press it, it will display "Grandfather clock", "See www.swirlingbrain.com", etc. plus up and down graphics chars and and "ESC" graphic char to let you know you can use the up and down arrows and esc to hop out. It's the best user friendly I could muster.

I have several background processes going: One that updates the LED display with the time (although it's not read from the real time clock chip yet), one that scans the keyboard and puts a key to a key buffer and has debounce, one that scans the rf 4 button remote, one that works the elevator motor (don't have the motor hooked up yet), one that works the stepper clock hand motors (although they're not hooked up yet), one that reads the RTC every so often and updates the clock (not done yet), and a few other misc processes for a total of 9 out of a possible 10 processes going on my scheduler code! I'm so glad it works!

So far of the 4 banks of 2k (8k total) I've used 1/2 of the first bank, and 1/4 of the other 3 banks. So I still have plenty of code space left. So the total code is about 2.5k right now out of 8k that I have or about 31% or so. Really I have a lot of code in there already so I'm pretty sure I'll have enough code space to do all I want to do and more!

Really, I'm thinking this setup might be really nice for a robot main board. I could hook a RF serial connection to the board's serial port and control the robot through a PC and I could use the wireless remote for sending simple commands like start, stop, and two functions. Interesting.

Well, Bethany's been in the hospital for about a week now. Her PFTs had dropped to 67% and they wanted to get them up. So she's getting a tune up! She's doing Ventolin, Tobi (aerosol tobramyicin), Dnase, Intraveneous Antibiotic (probably Tobramyicin). Basically, all the stuff we do at home in a more concentrated form plus all the intraveneous stuff. Teresa's taken off of work to stay at the hospital with her. That's killing us! Any extra I made with the ball trails this week is getting eaten up by Teresa staying off of work. :-( The latest is that Bethany dropped below 65% so what we thought would be news of her leaving the hospital today is met with news that she's worse than when she came in! Ugg. So now we don't know when she's going to get out. The doc is so funny, he said, "She should be out of here by Christmas!" Yeah, like that's so funny! We got two for the price of one: A doctor and a comedian! Woohoo! Bethany's been living up. She gets to eat all she wants - they just bring it to her in bed! She's been getting presents and candy left and right! People call her and talk to her for long periods of time. She gets all the sympathy she has ever desired! All that and she doesn't have to go to school! She did spend her spring break at the hospital, but at least she didn't miss that week of school.

Me, we'll I'm wasting time when I should be making RBSs doing PIC16F877A programming. Why 16F877a? Well I bought a couple of 877a eval boards that I want to use as the brain for a granfather clock RBS. The boards have everything I want like a RTClock, Display, keypad, & pic cpu. The boards even have a ZIF socket for the PIC chip for "crash & burn" type development! Or you can use the serial port on it with the pic bootloader preprogrammed into it. It needs to have more I/O for all the junk I want to add on it especially a couple of steppers to drive the clock hands. I figured I would just use an 16F84 via some comm line (probably i2c) to drive a couple of steppers. I want to use i2c because it's already being used by the clock chip and the eeprom on the eval board. I figure I can just tap into the lines so I don't have to use any more i/o for comm to another chip. Also, I wanted to get my hands dirty on i2c to see how I like it. The 877 has i2c onboard. the F84 it'll have to be a software emulation of it but I think it will fly.

So, I dusted off my scheduler code and got it tested in the debugger. Found a few bugs and squashed them. Upped the number of tasks to 10 and moved the schedular and my interrupt service routine variables up into bank 3. Dealing with the banking issues RP0 & RP1. Also had to do it for IPR since I was using FSR and INDF variables. Got that all working again. So now my code and variables have room in the other banks.

One thing I ran into with the 16f877a was the PCL (Program Counter) being only 8 bits. I don't remember it being that bad on the 16F84 but perhaps I just didn't pay attention. So what happens is if you want to do a table lookup, you have to set this other register called PCLATH with the high byte of whatever label you want to jump to then modify your PCL to do the table jump. So the PCLATH is the HIGH byte, the PCL is the LOW byte, and viola, you have a long relative jump where you can programmatically go anywhere you want! So the 16f877 has 8k of program memory in four 2k pages. That means that eventually your goto and call functions won't work either as they only address 2k? of code space. So again, you have to load some of the bits of the PCLATH first with the high byte of your label address to do a long jump or a long call. Since it starts getting confusing as to when you should or shouldn't load the PCLATH, it gets to where you just do it all the time now to make sure you aren't missing something. Or, perhaps your program expands and if you didn't do one before your program just mysteriously quits working, so you better do it now or you'll mess up later. It would be nice if there was some kind of macro that would figure it out but I guess that would be confusing too. So, there iS Assembler page pseudo thingys you can insert into your code. I haven't researched them enough yet but for now I haven't used them. Anyway, that's the weirdness I found with the 16f877. It's not a show stopper, but I sure don't think PIC programming is as easy anymore as I used to. I guess other CPUs have code pages too. I just thought that was a thing of the past. Really makes you appreciate 16 bit processors as opposed to 8bit. With 8 bit processors you're always dealing with math issues and addressing issues. Just move up to 16 bit and they all go away. Well some of them do anyway. PICs should be 16 bit I tell ya! Imagine the poor souls who had to deal with 4 bit processors way back when! Yikes!

I tried to look into using some freeware version of PIC C language. The problem I ran into was they would have support for rs232 but not for i2c. I need i2c for my real time clock, eeprom, and stepper controller chip (that I have yet to make). There was some other things that were missing or seemed to be a problem, like a huge RTOS which would suck away a lot of my resources, limited freeware stuff (like the freeware version is limited to 2k of your 8k available and the pro version is like $250 or more), there were other things I ran into also, which at the moment are not coming to mind but ended up being a show stopper for programming in C on a pic. :-( I was really wanting to do that eventually. I guess it all takes lots of money which I'm not willing to let go of right now.

Also, I ran into problems with the Linker. I have a bunch of relocatable "code" and "udata" pages. For some reason I couldn't get the linker to accept them and just pack them in right. Like I haven't broken 2k yet so you'd think it would just stuff them all in the first page. I got the sample template for the 877a and added my files to it. I just about thought I had it working but I kept getting some weird error when the linker finished. So my remedy was just to put all the code and data back into one big file and assemble it. Like no real linking happens so it just builds the hex file. Stupid linker! What a big waste of time. There again, linkers should be easier! No telling how many times, even on really big projects, the CMT guys always had trouble with linking stuff the right way. Like building the perfect automatic linker is a field that's ripe for picking. Yeah, yeah, I know it's more complex than that but really, why does it have to be so complex? Like standardize linker coding into some easy "basic" like linker language so you don't have to learn a zillion linker weird structure info languages. I guess it's from severe lack of being or even wanting to be a Config Managment guy. I mean is it so much to ask that I should just be able to write a program, and the thing just automatically builds the right way without me having to tell it a bunch of junk it should already know of should be able to figure out on its own?

I'm about 20% done with the RBSs that I've been contracted to do. I'm a little behind work on them. Partly because of having to travel down to Children's Medical center so much this last week and partly because I get distracted easily. I'll build on a sculpture for a while and it'll get hot. So I'll walk away from it to let it cool. I get busy doing something else, then it's hard to get back to working on the sculpture.

I believe my life is a type of roller coaster. I know that's so profound. I'll go though periods of being bored. So I'll find things to do and start filling up the bordom. Just about the time I get happy with the fact that I'm not board and I've occupied my time with something, that's when a bunch of things will arrive that I "have" to do. SO, all the things I want to do which I've spent time and money gearing up for, have to be put on the back burner to do the things I have to do. Part of me tries to keep doing the things I want even though I really don't have time for them any more. So then the things I want get dropped altogher and some of them get lost (or rather what I like to say, "got cleaned out of existance" - a term borrowed from Eric Yundt). So then the "have-tos" start going away, and my want stuff disappeared, I get bored again and the cycle repeats.

77 older entries...

X
Share this page