EmbeddedPosted by michael Dec 02, 2015 03:44:50
Did you struggle with a SIM900A module from ebay? Well, I did. I bought several from different vendors and spent some time to get them 'online' (or rather 'on the air'). For a data logging project I bought 2 SIM900A modules. After I received them I found out that I should have ordered SIM900 units because the 900A's are meant to be used in Asia only and do not function in Europe. On the net I did find several tutorials about flashing firmware to make them behave as a SIM900 unit (with only 2 GSM bands because of hardware limitations). The one that helped me most can be found at:
I will not add another recipe for flashing firmware, there are enough versions out there. Just make a serial connection to the SIM900 shield or board, observing signal levels and baudrate. Normally the SIM900(A) autobauds, so you must type 'AT?' or something else starting with capitals 'AT' first to let the module know your communication speed. Anyway, my first boards were happy with the firmware version
Contrary to one of the SimCom manuals, you do not need to hook up the debug port for that. The regular serial port works fine with the download tool. After flashing the new firmware (which finally worked after lowering the baudrate) the module responded to AT commands. I used a test platform on
for checking out the newly flashed units. To receive and send SMS it is necessary to set
AT+CNMI=2,2,0,0,0 so messages will be forwarded to the serial port instead of stored. You also need to set Text mode with AT+CMGF=1 to make sending and reading messages easier....
I also needed to select a provider to log on to from the ones that were available since my module did not 'connect' automatically. Maybe this has to do with the settings in my (prepaid) SIMcard.
I applied the same recipe to the next units I purchased off ebay. To my surprise they seemed to be bricked after flashing the same firmware. The status LED refused to flash and no response to AT commands.......
After trying various firmware versions it still did not work, in spite of the download apparently finishing successfully. Finally, I found out (by using the uplaod feature of the flash tool) that my first units contained a 32k ST flash and the stubborn units sported a 128k flash by SPANSION. So I tried flashing a firmware version with SPANSION in the filename from Muhammad's repository. Only one available, an Italian version, but after downloading finished it functioned as I had hoped for. Conclusion: Not only the size of the firmware should match the flash memory size, but the firmware should also be made for a specific flash vendor. Bigger is not always better!
CNC stuffPosted by michael Jul 13, 2014 01:08:25
Back after a long period of silence. I started rebuilding the control system of an Aciera F450 milling machine. Originally the machine was fitted out with a Fanuc CNC controller. After someone pulled some boards for cleaning, the controller went dead. Why would anyone store the firmware in battery backed-up memory and put the battery on the backplane?
Anyway, the decision was made to rebuild the machine with Linuxcnc and Mesa boards.
For the motor drives, Granite Argon drives were obtained. Really great drives, with the ability to find the commutation points by wiggling the motors at startup. That feature comes in very handy as the Aciera has Fanuc motors which do have rather odd commutation signals. On the Web you can find boards that use these signals for initial commutation and switch over to encoder position after one revolution. Quite nice, but that solution would have added another $500 to the project cost. So we decided to let the Argon drives sort it out themselves.
The actual rebuild started with taking out the original Fanuc controller parts. Patiently we traced all the external wiring, plugs and terminals and drew up diagrams of that part in order to facilitate the wiring of the MESA cards later. Then we wired up one of the motor drives and started testing the lot. Disappointment was our reward. The first axis moved rather strange. It turned out that the signals from the encoder were erratic. Closer examination learned that the line driver had gone bad (accidental supply line reversal?). Replacing the line driver chip in the encoder (Fanuc Pulsecoder) cured the problem. The next test with the Argon Granity tool went successfully. We succeeded in tuning the x-axis so there was virtually no overshoot or following error. So far I am very happy with the Argon drives. Configuration of the drives could be documented a bit better though. However, in practice, it turns out to be easy: check the right boxes and the drive 'knows' how to behave. (the z-axis will present a challenge since the motor also has to support the weight of the table and I haven't found a torque offset parameter yet)
Next came tsetting up of the computer and MESA cards and doing some preliminary testing. We will discuss this in the next posting. I'll also will make put in some pictures.
GeneralPosted by michael Jan 29, 2008 02:00:54
Just a short little project I completed recently. A friend of mine was setting up a small PC to use on his sailboat and needed a power supply for it. The computer needed 2 amps at 5V. A linear regulator would have been easy to construct, but since on a sailboat battery power is somewhat scarce, a supply with better efficiency would be nice. So, time to build a switcher! I happened to come across some defective electronic ballasts recently, so, i had a parts source
However, the ferrite transformers were glued together and the HV PowerFET's used had a rather high ON-resistance.
So only the housing, terminals and the transfomer were candidates for recycling. After an hour in the kitchen oven at 120 degrees C, the glue that held the cores together had softened enough so the core could be pulled apart without damaging it.
In the junkbox I found a BUX10 (RdsOn<0.05 Ohm) and a heavy Schottky diode, fit for the purpose. A TL494 was chosen as controller. Driving the FET presented a challenge. The FET being in the 'high side', needs 10V gate drive to get into the low resistance range. Eventually, a bootstrap circuit consisting of one diode and one cap turned out to be enough to create the drive voltage. Since switching off the FET was still a bit slow, an extra transistor was used to discharge the gate when the FET was supposed to stop conducting. Success! Even at 2.5 A output current the FET hardly heats up. I measured an efficiency of 75% at 1.8A and even better at higher loads. Not bad, compared to 40% for a linear solution.
To make sure that the computer would not get roasted in case the supply would malfunction, an SCR crowbar was added which shorts the input in case the output voltage becomes too high. When that happens, the fuse in one of the supply lines will prevent draining the ship's battery really fast!
The complete circuit was transferred from the breadboard to a PCB which fits in the original case. Since my PCB milling machine is not ready yet, I more or less milled the tracks freehand after creating a layout on the computer and transferring the hole pattern first.
A new label on the cover, for the professional look completed the project.
CNC stuffPosted by michael Dec 16, 2007 21:50:20
Finally someone found me some manuals for the YAMAHA robot. A quick scan however did not reveal the presence of a 'Compile' instruction. Since I do not have the programming terminal, which should be part of the system, the only way I could make the thing move was to issue direct commands, which are interpreted and executed. Not the most ideal way to create a sequence... Maybe it is not possible at all to emulate the Programming Terminal through the serial Host Port. At leas I have a good description of the syntax of the commands which are accepted. I have thought of building a dedicated terminal which can be hooked up on the programming port, but then I still need to know the codes for Edit, Compile etc.. I guess it'll take some time before I have a working G-code driven CNC milling robot :-(
As a last resort I can always disassemble the firmware, but of course I am not looking forward to such an exercise!
MicrocontrollersPosted by michael Aug 17, 2007 03:15:01
I recently completed a Digital ReadOut for a lathe, using an AVR microprocessor and incremental encoder bars. You can find details here
. Simple encoders
with reasonable resolution (at least for hobby mills) can be found in old printers.
The ruler which can be seen in this disassembled HP deskjet was taken out and will be mounted on my MiniMill. An AVR tiny2313 is big enough to hold the software for a 3-axis position display plus a few extra features.
The picture shows a test version of the software. The two columns will eventually display absolute and relative position, while the bottom line will show the functions of the 4 keys mounted directly below the display. Functions will include zeroing abs and rel position display, An uncommon but handy feature I want to include is a display of the position of the 'edges' of the mill-bit. Normally, a DRO shows the center position of the mill, which makes it necessary to (mentally) subtract or add the mill radius from the position shown, which is bound to go wrong sometime causing too much material being removed.
CNC stuffPosted by michael Aug 17, 2007 02:45:43
I finally got the bastard to move. I started to write a 'Control Interface' in Delphi, with some predefinded commands. I really got tired of having to retype commands in Hyperterminal all the time. the Delphi program takes care of start- and endcodes and has a growing number of commands which I can send by a simple mouseclick. I managed to upload a program file which I created, but it wouldn't run. I have not figured out yet how I can compile a program. Hopefully the User's Manual which one of my collegues promised me to dig up will contain that info. I can't wait till he gets back from his holiday.....
Eventually I'd like to be able to do more with this robot than just make it execute simple oneliners that only contain one command. My goal is to write a g-code interpreter which runs on the controller. Programs are written in a Basic-like dialect, which also has some string functions. Interpreting g-codes shouldn't be too difficult to program.....
CNC stuffPosted by michael Aug 17, 2007 00:30:24
The next thing I wanted to achieve of course was to see something moving. After getting rid of the 'interlock' fault message I got a new one. My new pal lost his mind and only responded with 'Feedback error', which drove me nuts for a while. I tried to disconnect and swap cables, but the message would't go away. In the mean time I had also hooked up a panel with some switches and LED's to the pins that were labeled 'origin', 'start' etc.. Nothing happened, so I pulled the servo board and shoved it back in. I flipped the power switch and went away to get another cup of coffee from the kitchen. On returning I heard a humming sound. The servo's where actually working and when I pressed the origin button the axes started to move!
Now before moving on, I tried some of the commands in the book. Finally I managed to make the controller send some important files to the PC. Having a backup of the configuration files on my PC now gave me enough peace of mind to call it a day (or rather night) and use the (little) remainder of it on catching some sleep.
CNC stuffPosted by michael Aug 16, 2007 06:28:48
Some time ago someone at my work showed me a 3-axis linear YAMAHA robot which was taking up valuable warehouse space, and ready to be scrapped. I couldn't resist the temptation to start a refuge for abandoned robots so I took the poor thing home.
Unfortunately the victim arrived in a poor state. All the cables had been cut off during decommissioning! However, I did get some docs (programming manual and external wiring diagrams only) with the new resident of my refuge. It took me a couple of evenings to reconnect all the cables again (about 120 wires to solder). It also seemed that the controller had been wired for 200 volts, since originally it was part of a machine originating from the land of the rising sun. Looking into the primary power circuitry quickly revealed that the power transformer had several (unmarked) taps. After supplying the unit with 100 volts to be on the safe side, I quickly found out wich tap setting to use.... The next step was to find out how I could communicate with my new lodger. One 25pin D-connector bore the label "host", so I directed my attention there. A comm-cable was quickly wired up and fortunately I got it right the first time. With Hyperterminal running on my PC, it didn't take long to get some response after playing with various baus-rates. The responses indicated that the commands I send where missing a start code (@). Now, simple commands preceded with a '@' produced reactions like 'syntax error', 'interlock broken' etc. In the schematics I found a reference to a signal called Interlock and after grounding the respective connector pin, I could move on to the next challenge!