Monday, September 26, 2022

Makerspace Monday Magic - Talking to Judith

 This robot was a pain in the butt. Fortunately, one of the  manuals is annotated. The project was to talk to Judith, a Pro Arm RS2200 through arduino. Looking at the protocol it SEEMED easy, but the real challenge was how much was going on the behind the scenes in the proprietary software that runs on an apple IIe? Fortunately for me, not much. Keep in mind this did not take one evening. 

I build a shield that connects to the parallel port in the back of the robot via its apple cable. It was straight through. I connected strobe pin 1 to Arduino DIO 2. then the D0 on the robot to DIO 3 on the arduino etc. I kept 1 and 0 open on the arduino because I need the usb connection. with Error on 11, Ack on 12 and Busy on 13, I can set the pins, and then toggle the signal pin, then set the next set of bits. I had a huge issue with the movement command, just keep in mind there is a space between M and the numbers, and those are all commas between the numbers so M 0,0,0,0,0,0 is a valid command. if you screw it up the error light will let you know.

The other issue is the problem of endedness. so to send the open gripper command, you send O, but you send it like 01001111. But then it just waits on you. you need a linefeed and cr 00001010 and 00001101 keep in mind each of these are clocked into the robot. so you set the DIO3-10 to 01001111,  toggle pin two then set the bits to 00001010, toggle pin two, set the bits to 00001101 toggle pin two. For a brief moment you wonder why you didn't hear anything and then realize the gripper was already open.

such is life.

for my next trick I'll have to repair her because she broke her claw cables. I have some cable for that, I just don't know where. 


Saturday, September 24, 2022

Coffee Saturdays. Bus Pirate, MCP4725, and Scuttlebutts

  I miss working on projects in the coffee shop, so I wandered to Scuttlebutts in the Clayworks with a bus pirate, a DAC and a laptop to play around with the DAC and maybe learn something. I'm resurecting the blog because I have too many projects and I don't feel like I get anything done, but I don't have anywhere that is tracking overall progress. So if I write about what I'm doing right now, then perhaps I won't feel so bad.

or perhaps I'll feel worse. Let's see what happens.

I hadn't touched the bus pirate in awhile so some if this is just getting reacquainted with it and maybe learning some new things. I have specific end goals in mind but let's not distract ourselves more than we already are. The bus pirate is a neat tool. Whenever I excitedly babble about it people are just like "an Arduino does that" they are kind of right. An arduino can do all the things a bus pirate does with some code and a circuit. But the bus pirate is a dedicated interpreter of protocols that is already programmed. If you learn the bus pirate you can tie into a problem bus and learn what's going on very quickly. It also has various pwm and dac functions that... yes the arduino has... but are already programmed in. Think of it as a simplistic C3P0 you can use to diag your hyperdrive.

so here is a screenshot of my pirate, it's an older model but it does what I need. Today I mostly just fired it up and connected to it to clear out some cobwebs in my brain. 

On Windows 10 I plug it in and grep device manager and look at what com port it's on. Then I putty into it at 115200 Serial. Screen is always empty when I connect but if you hit enter it will say HiZ>. The bus pirate is nice enough to always start in HiZ mode to avoid breaking whatever it's connected to. so when your done using it you don't have to disconnect anything you can just toss it all in a box for later. Mine lives in a sparkfun box, probably because it came in a sparkfun box. 

So the DAC is an MCP4725 which is a 12 bit DAC that claims it's I2C. Actually, its a module from sparkfun. So there is header pins and whatnot. So we hit m and 4 and it asks us to set the speed. In the datasheet "fast" is 400kbps and there is a ~400KHz so let's see if we can give that an old spinaroo. The mode light on the bus pirate is lit. 

So Ground is tied to ground. Going from Dac to pirate - VCC is tied to 5v (max voltage is 5.5 on the DAC) SDA is tied to CS, SCL is tied to Clk GND is tied to MISO, and out is tied to ADC. 

