Jack Crossfire's blog View Details
Archive for November, 2013
Posted by Jack Crossfire | Nov 30, 2013 @ 04:20 PM | 4,372 Views
There are finally enough parts in the apartment to make a very small but decent balancing robot. If kickstarter existed 10 years ago, there would be a lot of balancing robot schemes instead of 3D printer schemes.


It's long been a desire to build one, but it never had a purpose. At most, it could do some kind of indoor mapping. 1 of the more functional balancing robots used an object tracking algorithm to navigate a course.


RS4 - Self balancing Raspberry Pi OpenCV image processing Robot Update 2 (1 min 1 sec)



It was a bit faster than the object tracking rovers I built because it used a raspberry pi for the machine vision & had a fully articulated camera. Trying to do that with a fixed camera, an STM32 capturing 6fps & offloading the object recognition over a wifi network was really slow.


Interestingly, he derived exactly the same algorithm for recognizing the objects that I used a year earlier. The key in both cases was to surround the object with a rectangle & use the rectangle to correct the perspective. Then, both of us calculated the difference between the object & a database of objects.


He later did some fudging to the blob detection. He appeared to shrink, then grow the blobs to eliminate noise.


At this point, detecting signs is pretty germane. Indoor mapping would be the next big thing. Telepresence using a video feed has never been practical because radio range has never been good enough.


1 fascination with balancing robots is that they can make money if a suitable application can be found. A conventional 4 wheeled robot is never going to make money. There is a market for a 4 wheeled chassis as an educational kit, but not a finished robot. Remote controlled cars are selling for $17 & change, these days, while Sparkfun is able to command $99 for a robot kit intended for education.
Posted by Jack Crossfire | Nov 29, 2013 @ 09:23 PM | 4,616 Views
Posted by Jack Crossfire | Nov 28, 2013 @ 02:27 AM | 5,154 Views
The early days of air travel, the vehicles & the crashes are an interesting read. It was as dangerous as it looked. There are no detailed descriptions of the accidents but engine failures seemed to abound. There were lots of water landings when engines failed. Water landings were usually fatal.

Gizmodo only covered Imperial Airways, which was real primitive. Your ride as an Imperial Airways passenger, on the very 1st flights in 1924 would have been this:




The De Havilland DH34. Early adopting was really early adopting in those days. The pilot sat outside. 1 engine was all you would ever need. The entire airline fleet amounted to 6 planes. If you were unlucky enough to be flying on Dec 24, 1924, you wouldn't have made it presumably because the 1 engine died shortly after takeoff, but there were no flight data recorders in those days.


In 1926, your ride was upgraded to the new & improved



Handley Page W.8. Those were real radiators with real antifreeze, exhaust manifolds, & oil pans hanging off the struts. At least it was easy to see if an oil line was broken, which they often were. It was quite large for a biplane. The pilot sat outside, behind the nose, all the better to reinforce if they were heading towards the ground.

...Continue Reading
Posted by Jack Crossfire | Nov 27, 2013 @ 11:36 PM | 4,981 Views
Posted by Jack Crossfire | Nov 27, 2013 @ 05:11 AM | 4,800 Views
In the old days, there was a novelty to someone picking up electronics on his own. It showed the ability to learn without being told what to do & the ability to be motivated without the threat of failing a class. While there were always places like Lockheed & 3D Robotics which would never touch someone without a formal engineering degree, it was not uncommon to get in elsewhere with a biology degree & a lot of design experience.


Nowadays, with the maker movement & the rise of the goo tube hacker, that doesn't seem to work anymore. It may be that they're now getting inundated with self taught engineers to the point that they need another factor to determine who wins. If the only factor was who could do the job for the least money, the lack of the degree should still allow a cost savings.


The modern self taught engineers may not be as skilled as the ones from 15 years ago, giving the whole idea a bad image. Most projects by self taught engineers certainly aren't as substantial as the old days. They tend to be copies of a wifi cantenna they got from goo tube, a real simple arduino robot, or a copy of a simple Ben Heck project. Because the crutch is there when it didn't exist 15 years ago, they automatically assume any self started project is a copy of a goo tube video.
Posted by Jack Crossfire | Nov 26, 2013 @ 12:10 AM | 4,457 Views
It actually has a way to directly connect a UART to the modulation. The problem is it can't do GFSK in that mode. It also needs a trigger to enter transmit mode. It would be quite involved. The preamble generation & detection would have to be done on the host. Some pins would have to be soldered.


Since the trigger would use the same old slow UART, it would need to buffer as much as the FIFO mode & make any latency advantage a wash. It would allow packets larger than 255 bytes, but that would be more susceptible to errors.


