New! Improved! Multi-Mode Firmware Upgrade Available

Get help and show off your TV-B-Gone kit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
PorkRhombus
 
Posts: 30
Joined: Sun Jun 28, 2009 4:29 am

New! Improved! Multi-Mode Firmware Upgrade Available

Post by PorkRhombus »

I have developed a new firmware version and thought I'd post about it in case anyone is interested to try it out. I am calling it v2.0 since it is based on v1.2 but it introduces a lot of new functionality and it also involves a small hardware change (described further down with a photo).

The main feature of the new firmware is the fact that it has three modes of operation which are selected at initial power-up.

The modes are as follows:

Mode 1: Default mode. Pressing the button causes all codes to be transmitted just like before.
However the LED is now solid ON because the blinking draws too much unwanted attention.
Also, the pause between codes has been reduced to 75ms. There are no region blinks or end-of-run blinks
as I didn't find these remotely useful, nor indeed could I tell the difference between 3 and 4 rapid blinks.

Mode 2: Codes are transmitted as long as the button is held down.
Each time it is pressed, transmission restarts from the top of the list.
This is nice because often you hit your target within the first few seconds.

Mode 3: Codes are transmitted one at a time. Each code is accompanied by a flash (double flash every multiple of 10). In this way one can determine which code is switching off a particular TV and the WORLDcodes.c file can then be edited, and the program recompiled, to change the transmission sequence. This mode is of interest mainly to, er.., developers, though hopefully they will share the results of their investigations in the form of new, enhanced software builds that have more of the popular codes near the start of the sequence. My desire to identify the code(s) for LG TVs was the main impetus behind this new firmware. LG TVs are everywhere and yet they are not among the first codes broadcast. ** STOP PRESS ** I have already made some changes to the transmit order.

After power-up, the LED flashes for 2 seconds during which time any further press will cause the device to enter the mode selection 'screen'. Subsequent presses at this time cause the modes to be cycled through. To enter your selection, wait a few seconds after the last button press. In case it's not already obvious, I love maximizing what can be done with one button/one LED interfaces! Oh, and in case you want to change modes without disconnecting the power, you can do so by using a key, coin etc to briefly connect the bottom two pins of the 6-pin connector.

Note: The mode (and region) selection is maintained for as long as the device has power and as long as a low battery condition does not trigger a reset. Since I am using a rechargeable Li-ion battery which I charge through the 6-pin connector, I can maintain my settings indefinitely. Even if you are using primary cells (i.e. non-rechargeables), you may find that if you are quick with your battery change, the 220uF capacitor offers enough power reserve to avoid loss of data.

The hardware change:

You have to cut one track (use a sharp X-Acto knife because it's a thin track) and solder a link from the switch to a pad that was originally meant for the region selecting resistor (R3). I recommend that after you cut the track as shown, you should verify that there is no continuity between the left hand side of the switch and the RESET pin (pin 1 of the IC or the bottom left pin on the 6-pin header). Also verify that there is no continuity between the left side of the switch and ground (battery negative connection), nor between RESET and GND.
TVbG_v2_hw_mod_sml.JPG
TVbG_v2_hw_mod_sml.JPG (45.17 KiB) Viewed 7706 times
The reason for this modification is to change the pushbutton's function from resetting the device to simply waking the device from sleep. Once the device is awake, the pushbutton is also used to provide control input to the software, something which is practically impossible if the device resets each time the button is pressed. Because it's now pin 6 of the IC, not pin 1 (RESET) that goes to the switch, we don't have the option of installing a region setting resistor. The default region is US, but if you use the dual-region software and want to boot up in EU mode, just hold the pushbutton down when you power-up the device and then immediately release it. If you use the region specific software version (either US-only or EU-only), it defaults to the correct region and no button-holding is necessary.

The software can be found at https://sourceforge.net/projects/tvbgone/files/

The readme.txt contains a lot more information about this release as well as tips for those who may not be 100% confident with programming their chip (you do need a programmer). Please note: I recommend you program your chip out of the TVbG, not in-circuit. The readme explains why.

I hope you enjoy it! Please share your experiences here.

< < < < < < < P 0 r K _ r H 0 m B U 5 > > > > > > >

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: New! Improved! Multi-Mode Firmware Upgrade Available

Post by adafruit »

yum pork rhombus! we'll blog this up!

PorkRhombus
 
Posts: 30
Joined: Sun Jun 28, 2009 4:29 am

Re: New! Improved! Multi-Mode Firmware Upgrade Available

Post by PorkRhombus »

Hello again Adafruities.

For your delectation and delight version 2.1.1 is now available for download at https://sourceforge.net/projects/tvbgone/files/

I have only put up the US version at this point. If you want euro or uni, leave a comment here.

v2.1.1 has push-to-transmit as the default mode as it's so much better than legacy mode. It also improves the detection and handling of brownout conditions (i.e. when the battery voltage drops under load to a point where the microcontroller resets itself).

If you haven't yet upgraded to v2, the main advantages are:

* Transmit codes faster. 75ms gap between codes rather than 250ms.
* Only transmit as long as necessary. Push-To-Transmit means you can release the button as soon as you hit your target. The batteries last a lot longer this way.
* Super Mega Hacker Modes and super snazzy region select mechanism (read the manual!)
* LED does not flicker during transmit. Draws less attention this way.

Honestly, you will wonder how you lived without it!

BTW I'm getting some v2 PCBs made so in future the hardware mod will not be necessary. Plus the ergonomics will be improved. Watch this space.

Bye for now,

PR

User avatar
dj505Gaming
 
Posts: 17
Joined: Sun Oct 19, 2014 2:51 pm

Re: New! Improved! Multi-Mode Firmware Upgrade Available

Post by dj505Gaming »

Awesone mod! Is it compatible with the new blue boards yet?
By the new boards I mean these ones:
Image

It looks like the hardware mod will work, but I can't be completely sure

PorkRhombus
 
Posts: 30
Joined: Sun Jun 28, 2009 4:29 am

Re: New! Improved! Multi-Mode Firmware Upgrade Available

Post by PorkRhombus »

Yep, it will work with that board.

User avatar
claytoncamilleri100
 
Posts: 3
Joined: Tue Jul 22, 2014 7:06 am

Re: New! Improved! Multi-Mode Firmware Upgrade Available

Post by claytoncamilleri100 »

I built the kit but I am noticing that the kit is not going into sleep mode and the status led isn`t turning off.

User avatar
damage
 
Posts: 42
Joined: Sun Sep 26, 2010 1:22 pm

Re: New! Improved! Multi-Mode Firmware Upgrade Available

Post by damage »

I am a bit of a noob to messing with AVR outside of the arduino environment. How do I change the order of the codes... Here is what I tried (and it didn't work).

I noticed my TV is the 4th press using mode 3, so I edited the section towards the bottom of worldcodes.c to the following...

I put

Code: Select all

&code_na020Code,	// LG/My Visio
at the top of the list. (it was originally after panasonic.)

Doing this my TV is still #4. Basically, making this change had no effect as far as I could tell.


Here is an excerpt of my modified code...

Code: Select all

const struct IrCode *NApowerCodes[] PROGMEM = {
#ifdef NA_CODES
	&code_na020Code,	// LG/My Visio
	&code_na000Code,	// Sony
	&code_na007Code,	// Samsung
   	&code_na002Code,	// Panasonic
	&code_na003Code,

for reference, here is a snippet of the original unaltered section of the code..

Code: Select all

const struct IrCode *NApowerCodes[] PROGMEM = {
#ifdef NA_CODES
	&code_na000Code,	// Sony
	&code_na007Code,	// Samsung
       	&code_na002Code,	// Panasonic
	&code_na020Code,	// LG
	&code_na003Code,

Locked
Please be positive and constructive with your questions and comments.

Return to “TV-B-Gone Kit”