in 8.1 we find out that SDA and SCL are open drain. So it either does or doesn't sink current. We handle this with pullup resistors ( P ). BUT there is no voltage on Vpullup pin. so we need to W and turn on the power supply unit. Now I have four red lights on the pirate. nothing seems warm, and v Shows me that the 3.3V looks good, the 5v looks good, the ADC is sitting at 2.48 which is halfway between 5v and 0V Aux is low (We aren't connected to it) SCL and SDA are both HI and we don't care about the rest. So not only is the device powered on, but the device is happily sourcing 2.5V and the pirate is reading it and they are all happy.

7.1 says that the device code is 1100. the address bits according to Sparkfun's hookup guide are 0x60 so BUT we want to know for sure, so we check to see what macros we have (0) there is (1)  7 bit address search, and (2) I2C sniffer. (1) found read and write at address 0x62 So that is prob the address for my device. It's 10:00 and I should probably get home. BUT we are talking to and reading the output of the DAC with the bus pirate. So that doesn't suck.

Sunday, December 31, 2017

Power Supply Build

Finished a project that I'd been working on for too long. A power supply. I built the kit at one point and liked it so I wanted to put it in a professional looking case. It needed a cooling fan though as well. I think I got the kit from Bangood as well as the kit, and I think the case. By itself the kit isn't bad. two rotary encoders set the voltage and current clamps, the LCD screen gives you pretty good feedback. but the problem is that the power transistor doesn't have a thermal sink with the kit. There is a second kit available that does this. So I picked that up. works great except.. if I put the fan on top of the thermal sink, it was too tall for the case I picked out. Additionally, the kit didn't come with a transformer. That was an easy fix though. Essentially, I wired the encoders to the control board. so the control board is behind the LCD screen. then the outputs are just right next to it. I've some knobs on the way, aluminum. But I think they will take awhile. So I decided to just post this now before I forget. I'm pretty proud of how it turned out. Simple, functional, and fun.

Monday, December 25, 2017

Updates and backups and logs oh my!

I run Linux on my laptop. So when my daughter said she needed a laptop, I pieced one together, dropped Linux on it and handed it over. She took it home... and let me make this clear... she took it home. How to do upgrades? She isn't a technophobe, just lazy. So I thought, what if I wrote a script, that configures her laptop to handle updates, backups, then emails me when it's done.

That sounds ambitious. So lets find the best way to do all of this together.

so for backups I use

tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /


this puts a backup tar in the / folder (we have to start there too)

so we can say

#!/bin/bash
# let's talk to the lUser and let them know it's gonna take awhile
echo HI, I just need to do some configuration stuff, Please wait until I'm done
echo This will take a bit probably


:wq out of that and then change the permissions
chmod u+x updatescript

that allows it to be runnable.

I'm adding an option to shutdown when I'm done. something like

shutdown=true

if you use shutdown = true, it will try to run the command shutdown. That's not what we want, we want a bool shutdown that is initialized to true. Conversely, (and we may use this later) delete a variable with unset so unset shutdown, deletes the variable shutdown. We don't want that so we are just going to shut down by default, but ask if she wants us to leave it on.

echo would you like to shutdown on completion?

Windows NEEDS a reboot usually, Linux not so much. Thats just so that she has the option to come back to what she was doing the night before, or see that it's shut down and know it's done. so now we need to read in her answer. so I'm going to let her type in her answer and read it in and check it. so

read shutdown #important to note that c based programmers will pull their hair out with lack of ;

now you can
echo $shutdown

at this point you can read in anything to shutdown. If you type Floppychoppydingdang that's what that will save in the variable

So the NEXT thing that needs to be done, is to parse the input and decide if she wants it shutdown or not... or if one of her kids is banging on the keyboard again.
That sounds like another day.

Sunday, November 26, 2017

forays into the IOT