It's not hard wired to do 256 kbits/sec. The data rate can be set to 230400 bits/sec to better synchronize the transmit FIFO with the UART. Si recommends using a register calculator, but they don't provide any obvious register calculator in the wireless development suite. The existing register tables can be interpolated to give values that work for 230400.


The next big win was letting the beacon rate dynamically adapt to the size of the packets. That got the download speed up to 107520 bits/sec with no uploading & a download speed of 65280 bits/sec during a maximum upload speed of 59840 bits/sec. It couldn't be symmetric because it has a minimum beacon rate.


Having a master sending beacons to schedule the packets has remaned a lot faster than cooperatively trying to allocate time slices. The speed limitation may now be entirely the USB adapter, with a custom USB solution getting above 128 kbits/sec. It's still not fast enough for video, but it's almost bearable for static page loads.
Posted by Jack Crossfire | Nov 24, 2013 @ 09:45 PM | 4,564 Views
1 byte sequence numbers proved not enough to handle the error rate, so the headers were increased to 3 byte sequence numbers. They would just increase, leaving no question about whether a lower numbered packet was in the past or future. It would take 91 hours for them to wrap around.


That lowered the download speed to 96 kbits/sec. Then there was a case where it would lose the sync bytes & require a hack. After many more corner cases, the USB serial ports finally evolved into the biggest source of lockups. The FTDI board & not the PL2303 was the 1 which 1st died. The write call would freeze until it was unplugged.


If USB serial ports were the standard in the days of massive dialup call centers, they would have become a lot more reliable. That wasn't what happened & the 16550 was the chip which ended up hardened by the call centers of those days.


So the next step would be custom USB interfaces for the radios. It would buy slightly more speed. At this point, having experienced none of the expected range increase, barely usable bandwidth, & pretty lousy reliability, it makes more sense to get an ultra cheap access point from Walmart, extending the range with a waveguide.


96 kbits was still double what GSM or dialup could do. It's too bad you can't buy your own private LTE headend. 3D print anything you want except your own ISP.
Posted by Jack Crossfire | Nov 22, 2013 @ 05:52 AM | 4,891 Views
It was finally decided to go for the next big win, manely directly connecting the serial port to the modulation of the 3drradio instead of buffering complete packets in the 3drradio.


The Si1000 can't really connect the serial port to the modulation, but it can get real close by carefully synchronizing the FIFOs. It also automatically stops transmitting if the transmit FIFO runs dry. No 100mW radio chip is going to let you leave the transmitter on without transmitting data. The trick is running the air data rate 1 stop lower than the serial port data rate to keep the FIFO full.


Nothing is ever easy, in the wireless business. The ENPAC, CRC flags have to be set. Never could get it transmit directly from the FIFO without setting it to calculate a CRC & packetize it. The FIFO thresholds have to be perfect. The interrupts have to be managed. There have to be a lot of timeout handlers.


The USB adapters are not equal. The FTDI has to be the base & the PL2303 has to be the roamer. 1 of them isn't buffering properly.






So that was the serial port during a transmit & receive when the 3drradio had to buffer a complete packet before transmission, then buffer it again before reception. The 7ms delay was when the packet was in the air. That was without TDM. All the time during the serial port transfers was unused spectrum.




That was with the serial port directly connected to the modulation. It left only 1.5ms between transmit &...Continue Reading
Posted by Jack Crossfire | Nov 21, 2013 @ 05:22 AM | 4,941 Views
Did another round of testing with the IP over 3drrradio. The 3drradio is 1 of those radios, like the XBee, which shuts down if it detects a returning signal during its own transmission. So an attempt to use XBees for 1 direction with 3drradios for the other direction resulted in all the senders shutting down. Their tuning filters were not sharp enough to isolate 2.4Ghz from 900Mhz.


A bit more tweeking of the parameters got the download speed to 60 kbits/sec & the upload speed to 15 kbits/sec when everything is absolutely perfect. It's still too slow for the intended application.


The original idea of 4 cc1101 radios at 115200 bits/sec was the only thing with acceptable bandwidth, but the range was too short. But that experiment just directly tied PPP to the UART with no resends. Maybe the latest algorithm would work.


Simply tying the serial ports together at 230400 baud gave 173 kbits/sec in both directions, with the same resend algorithm. At 115200, it did 87 kbits/sec. The advantage is each direction has its own wire. The limitation is the latency of the serial port dongles.

The 3drradios & Xbees are limited by the need to buffer a complete packet before sending or receiving on the UART. If they could directly connect the UART to the modulation, they could pack in a lot more data.
Posted by Jack Crossfire | Nov 20, 2013 @ 04:24 PM | 4,298 Views


After months of secrecy, a photo revealing a 2nd X-47b appeared. That 2 were built was always widely known, but seeing 2 at the same time conveys a feeling that more must be around, or there must be a large budget.

