Homebrew Remotehead for DMA Uniden

Status
Not open for further replies.

SCPD

QRT
Joined
Feb 24, 2001
Messages
0
Location
Virginia
Just to wanted to let your all know im taking a break on this project. So far nothing is working. I have been working on this for about a month. I need to step away from it collect my head and go back at it. I ordered to serial 2 ttl adapters and it still not working. See you all in about a week. I have a ton of questions.

Mike

Rich: You did an amazing job and im really impressed with your skills and work on this idea
 

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
Xeno - Thanks. I appreciate it.

The TTL to Serial was a big PITA. It was out of desperation that I used a Null modem adapter to get it working. Take my program and strip out all the LCD and button stuff leaving just the Serial stuff. My first command that I got working was KEY,H,P Once I got that I was pretty much home free.


Rich
 
K

kb0nly

Guest
Coolcat - That's the same output I was thinking of doing. I'm glad I'm not the only one that feels the same way.

Trixter - Yes, it's possible but I don't think the battery has enough amps to keep it going for long.


Rich

What i plan on doing it re-assigning a pin of the db9 on the back of the scanner to 12v power, the Arduino external power jack can take 12v, so i will use a small 1/4w resistor sized fuse tapped off the power switch of the scanner to route power to the db9 inside the scanner, i got a box full of them for modifying stuff, and run power through the remote head cable to the Arduino. That way it turns on and off with the scanner from the same power source.

I will probably make an enclosure for the remote head that the serial connection comes in on the back, use a right angle db9 on the cable to keep it compact, kinda like a motorola control head type setup.
 

SCPD

QRT
Joined
Feb 24, 2001
Messages
0
Location
Virginia
Rich i want to make sure i have this correct based on your last know working drawing

(LCD)
Pin 1 to Gnd
Pin 2 to +5v
Pin 3 to Pot middle pin
Pin 4 to Arduino Pin 12
Pin 5 to Gnd
Pin 6 to Arduino Pin 11
Pin 7 N/C
Pin 8 N/C
Pin 9 N/C
Pin 10 N/C
Pin 11 to Arduino Pin 5
Pin 12 to Arduino Pin 4
Pin 13 to Arduino Pin 3
Pin 14 to Arduino Pin 2

(POT)
Pot pin left to Ground
Pot pin Right to +5v

(SERIAL TO TTL)
TX to ARDUINO RX
RX to ARDUINO TX
GROUND TO GROUND
VCC TO +5V

(Buttons)
Button 1 To Arduino Analog 0
Button 2 To Arduino Analog 1
Button 3 To Arduino Analog 2
Button 4 To Arduino Analog 3

(ARDUINO to breadboard or PCB)
ALL +5v Connections to a +5v rail
ALL Ground Connections to a Ground Rail
 
Last edited:

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
Does your LCD have a backlight? Is it lit? Have you tried adjusting the contrast via the pot.

I put together a little program for Xeno I'll share here in case someone else runs into issues. It's a very stripped program that will print two lines of text to the LCD. It also send the hold command again and again to the scnner.

To test connectivity of the TTL you can use a PC and hyperterminal. Connect the TTL to your serial port, fire up hyperterminal and set it to the same baud rate. For me I have it set for 115200, 8 Data bits, Parity None, Stop bit 1 and Flow Control None. If the wiring is correct your will see KEY,H,P on your screen repeated over and over.


Rich
 

Attachments

  • UnidenLCDSerialTest.zip
    320 bytes · Views: 99

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
If you see to startup messages then you are on the right path. The arduino should be now trying to talk to the scanner and is waiting for it to reply. If no reply is received it will just sit and wait. The scanner should be powered on prior to the arduino receiving its own power. I did put a delay into the beginning of the program to offset the time it takes the scanner to initialize.

I would try connecting the TTL to a PC or laptop and utilize hyper terminal as I described before. The TTL was the biggest pain, next to the buttons. It took me over a day to figure out I was programming it wrong and another three days to figure out I needed a Null adapter.

Rich
 

SCPD