I've long been interested in the IOT. I've been running a server (ssh port only) and have been tinkering with it more than anything. MySQL, C++, writing my own makefile. Much of this I'll try to remember to document here. I've not been idle so much as horrible at documentation.
I bought this awhile back it came in, and if you think about it, it's awesome! The relay can handle 10A, 120V so it can turn a lamp, or more on and off. Plus, it can do it via wifi. This is an awesome jumping off point, since most of the GPIOs aren't being used. According to linux I'm going to try to use a Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
basically a some uart I picked up from China. So when I power this up and look there is a network AI-THINKER_####X# and I can connect with a password ai-thinker. Has port 80 open, and when I open it up... nothing. Empty webpage. Blank canvas. 

So with that, the fun will begin.

Saturday, January 9, 2016

Another Software reload

So for those that don't know, last time I went to update my OS things went horribly. I moved my windows partition, and it didn't like it. So I loaded Ubuntu desktop, installed Xfce, and then deleted Unity. This for some reason was very bad. on boot up it would give me errors and rarely would it shut down with out a cpu timeout. Requiring me to hardshutdown almost EVERY TIME. Needless to say this made me unhappy. So while I was on Staycation I took the opportunity to reload software. This time I was determined to do it right... or at least closer to right.

First off I installed Ubuntu server. Next (I don't know why I was surprised) I had to add my wifi and manually bring up my wifi card. It wasn't hard, just took me by surprise. Next I installed Xfce4. Some tinkering and now that works as expected. Then installed just the packages I wanted from synaptic. 

So far so good. It boots up into the shell, and then I start the xfce. Often I'm doing shell work so this doesn't actually bother me. I have another laptop I'm using as a game server, it's likely I'll take time to reload that one the same way. I did however learn the importance of checking for typos when trying to connect manually to the internet at my favorite coffee shop.

So how you do this, on ubuntu is sudo vi /etc/network/interfaces. Then just add

auto wlan0
iface wlan0 inet dhcp
wpa-ssid RouterName
wpa-psk NetworkPassword

Then you just :wq out of that and sudo ifup -v wlan0. you should be able to  ping google at this point.

when I googled this there was a hot mess of answers mucking about with wpa supplican and such, that's all automagically done in the server. Don't make life harder than it is. :)

Sunday, January 3, 2016

Focalwanna LED Music Spectrum Electronic DIY LED Flash Kit 12*11FFT(with housing)

Picked this up at Amazon, it's a pretty simple kit IF your into soldering SMD. If I were to do this again I'd invest in some solder paste, and use the reflow oven at the local makerspace. All surface mount, which wouldn't be so bad except for all the tiny LEDs in the front. Go slow, remove them from the package one at a time, check polarity solder in one side. Then you can solder in all the other sides when they are all on. That way if you have to remove one it's not a huge ordeal. Instructions came with it. It seems pretty hackable, though most of the heavy lifting is done by two chips on the back. They shorted me a green and a blue LED, and for some reason I don't have output from the speakers. I paired this with an external speaker though and it looked awesome. For the price it's a nice project, and well worth the effort. What an effort it is.

 

Saturday, December 26, 2015

Ramsey ts1 kit - Touch Switch

Another awesome kit from Ramsey. Useful too. I'm using this one with a relay to switch a floor lamp that gets used quite a bit, as well as switch on/off the opposite end table lamp. That's right it's a dual switch. It also has the capabilities of doing duty as a momentary push button switch, or as an acutal toggle switch. Bloody brilliant guys. Kit comes with a pamphlet that has all the numbers/parts you need so you can check them off as you go. All through hole components, board is small and goes together really well. I highly recommend this for beginners who are looking to get into electronics, or for old hats who need a quick touch switch solution. Totally hackable since the pamphlet gives a rundown on how the circuit works and everything, Ramsey comes through again.



Saturday, December 19, 2015


Happy whatever-the-heck-you-celebrate!