There really are only 2 & the socialists really don't have enough money to build any more. The thought of compulsive health insurance, hyperinflation, & 20% social security tax spreading to the entire world makes you grateful that Americans can't afford to build any more.

The human brain may be wired to enslave itself, but the natural forces of economic scarcity have always prevented the path of enslavement taken by the USSR, China, & America from spreading, in the long term.
Posted by Jack Crossfire | Nov 20, 2013 @ 07:12 AM | 4,478 Views



Took another swing at the flashlight problem. The easiest way to make it more efficient was to boost the voltage to 9.9V & power 3 LEDs in series. 5 strings of 3 LEDs would suck 200mA. Bucking it down to 3.3V would take 600mA, a real challenge for a tiny inductor.

Made an exact, miniaturized copy of the microphone boost converter from 2 years ago & changed the target voltage to 9.8V. In the worst case of boosting 6V to 9.8V with 200mA, the MOSFET hit 60C & the diode hit 60C.

In reality, the lowest input voltage is 6.6V, at which point the battery is destroyed. The nominal voltage is 7.4V. The actual current for the 15 LEDs ended up being 170mA. 4 strings ended up using 30mA & 1 string ended up using 50mA.

Powering 15 LEDs with the boost converter now takes 400mA. Using the linear regulator, it took 600mA to power 10 LEDs. The battery should last 2 hours instead of 1. That's the power of the boost converter. You can always buy a more stable boost converter that does it in a lot less space, but that comes with a $15 tag.



...Continue Reading
Posted by Jack Crossfire | Nov 18, 2013 @ 08:11 PM | 4,533 Views



Looking at video of Battlefield 4, it's pretty impressive how much game graphics have improved, in the last 20 years. A frame by frame analysis of the compressed 1280x720 videos available reveals no difference between the PC & PS4 versions, as some kids have claimed.


The improvements have been slow & incremental, since the 1st Duke Nukem 3D game came out. The polygon count is getting to where the outcome is going to depend more on the quality of the artwork than any improvements in the game engine. It's not easy to make artwork that shows off the high polygon count while still looking like the real world. Motion capture has also contributed to better character animation.


The camera motion is a lot higher than it used to be. Games have gotten more nauseating because the camera moves around a lot more. 12 hours of Quake II were bearable, as it only moved in 2 dimensions. Battlefield 4 becomes unbearable after a few minutes, as the camera constantly rotates, shakes, & zooms. Where movement used to be continuous, it's gotten more jerky.


They've gotten rid of the extreme violence of Quake II. They don't show the enemy guts flying around, anymore. Views of the enemy getting shot are always kept very far away or off camera, with no blood. Even the knife slitting is kept off camera. Quake II must have been the peak of violence.


Female players have gone away. That peaked around 2001.



There are 2 dream games:

1: a...Continue Reading
Posted by Jack Crossfire | Nov 17, 2013 @ 11:39 PM | 4,719 Views
Internet over 3drradio (2 min 40 sec)


Some testing after all that development was pretty disappointing. The urban apartment complex range was 150ft. It was much farther than wifi, but so slow using it to load any web pages was barely survivable. It would be useful with the ancient email client Pine or a phone app, but the modern web based gmail was hopelessly slow.


The better option is still a waveguide antenna on a standard wifi router. The wifi standards have just been optimized to get the most TCP/IP performance out of the available power.
Posted by Jack Crossfire | Nov 17, 2013 @ 05:15 AM | 6,761 Views






Having only a 3drradio set as a 230400 bits/sec solution, it was worth hacking it to try to get the most bandwidth. Comment out most of tdm.c, most of packet.c, disable the broken check_code.py script & you can get the fastest 2 way communication out of it. A bit more hacking & it did effective CRC rejection before sending on the serial port. The CRC encoding was still done on the host. It also properly framed the full duplex packets.

That got 53600 bits/sec download speed & 11200 bits/sec upload speed, 2x faster than the stock firmware. It could actually load some web pages, with enough patience.

The firmware CRC rejection got it another 300 bytes/sec on the upload speed. There isn't enough RAM to have the entire full duplex scheme in the firmware.

The 3drradio was definitely a study in how many thousands of lines of code you can make hello world take. There must have either been a simpler way to accomplish what it did or it was the product of years of evolutionary programming.


With all the excess code removed, the 3drrradio no longer locks up, either. It annoyingly would lock up after a certain amount of time at maximum full duplex usage. It would recover after opening a serial terminal & injecting some random data into the stream.


Would say even in its intended application as a telemetry radio, it could do better by saturating the bandwidth with repeats.
Posted by Jack Crossfire | Nov 15, 2013 @ 08:50 PM | 4,451 Views





is horribly impractical, but works with enough glue.



