Powerbot Optical Boundary Addition Mod

Inside the Roomba and Scooba and more, Cool mods, Repair and Upgrades - including the all new iRobot Create Kit. Let's void that warranty baby!

Powerbot Optical Boundary Addition Mod

Postby glnc222 » November 8th, 2017, 1:53 am

An alternative to Samsung's Virtual Guard imitation of Roomba virtual walls is shown for use with models not equipped originally with a boundary feature, as well as an alternative to some dubious aspects of Samsung's gaurd system. This mod has not been installed but all the functions involved tested. Construction and installation details of use are covered in the companion "Powerbot Mag Strip Addition Mod" http://www.robotreviews.com/chat/viewtopic.php?f=4&t=20181 -- which is installed -- where initial considerations of optical boundaries are discussed at the end.

Virtual Guards came from the older Navibot models but were not sold with Powerbot's in the U.S. They are still sold with some models in Europe, while in 2016 Samsung added magnetic strip boundaries to U.S. Powerbots.
The Virtual Gaurd is very different from Roomba's boundary, projecting in all directions of 360 degree circle, omni directional, with an unspecified boundary location; one manual comment suggests a 10ft radius. Moreover, the emitter activates only on receiving a coded TV remote like 38khz signal from the robot (so if the emission is cut down by a wall next to a door, the robot may be blocked from the activation signal).