As the year ends people need to blow off steam a bit, and so there are several occasions that all occur around the end of the year. So no matter what you celebrate I hope you enjoy yourself. Unless your an ax murderer in which case... consider therapy.

So I picked up one of these for my desk at work, put it together while on staycation, thought my readers would like to check it out. Vellman has some great kits, this is one of them. Based on a two transistor multivibrator (calm down ladies) this kit blinks LEDs. (whoo hoo) but blinks them on a tree shaped PCB. For the price it really isn't a bad kit to put together for a little bit of festive. I will warn you that there is a +/- pins at the top of the tree, these connect to the input voltage. So if you put a LED there it will try to take the full input power. At 9V that's bad 'k? That's there so you can attatch your power wires there, into a 9v and hang it in the tree (cleverly hiding the 9v battery under a sign that says 'not a 9v battery') Typical Vellman kit with pamphlet explaining the circuit and checkoff as you go parts list. GREAT for beginners. Highly recommended.



Wednesday, December 9, 2015

Transistor Tester M328 H11888|26501

Here is another kit I got from Wish.They have a link to some directions, but It looked pretty suspicious being a dropbox and all, so I skipped that. The board itself is really all you need. The silkscreen has all the values on it, if your a novice the resistors are going to flip you out a bit. Not often you see .05% in kits like this but From what I can tell of the circuit it's warrented. The system itself can be powered by 9v or by an outlet, and you put a device on the test pad, or screw terminals, and it analyzes the device, telling you the Uf, and the B value, as well as the pinout, and if it's a NPN or PNP. I'm not positive what I tossed in there to test it with, I”ve a crap ton of transistors right now. I bought two of these, one for me and one for the local Makerspace (they need one fo-sho) Looks like a handy little tool for the shop, cheap enough if I break one I'm not too sad, and it's easy to put together if you pay attention to what your doing. As for Hackability, it runs on a ATMEGA328p and standard LCD screen. I'm sure with some clever Googling there is some code for this somewhere, I'd say, hack away. When I first put it together it didn't look like it was working. I adjusted the contrast till I saw 'timeout' tested again and it worked fine. It doesn't leave the values up for very long. I'd snap a pic of it so you can look at it later for reference. I'd love a pot that you can adjust the hold time on the results.


 

Saturday, November 28, 2015

soundbox 16 / 120106 / BOX-16

Picked this up on amazon. The Silkscreen was awesome. Went together perfectly, and it worked the first time. The only thing I would change about this is add an actual power port, to the kit and a friggen OFF BUTTON. The power for module is a + and - on the board. I mistakenly put a capacitor there, which should be fine The switches on the side select which noise you are pissing people off with it. and there is control pins on the board you can hook into a uC and automatically piss people off. Very hackable device, and the circuit is mostly a bilateral switch chip and a quad nand gate some switches, and of course, a black blob. Black blob is the massive detriment to this kit. Perhaps sometime I'll take a look at the inputs and outputs of the blob, but not today.


0000: Machine gun voice
0001: Fire truck voice
0010: Ambulance voice
0011: The police car voice
0100: Crickets sound
0101: Alarm
0110: Electronic signal sound
0111: Koh
1000: Insect song
1001: Whistle
1010: Telegraph sound
1011: Bird song
1100: ChongJi gunfire
1101: Car sirens
1110: Bass instruments sound
1111: Racing sound

Saturday, November 14, 2015

YSZ-4

This was a quick build and worked gloriously until I accidentally hooked it up to 12V. Don't do that. All the parts came, silkscreen was super helpful, I think I'll order another one, to put in as a clock at the makerspace. I didn't get to see long term usage, cuz well... me. but that was blatantly my fault. If your a beginner solderingerr go for it. Not much to it, and could use a regulator of some sort, but all in all a good kit.




Saturday, November 7, 2015

SH-E 879 clock