QRT
Joined
Feb 24, 2001
Messages
0
Location
Virginia
Trixter: I also had a problem with the setup but it is the serial to ttl converter and i had to order a different one cause i think i fried mine.
 

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
New version coming soon.

20x4 and 16x2 LCD displays are now both supported. I've made some changes to the way that I retrieve information from the scanner. Previously I relied strictly on the output from the STS (status) command. While this was fine with a two line display, a four line caused me a lot of chaotic code. Now, I am using the output from the GLG (Get Reception Status) command. I still use the STS but only during the time when the scanner is searching for a signal to lock in on. The side effect of this is that I fixed a bug when displaying certain channels. I’ve also added the ability for the Arduino to read your current volume setting. I left in the ability to have a middle volume level, but this is just in case the volume isn’t ready for some reason.

20x4 demo:
YouTube - ‪IMG_0104.MOV‬‏

16x2 demo:
YouTube - ‪IMG_0114.MOV‬‏


Rich
 
K

kb0nly

Guest
Thats Fantastic Rich!

Is there a wiring difference between the two sizes of displays or is it the same as the pinout that was posted?

Also, are you going to make a version of the four line code for the 796D for me to test? Would be most appreciated!!

Can't wait to get my parts and start learning this, have to dust off the brain and get into this type of development again. I looked at the two line display file you made for the 796D, downloaded the software from the Arduino website and loaded it, i'm slowly learning, but jumping to the four line display might get me all confused without an example to look at first. Who knows i might not even make any changes to what you come up with!
 

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
kb0nly - Character LCD's usually use the same driver chip, HD44780. Most displays do use the same pinout, but there are some that flip a few pins. If your display doesn't have a backlight, pins 15 & 16 won't be on the board.
Here is the pinout the two screens I've used.
1. Ground
2. VCC (+3.3 to +5V)
3. Contrast adjustment (VO)
4. Register Select (RS). RS=0: Command, RS=1: Data
5. Read/Write (R/W). R/W=0: Write, R/W=1: Read
6. Clock (Enable). Falling edge triggered
7. Bit 0 (Not used in 4-bit operation)
8. Bit 1 (Not used in 4-bit operation)
9. Bit 2 (Not used in 4-bit operation)
10. Bit 3 (Not used in 4-bit operation)
11. Bit 4
12. Bit 5
13. Bit 6
14. Bit 7
15. Backlight Anode (+)
16. Backlight Cathode (-)

Yes, I will make another version for the 796D that supports 20x4 screens. I'll probably start tonight.


Rich
 

K4APR

Member
Joined
Apr 18, 2003
Messages
1,028
Location
Chesapeake, VA.
Our version really takes all of the guess work out of prototyping with an ST202/MAX232 level converter:

http://www.rpc-electronics.com/development.php

It was designed to be plugged directly into a breadboard for prototyping, unlike the module linked to. With a 2x3 header like that one has, you can't plug that into a standard breadboard without shorting the pairs of pins together. The pins our clearly marked on ours showing the where TTL to/from the Arduino/Microcontroller should be connected. You just pull 5V from the Arduino to power it within the entire system.

OK follow the pin layout xeno194 used above, got all built and loaded, but nothing on the display from the scanner. No reaction from the push buttons either. So I know that the scanner and the remote are not talking. I check the TTL and it has 5volts going to it.

I'm using the 996XT. Tried it on the front and rear serials with and without the null, changed the baud in the scanner and the Arduino.

What else can I check to see it it is the TTL? If I need a new one I will order it, just need some help on the troubleshooting of it.

This is the TTL I ordered
MAX232 RS232 To TTL Converter/Adapter Module Board New | eBay

Thanks guys,
Mike
 
K

kb0nly