The optical boundary is more work and parts which may not be worthwhile, compared to the mag strip addition, but is shown here to reveal what it would take to make such a system if wanted (sort of Mythbuster's style). The optical boundaries can especially be of interest for very long lines which would take a lot of mag tape -- besides being invisible.

Technical details, signals etc. of Samsung's guards are in thread http://www.robotreviews.com/chat/viewtopic.php?f=4&t=20181

Additional boundary marking sensors can be interfaced to the Powerbot cliff sensor, creating phantom cliffs for a boundary response. The cliff sensor input is grounded to signal a boundary.

There are two versions of an alternative boundary, analog and digital. Both use a 38khz IR signal similar to TV and robot remotes and other signals, received by specialized components.
VishayTSOP.jpg
VishayTSOP.jpg (9.85 KiB) Viewed 2138 times

The integrated receivers are sensitive and output the digital modulation of the 38khz carrier which is similar to a 1200 baud serial data stream. Codes are about 25ms long, 25 or so bits, and repeated every 100ms, in bursts to save emitter power often battery, as in TV remotes. There many coding formats used, RC5 etc. A continuous 38khz oscillation received outputs a constant logic LOW from the receivers.
The oscillating emitters are used to distinguish background illumination, especially incandescent lamps with IR light and 60 cycle noise, from the control transmission. The integrated receivers also supply amplification and high sensitivity, essential to any range of the beam, compared to any simple photo detector with discrete components.

The Powerbot dock emits a 38khz coded signal as well as the bot remote, so these must be distinguished from any signal supplied by a boundary emitter. The analog system uses continuous, uncoded emission while the digital system uses a TV remote as the transmitter (a cheap keychain remote can be used, as shown in Neato forum thread
"Optical Boundary Marking"),producing a coded signal which must be processed by a microcontroller to distinguish from the other Powerbot transmissions.

Both systems use IR receivers mounted outside the front corners, either outside or inside through the IR transparent plastic (needs testing), because of the geometry involved approaching a boundary, with Powerbot 9000's high back end blocking beams from certain angles. The sensors could be taped in place.

Image

Thin 30 gauge wire wrap wire can pass through the corner of the bumper opening, as used in a bumper extension mod in the Samsung forum, thread http://www.robotreviews.com/chat/viewtopic.php?f=22&t=19388&p=138691&hilit=tilt+limiting+mod#p138691

Digital System

Best but not finished -- not yet into microcontroller programming.

The TV remotes show a longer range than the analog system with a DIY transmitter, and can use single TSOP receivers on each corner, pointed upwards and receiving 360 degrees. As shown in the analog system two receivers can be combined with diodes for simplicity, and interfaced to the front cliff sensor (if needed the separate side sensors could be used, not tested).

[edit] The better TV remote results later seemed due to a brighter emitter, and an analog solution is possible. See later post http://www.robotreviews.com/chat/viewtopic.php?p=145880#p145880

[edit] A USB 5v AC adapter can power the TV remote continuously with this circuit.
Schematic3vSupply2.jpg

An older circuit used three power diodes 1N4001 with smaller voltage drops, but can produce voltages below 3v, and the coin battery in the TV keychain remote (vs big remotes with AA cells) has to be a little over 3v to work, fussy thing. The 47 ohm resistor is critical, as voltage drops on higher loads, and rises with smaller. Insures the diodes are loaded to stabilize the voltage drop. Don't want to over voltage the remote, no telling properies.

Not yet developed, needs coding. An 8 pin PIC microcontroller such as 12f683 or 12f675 should suffice, for both the mag strip and optical boundary inputs. For the the optical boundary the software would merely recognize the code from a TV remote such as the volume-up key used on a keychain remote (in the default format setting not synced to a different TV brand). Extensive remote control coding software is supplied for Arduino, and a few individual projects for larger PIC versions (more generally useful to hobbyists). A general decoding program is not needed.

Image

[edit] signal detail: regardless of the official scheme, the code can be described for programming purposes as 26 bits (on active low for 1, high for zero), with an assymmetry where ON (low) bits are 875 usecs long (7x125), and OFF bits (high) are 625 usecs (5x125). The gap between repeated codes is 85ms. Bits can be sampled at a point centered on an assumed OFF bit, and if measured ON skip a longer distance to the next bit center, again assumed OFF. Once output is turned on, it must remain on until verifying that no repeated code follows.

Analog System

[edit] Proper IR Led emitters working at low power were only found later, and make this option practical. See later post http://www.robotreviews.com/chat/viewtopic.php?p=145900#p145900

Analog emitters were not found practical in the mag strip addition report because it turned out very low power was used in the test emitters. The 555 oscillator IC's used for 38khz signals did not sink all the current theoretically expected, leaving the test LED's dim (hard to see in IR...).
With a power transistor added and dual emitters (similar to the keychain remote), a range of at least 10ft was achieved, so the ciruits are posted here.

To get a useful range of detection two IR LED's had to be pulsed at 200ma each, maximum specified, requiring an AC adapter power instead of batteries. To assist with possible battery use a 10hz pulsing circuit is supplied similar to TV remote repeat functions. With a 5v supply a lot of power must be dissipated by the LED current limiting resistor, running around 1v itself. With lower voltage battery power, the limiting resistor could be adjusted and the power transistor connected to as low a voltage as possible. Still a lot of current is needed as these things go.
Ventillation of the hot resistor is required

Frequency does not need to be precise; a 30khz spec receiver still responded to 38khz tv remotes. 38khz just seems to be the most widely used standard in consumer electronics, vs specialized systems.

Schematic555TV38khz.jpg

Schematic555TV10hz.jpg


[edit] Correction: the 100uf power supply filter capacitor is necessary to remove oscillator signals from the power supply if used for other components such as any receivers, which will otherwise show false indications, active in absence of IR signals.

Note 556 is a dual package of 555's, sharing power supply pins for 14 instead of 16 pins for two 555's. But this cannot be used where a low frequency 555 powers the high frequency one with the low frequency output.

[edit] For lower voltage battery use, it might be necessary to adjust the value of R2, not sure, for the frequency. It works with a time delay defining frequency, for the capacitor to reach a trigger voltage, presumably faster if charged with a higher voltage. Such fine details are in the data sheet, link at Digi-Key.com.

Narrow focus 20 degree IR LED's TSAL6100 are specified, though I may have tested others; also brighter than others. It may be possible to narrow the beam further with collimating lenses as discussed in the Neato forum "Optical Boundary Marking Thread", but needs work.
Image

With the DIY emitter the integrated receivers must face the emitter, unlike the digital, TV remote system which appears to receive 360 degrees with the receivers pointed up. Two receivers are needed on each corner, put together at right angle and angled 45 degrees front and rear (see the geometry diagram above), getting 180 degree coverage. The receivers use little current, so just a cost issue.

The analog system uses a Texas Instrument low power TLC393 comparator to ground the cliff sensor input when a boundary is detected (8 pin dual package DIP IC, best installed in a socket). Open collector (disconnected) high output leaves the regular cliff sensor signal undisturbed.

To exclude coded signals from the dock and remote, an RC and diode filter operates (with active low receiver signal), to delay lowering the output so the oscillating coded signals do not pull it down much, a volt at most, and returning to 5v over the 100ms pulse interval common. The capacitor charges at an even slower rate so as to bridge the gaps between pulsed operation of the emitter with 50ms gaps, at 10hz. The pulsed input produces an output to the comparator which oscillates but never goes above the trigger reference voltage.
As a TV remote emitter would be excluded along with the Powerbot signals, only a digital decoding as above could detect these signals, compared to the analog emitter used here.

Schematic555TVrcvr.jpg


Electronics can be assembled on perfboard (cuts with hacksaws). Installation is by patch cable into the Powerbot between the cliff sensor and its cable socket (4 pin 2mm pitch header) -- unless you want to cut the existing cable wires, probably not as helpful anyway with the interface board to be wired. Common JST plugs, available widely with attached cables, do not fit the Samsung header shells, too thick, but straight female 2mm pitch headers fit and can be used to make a cable. Also pins from JST plugs can be removed and covered with heat shrink tube to eliminated the over-size shell. As shown in the mag strip addition mod
Image
Image
Last edited by glnc222 on November 17th, 2017, 1:36 am, edited 7 times in total.
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Powerbot Optical Boundary Addition Mod

Postby mfortuna » November 8th, 2017, 7:36 am

Nice work! The 555 lives on.
Mike
Reds x 3, Dirt Dog, Disco (now a parts bot), Create, Scooba 350, and Security Dawg
Evolution Mint
Neato XV-11
User avatar
mfortuna
Robot Master
 
Posts: 5771
Joined: February 5th, 2006, 10:35 am
Location: NH

Re: Powerbot Optical Boundary Addition Mod

Postby glnc222 » November 11th, 2017, 3:12 am

TV Remote Signal Detail

Regardless of the official encoding scheme, the code shown above can be described for programming purposes as 26 serial bits (ON active low for 1, high for zero), with an assymmetry where ON (low) bits are 875 usecs long (7x125), and OFF bits (high) are 625 usecs (5x125), no gap between bits. The gap between repeated codes is 85ms. Bits can be sampled at a point centered on an assumed OFF bit, and if measured ON skip a longer distance to the next bit center, again assumed OFF (skip 625 usecs when the current bit is OFF, or 875 usecs when ON, always landing at 625/2 in the next bit -- or at any distance from bit start where the first bit is detected, which could vary with higher frequency sampling to detect the code start). Once output is turned on, it must remain on until verifying that no repeated code follows, to keep output to cliff sensors from oscillating at the burst repetition frequency and signal the robot in a smooth fashion.
The first few bits of codes are device ID's, followed by function numbers, with the TV remote ID distinct from the Powerbot sources.

A compact algorithm in general terms will be posted next, as a guide to programming, with details dependent on particular PIC or Arduino features. Over the next few weeks I may be able to present complete code as materials arrive.
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Powerbot Optical Boundary Addition Mod

Postby glnc222 » November 11th, 2017, 11:34 pm

Minimal Decoding Algorithm

Specific to the TV remote volume-up key code shown previously.

Start: Set output off.

Step 1. Read input every 100 usec for 4 ms or until a code start detected.
If no code detected in 4ms (40 repetitions) set output off and repeat step 1.

Step 2. When code started, validate code: For 25 additional bits (first always 1):
For each bit, wait 625 usec if input high (OFF -- active low), or 875 usec if ON,
then read input and compare to value required at that point (coded in instructions).
If the bit is invalid set output off, wait 30 ms (skipping past code end) and repeat step 1.
If the bit is valid repeat step 2, through 25 bits.

Step 3. Valid code found: set output on. Skip 83 ms partial 85 ms burst interval and repeat step 1.

(methods of timing depend on processor features, clocks, interrupts etc.)
The cliff sensor drive requires an active LOW, open collector output (using diode or transistor if needed), as the output ON condition.
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Powerbot Optical Boundary Addition Mod

Postby Bandi94 » November 12th, 2017, 12:38 pm

I have made a small "library" for standard NEC decoding for PIC-micros, it can be adapted to run on almost any model. Anyway it sound over engineering for the current application. I would just send from the base a 38Khz modulated signal maybe 6-7ms long each 150-200ms. Then on the receiver part i would set up an interrupt on the PIC and start timer0 on 1ms interrupt, then put it to deep sleep mode (power consumption only coupe of uA), when the TSOP will pull it's output low on beam detection the interrupt would wake the PIC up, starting the internal oscillator timer0 would also start counting, a small while loop with the condition of interrupt pin still low. When finally the interrupt pin goes high i would check the time, if is smaller then 6-7ms in means is some other remote device so PIC goes back to sleep. I don't think that any IR protocol would use 6-7ms long pulses so there is no need to complex decoding protocol.

With a small smd package the receiver could be as small as 2x2cm board, as you would only need a transistor to pull the cliff sensor to low. The 5V is already regulated by the powerbot, almost all PIC's have internal oscillator so no other external component required besides the PIC, a smd transistor and a gate resistor.
Bandi94
 
Posts: 16
Joined: October 2nd, 2017, 4:18 pm

Re: Powerbot Optical Boundary Addition Mod

Postby glnc222 » November 12th, 2017, 12:52 pm

The peculiar problem was getting a high performance beam emitter. For unknown reasons, the apparently low power keychain TV remote is detected over long range by the Vishay receivers, while two high power 5mm IR LED's pulsed by a 555 oscillator at maximum 200ma each had a shorter, unimpressive range. I had read some TV remotes will use a short duty cycle over driving led's at 500ma, difficult to reproduce without the details of particular emitters. Besides the keychain remote is very inexpensive and compact, with removable led's for varied base construction.
I had also detected a Roomba Virtual Wall thirty feet away with a Vishay receiver. They use about 100ma on average, so again maybe an issue which LED emitters are used. Not enough data.
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Powerbot Optical Boundary Addition Mod

Postby Bandi94 » November 12th, 2017, 5:55 pm

Most of the remote's will over drive the LED's after all most of the IR led's are designed to do so. I used TSHF5210 Diode with peak current of 1A (absolute maximum rating is 1.5A) with the condition that one pulse to not be longer than 100uS (10khz minimum and not over 50% duty) i achieved range up to 7m in full sunlight condition with the TSOP in shadow without any optics, with some lens it should work at 15-20m. The thing is to don't go above the typical 100mA on average, but in this condition the led will be on top's 100ms and 900ms off so that' exactly the recommended 100mA if the led would be static on but it's not because the 38Khz modulation so the avg current would be around 50-70mA. In long range detection ( IR barrier ) the protocol is kept as minimal as possible, to get very short on pulses and longer off periods to be able to pulse the diode on very high current', after all for long range detection the instant emitted light is what count's and not so much the duty cycle or actual data sending. TSOP's will work fine with 40% duty maybe even lower with 35% ( never tested lower than 40%)
Bandi94
 
Posts: 16
Joined: October 2nd, 2017, 4:18 pm

Re: Powerbot Optical Boundary Addition Mod

Postby glnc222 » November 14th, 2017, 4:33 am

New Analog Results -- With TV Remote Emitter

The keychain remote turns out to run on an overall 5 per cent duty cycle comprised of 40 per cent in 38khz, about 50 per cent within code bursts, and 20 per cent from burst interval. The average current load is 1.75 ma (with one emitter; one was removed), for a peak load 38ma, at 3v with no current limiting resistor. 3mm LED vs 5mm TSAL's used in 555 experiments at high power. There is no way to identify the LED part number.

Reproducing this with an all 1's code, a short continuous signal, eliminates the need for a microcontroller and its programming, capable of RC filtering to exclude oscillating codes. Using the 555's with the 10hz pulser shown previously set with R1=62K, R2=22K, a 12hz, 80 per cent duty cycle (high) signal was produced, which is inverted with 4.7K resistor and BC547 NPN transistor for pulling down the 38khz 555 80 percent of the time, for a 20 per cent LED drive active low (555's do not operate with greater than 50 per cent active low). With one of the remote's two emitters running peak 44ma through a 47 ohm limiting resistor on 5v supply (vs remote 3v), good reception by the TSOP receiver was observed, more like the TV remote performance obsverved compared to previous 555 experiments.

The transistor can be eliminated by using the pulser 555 output as the power ground pin 1 of the 38khz 555 -- already inverted. A schematic will be added here later.

Brightness of those 3mm LED's must play some role in the remote's long range observed.
Seems I had a very dim variety IR333-A. 7.8mW/sr @ 20mA 20 degrees
Interesting 6 degree bright VSLY5940 6 degree -- no further lensing needed -- 100ma, 300mW/sr @ 100mA, 1.65v
Compare TSHF5210 20 degrees 120mW/sr @ 100mA.
Testing a VSLY soon.
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Powerbot Optical Boundary Addition Mod

Postby glnc222 » November 16th, 2017, 12:34 am

DIY Boundary Activation Signal

[edit] This discussion is somewhat obsolete by the following post reporting extremely low emitter power needed with the proper LED. With the 2ma power drain of an emitter, an activation signal from the robot to a DIY boundary emitter to activate it seems practical. Note here how the competing signal from the dock can be filtered.


While most model Powerbots will not emit the Virtual Guard activation signal, for those which do so the same analog technique for detecting a DIY emitter can be used to control the 555 based transmitter. The activation signal is dense over 2.5 second intervals with similar gaps, while the Dock signal is very short and repeats around every 100ms. The Dock signal has a very low average duty cycle with the activation signal higher, so an RC filter can distinguish the two. A TSOP receiver in the transmitter can switch a P-channel mosfet with RC delay filter to power the 555's.

I would not add a custom emitter to the Powerbots lacking the Virtual Guard signal because of the power requirements. However, it is possible to tap the indicator LED on the dock (as I do to operate a kitchen timer for run length, another TLC393 comparator application), and construct a robot-departed controlled line powered emitter which might flood the room and activate battery powered boundary emitters in that room. Similar activation emitters could be placed in other rooms for control with smart home power line controls, operated from the dock status indicator interfaced to the home controller. A different 555 modulation pattern could allow the boundary emitter to be distinguished in the robot receivers with analog components without microcontroller use. Microcontrollers certainly are the modern style, but the programming can be complicated if not already familiar with that subject and algorithms for this sort of application.

Line powered boundary emitters need no activation as practical to just run continuously. Power line timers can also be used to operate only during scheduled cleaning times, or just during the day.

Roomba has a system where the robot sends a radio signal to all the virtual guards to turn them on when cleaning.
There are some very small WiFi receivers such as added to Neato robots in the Neato forum here. Perhaps they could be put into boundary emitters and the Powerbot dock used to control some WiFi transmission for the whole house.

When the Powerbot talks to Amazon's Alexa and similar over WiFi, it might be possible to modify code in the Alexa "Skill" addition for interfacing the Powerbot, to arrange a WiFi signal to boundary emitters from Alexa. Amazon supports Skill programming on a website.
Last edited by glnc222 on November 18th, 2017, 3:33 am, edited 1 time in total.
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Powerbot Optical Boundary Addition Mod

Postby glnc222 » November 17th, 2017, 1:15 am

Extreme Low Power Emitter

Proper IR LED emitters turn out to make all the difference. With VSLY5940 or SFH4545, only 4 ma peak current, on 5v supply with a 1K limiting resistor, is needed with the above 555 circuits for reception by a TSOP4838 at least 15 feet away. The average load of the whole circuit is under 2ma similar to the TV keychain remote. Battery operated boundary emitters are thoroughly practical. D- size flashlight cells have 12000mah or more capacity at their 1.5v. It is also a matter of receiver sensitivity.
There can be problems with reflections off walls with high sensitivity, so experiments can determine useful power and beam focus to use.

The VSLY5940 is specified with a narrow 6 degree angle spread but the beam is detected over wide angles anyway. So some further collimation of the beam may be worth investigating, but I am not pursuing it further. Mag strips serve in my situation.

It also turns out that the 100uf power supply filter capacitor previously shown optional, found in web projects, is actually necessary to keep oscillator signals out of the power supply if used for other components such as any receivers. False indications can occur without it.

Schematic555TV12hz.jpg


The 556 dual oscillator package cannot be used in this case as the power supply is shared between the two.

I do not have resistor values for 3v battery operation if they turn out different. I suggest beginning by keeping the ratio of R1/R2 shown, which governs the duty cycle, if any reduction is needed. The frequency and duty cycle scales of good multimeters can be used to calibrate.
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.

Re: Powerbot Optical Boundary Addition Mod

Postby glnc222 » Yesterday, 3:44 am

Emitter Activation Revisited with low power emitters

With such low power found above to make emitters, it would seem practical to add emitters to the robot to activate battery operated boundary emitters in the same way Samsung's Virtual Guard system works -- on models equipped.
This can now be added to other models. The activation emitters would be on the sides along with the boundary receivers, to activate transmitters off to the side as the robot approaches a boundary.
Reflections can be important in this case, as the activation signal can be reflected back to the sensitive receivers of the boundary signal. The main signal to filter out is the dock signal, which seems to have a very low average duty cycle easily distinguished. With more power and room for parts in a DIY boundary emitter, some distinction between the boundary and activation duty cycle might be made by selection of suitable duty cycles, with analog RC filter components and comparator thresholds -- something shorter for the activation but longer than the dock.
With microcontrollers, simple but different encodings can be constructed more easily handled than Samsung's own. Precise difference in the length of an ON signal could be measured, without having to send digital number encodings.

SchematicActRvc.jpg
glnc222
Robot Master
 
Posts: 4582
Joined: January 23rd, 2012, 9:19 pm
Location: North Carolina, U.S.


Return to Robotic Hacking

Who is online

Users browsing this forum: No registered users and 302 guests