No idea what motivated this, but once you get obsessed with a communication problem, nothing can stop you. It might be the hope of getting very long range or the desire of unemployed programmers to remember they can still write programs.


Wifi isn't really wireless because the range is useless. The phone company is worthless because it stops the moment you stop paying. Everyone dreams of running PPP on their own private, long range serial port radio that can reach for miles.


A serial port radio like the XBee, 3DRRadio, or CC1101 promises real wireless range, but has issues.IP requires full duplex asynchronous communication. Hook up your PPP connection directly to a 3DRRadio & it won't go anywhere.


The best results from serial port radios have come from filling the entire bandwidth at the highest bitrate with repeated packets & hoping some data makes it through. The fastest full duplex has come from constantly broadcasting beacons & waiting for replies, regardless of data usage.


It's not an efficient algorithm & it doesn't reach the theoretical maximum bandwidth, but it's practical. The algorithm would ideally be on the radio module instead of the host computer, but having it on the host allows the radio modules to be interchanged.


The idea is to have a sliding window of packets constantly rebroadcasting until they all get ACKs....Continue Reading
Posted by Jack Crossfire | Nov 13, 2013 @ 06:45 PM | 4,350 Views
The job market dropped dead in November. Did the western world stop writing software?

It's time for another round of applying to colleges for another degree. Last year's attempt ended up nowhere. It was fairly easy to get in, in the 1990's, but now it's super competitive just to get a basket weaving degree.

This year, there will be more attempts. There seems to be a pattern of having to borrow $100,000 for more education, every 10 years. Everything you earn goes back to education. The only winners are the banks. The economy constantly changes, but workers are still faced with an obsolete system that requires formal education & assumes 1 degree for 1 job for life.

There are stories of people in this death spiral moving to Asia to leverage the lower cost of living against their student loans. It's a temporary situation. There are immigration laws. Their debt is still denominated in the higher cost of living. They still have to pay US taxes.

The large number of continuing education seekers have made things complicated. There are no longer federal loans above a certain number of credit hours & tuition is double. Most public schools no longer offer 2nd degrees.

The economically easiest solution is to return to Fl*rida & finish the EE degree started 15 years ago. It would be emotionally difficult. There would be at least 1 flight back to Calif*, but it wouldn't be the same as driving down the 5 to a place that was previously earshot away.

The emotionally easiest solution is to discard the EE courses & start a CS degree in Calif*. They're very competitive & unlikely to let me in. No EE program in Calif* would let me in.

Either way, in 18 months, Calif* becomes a very depressing place & the happy place becomes Washington DC. That's closer to Fl*rida.
Posted by Jack Crossfire | Nov 11, 2013 @ 05:30 AM | 4,421 Views
Wiedemann run 2 (7 min 42 sec)




Had the brushless gimbal for this 2nd run up the mountain. It was either the need to manage the gimbal or the intense mileage lately, but it was 10% slower than the April 27 video. Ran 53 miles in the 5 preceding days. In the 5 days before the April 27 video, ran 12 miles.
Posted by Jack Crossfire | Nov 10, 2013 @ 03:34 AM | 4,691 Views
Posted by Jack Crossfire | Nov 08, 2013 @ 09:41 PM | 5,110 Views






It finally had to be put down so its enclosure could be used to make a flashlight. The enclosure probably won't last long, anyway.

It was made during the rcgroups downtime in Feb 2011, before there was a phone which could do the job. It was a speedometer/distance tracker/odometer/stopwatch/GPS logger/GPS clock.

The LCD was driven with voltage dividers & ordinary logic pins from 0-3.3V. It took some doing to reverse engineer how a passive matrix LCD could be driven from logic pins. The result was very contrasty & more legible than the device the LCD originally came from, but if it got hot, all the segments went dark. If it was too cold, all the segments stayed clear.

The LCD flex cable was another failure point. Pressing it down enough to make good contact squeezed the liquid out of the display.

The 8 bit PIC spoke the current speed through headphones, using the PWM driver. It was made without the aid of an oscilloscope, which nowadays sounds incredible. Those headphones were lost in 2011 & never found again. The speedometer function was used to run fast, but it required holding the GPS module very steady.

The distance tracker didn't work as well as hoped, either. It glitched way off indoors & you had to remember to pause it to go indoors. Phones still have the same problem.

The stopwatch & clock just copied GPS, so the stopwatch was accurate to 1 second. It wasn't very useful. The...Continue Reading
Posted by Jack Crossfire | Nov 08, 2013 @ 01:11 AM | 5,135 Views
These were the rage in 2005, when LEDs 1st became powerful enough to provide useful camera illumination. People started thinking of uses for a ring of light around a lens. 3 years of collecting $1 flashlights resulted in this. It rapidly gets more expensive to make the LED density higher.




...Continue Reading