Guest
kb0nly - Character LCD's usually use the same driver chip, HD44780. Most displays do use the same pinout, but there are some that flip a few pins. If your display doesn't have a backlight, pins 15 & 16 won't be on the board.
Here is the pinout the two screens I've used.
1. Ground
2. VCC (+3.3 to +5V)
3. Contrast adjustment (VO)
4. Register Select (RS). RS=0: Command, RS=1: Data
5. Read/Write (R/W). R/W=0: Write, R/W=1: Read
6. Clock (Enable). Falling edge triggered
7. Bit 0 (Not used in 4-bit operation)
8. Bit 1 (Not used in 4-bit operation)
9. Bit 2 (Not used in 4-bit operation)
10. Bit 3 (Not used in 4-bit operation)
11. Bit 4
12. Bit 5
13. Bit 6
14. Bit 7
15. Backlight Anode (+)
16. Backlight Cathode (-)

Yes, I will make another version for the 796D that supports 20x4 screens. I'll probably start tonight.


Rich

Ok Awesome! I have been a tinkerer of electronics for so long that i should know this stuff but i have never dealt with these LCD modules or the Arduino before. Getting excited at how much i will learn!!!

Waiting for the stuff to come in the mail is driving me nutso.

Will keep an eye on the thread and watch for your 796 update. Have to sit down with some catalogs and figure out what i am going to use for an enclosure yet but otherwise i got my design down.
 

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
kb0nly - Here you go. I've tested it the best I could. There are two variables you will need to set before uploading the sketch to the Arduino, lcdColumns and lcdRows. I've tested used a 16x2 and 20x4 LCD. Anything else might work, but I won't be able to check.

The next version for the 396XT, 996T, etc should be out in another day or so. Just trying to clean up the code a little.

Enjoy


Rich
 

Attachments

  • HomebrewRemoteforUniden_BC796D_v2c.zip
    2.9 KB · Views: 91

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
All -

Version 2.0 is done. I’ve added some minor features like the ability of the Arduino to read your current volume setting at boot. I left the volumeCounter setting in case the Arduino misses the reading. It only attempts the read once, otherwise reboot the Arduino. I’ve also reworked the way I read data from the scanner. This was needed to make usage of a 4 line display easier. Reworking the data read had the positive side effect of fixing a bug when displaying a Motorola system. And of course the most important update is that the program supports both 20x4 and 16x2 displays. Both have been tested and work well.

To upload the sketch to your Arduino remove the two pins that connect to your TTL to Serial adapter. Otherwise you will receive the following error:
avrdude: stk500_getsync(): not in sync: resp=0x56
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x47
Once the sketch has uploaded the two pins can be placed back into the Arduino. Only during programming will these pins need to be removed. I would suggest placing a switch or two on these connections for future updates.

I hope everyone enjoys the program. I know I have enjoyed writing it

I’m planning on concentrating now on building the hardware that will eventually sit in my truck. Slapping two Sparkfun breadboards on my dash doesn’t appeal to me. I will continue to monitor the forum and answer emails as they come in. Any bugs will be addressed as they come in.


Enjoy.


Rich
 

Attachments

  • HomebrewRemoteforUniden_v2.zip
    3.9 KB · Views: 132
K

kb0nly

Guest
kb0nly - Here you go. I've tested it the best I could. There are two variables you will need to set before uploading the sketch to the Arduino, lcdColumns and lcdRows. I've tested used a 16x2 and 20x4 LCD. Anything else might work, but I won't be able to check.

The next version for the 396XT, 996T, etc should be out in another day or so. Just trying to clean up the code a little.

Enjoy


Rich

Awesome!!

I will get to this very soon now, just got my Arduino in the mail today, LCD should be here in a day or two, and the TTL adapter as well. Getting closer!

Can't wait to see finished pictures of yours when you get that far.
 

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
Trixter - Is your scanner set to the same baud rate as it is shown in the program? Are you using a Null modem adapter between the TTL and the Uniden serial cable? Have you tried to connect the Arduino to a PC or Laptop and see if there is output utilizing a terminal program? Is TX on the TTL going to pin 0, RX and RX going to pin 1, TX on the Arduino?


Rich
 

richk107

Member
Joined
Apr 23, 2009
Messages
90
Location
New Jersey
Trixter - I forgot to ask, which radio are you trying to connect to? I saw an earlier post that you mention you weren't using a null adapter. If you are using the cable supplied by Uniden you will need the null adapter.

Rich
 
Status
Not open for further replies.
Top