This is a simple seeming setup. the SH-E 879 has an informative silkscreen and all the parts arrived, but I just can't seem to get one that works. The first one the display was quite confused, I tried to troubleshoot, but I think it was bad firmware on the chip. the second one, most of the display works one of the 8 segments for the hours never came on. neither did the leds I may troubleshoot, but likely I may cut my losses and move on. it's perfectly happy with 5v is quite hackable would be simple to work into a project, but I think you would spend more time fixing it than it's worth. As dad says, it's easy to make a bad pie.




Saturday, October 17, 2015

NE555+CD4017 kit

Last weekend I spent Saturday at a Renaissance festival. I didn't make anything of note for it but it was great to get away and enjoy a beautiful day of geekery. So I didn't post, but I am this week, on a nice little kit I found on Wish for a buck. This is a great beginner soldering project, there is no programming, just some relaxing soldering on a very simple circuit. It came with the schematic, all the parts were right, numbered and easy to get to. Power it up and it is going. Honestly it's a hard circuit to screw up, and adds a bit of geeky decoration :). I put it together rather quickly so relax, heat up an iron and enjoy.





Thursday, October 1, 2015

SainSmart DSO138


This one isn't for a beginner. I ordered the DSO138 from Amazon the reviews were stellar I thought it would make a good blog post series. Took quite awhile to put together but I "got'er done". The silkscreen could have been a bit more helpful, but all of the SMD parts were already done. Also this requires a 9V power supply. Easy to find on Amazon, but letting you know, it's not included. The other big gripe I have in putting it together, is... the incorrect resistor values. There were a few I had to guess at. Once it was all together, I booted it up, and ... nothing. reading the troubleshooting secton, I needed to short J-something or other. After that is done, I boot it up and lo and behold its running. I hooked it up to it's calibration waveform and let it sit there. Ran like a champ for several hours, then locked up to a white screen. Now it may stay active for up to a minute before switching to the white screen of death. I've set it aside for now, but I may try troubleshooting it sometime to see if I can get it working. All in all, when it was working it was a pretty good little scope. I didn't look at the input impedance or anything like that (because it locks up too fast)  but it's easily hackable, and it would be simple match that back to 50ohms with a few cleverly placed components. So yes it's fun to put together, and yes it's a decent scope, but mine quit on me after awhile. Oh and be careful and make sure you keep the 7805 and the 7809 differentiated. I narrowly
missed that calamity.

Saturday, September 26, 2015

EC1204B V1.2 kit


This is a fun project. I picked up this clock module, a EC1204B V1.2 ,from wish, so it wasn't expensive. Few things you will need. Some warnings, there are small parts, so be careful opening this up. Also there are quite a few surface mount components so I don't recommend this for a total beginner, unless they are super patient. There seems to be quite a bit of support on the Internet and the device appears to be highly hackable, and cheap enough to screw one up. The transistors (or triodes according to the instructions) can be tricky to solder. I tin one pad and then mount the transistor on that pad, then solder down the other two pads. Actually, I do that to the caps and resistors. I did have a few LEDs that weren't working, but there were leftovers. SMDs were 603 I think. It took me several hours, but then I'm pretty unfocused and had a grandkid getting into stuff too :). Stock, it has several modes. Tells the time, date, and temperature. Best of all it looks nothing like a bomb. I set this up in my workspace to keep an eye on it for the week, (I needed a clock anyway) after several days I got an ERR1, or ERRI I suppose. Hard to tell on a 8seg display. It required a complete reset of the clock to clear. There is a lot of leakage too, so there is a lot of half/on led. But for the price, if you have done a few through hole component projects and are ready for a decent challenge this one may be for you. Oh and one other thing, the hourly chime sounds like my microwave, so don't go running to it for food. I had some sort of weird Pavlovian experience one night. I enjoyed it, and ordered another one to hack into something for my desk at work. I'll post that process when I'm done I promise. For now though, I've other things to do.