SlotForum banner
1 - 13 of 13 Posts

· Premium Member
Joined
·
283 Posts
Discussion Starter · #1 ·
In my quest for knowledge for all things Carrera analog controller interface, I purchased a controller extension to investigate the technique used to add the additional ports to a CU hand controller port. Here are a few interesting attributes.

1 - The extension is based on an Atmel ATMEGA8 (the CU uses a MEGA16)

2 - The extension uses all 6 RJ12 pins versus the 4 pins used by a controller (2-5).

3 - Pins 4 and 5 from the CU to the extension are not used (controller switch and slider)

4 - Pins 2 and 3 from the CU provide power and ground for the extension

5 - RJ12 pins 1 and 6 are used by the MEGA8 for serial communication of the connected hand controller functions (switch and slider)

6 - The documentation states that the extension is to use port 1 of the CU but it also works in port 2 (I have the wireless adaptor in port 1)

I haven’t looked into the serial protocol yet. Hoping someone already has!
 

· Premium Member
Joined
·
283 Posts
Discussion Starter · #3 ·
Crustyop, you are correct. I went to use a wireless controller and it wouldn't communicate to the CU. Disconnected the Extension box and all was as it should be.

Re-read the documents which state

Control Unit doc
Wireless Adaptor in port 1 and nothing in port 2
Extension in port 1
Wireless adaptor and Extension can not be used together

Wireless doc
Wireless Adaptor in port 1 or port 2 (no reference to Extension useage)

Extension doc
Connect to port 1 (no reference to Wireless Adaptor)
 

· Premium Member
Joined
·
283 Posts
Discussion Starter · #4 ·
Here are a few images of the digital communications between the CU and Controller Extension.

Lower, blue, from CU to Extension. Upper yellow, from Extension to CU. The 2 pluses are TBD but the other 3 pulse bursts are the controller data for speed and switch in order (1, 3, 4)

Mesh Rectangle Audio equipment Visual effect lighting Gas


Closer view of an Extension sequence

Black Slope Line Font Rectangle


Closer view of the initial pulses in the sequence

Rectangle Yellow Line Font Parallel


Closer view of the speed and switch data part of the sequence

Light Slope Font Rectangle Parallel
 

· Premium Member
Joined
·
283 Posts
Discussion Starter · #5 ·
Did more measurements today with the Extender. Analog voltage to the Extender versus the corresponding digital values from the Extender. The lower values are less accurate because of noise in the system. The blue is measured and the green is linearized.

Rectangle Slope Line Font Plot

Based on the above information, the controller only uses about half of the slider distance before reaching maximum speed. I changed the 10k fixed resistor in the controller to 18k. The range of speeds is now spread across the entire slider distance.
 

· Registered
Joined
·
3 Posts
Here are a few images of the digital communications between the CU and Controller Extension.

Lower, blue, from CU to Extension. Upper yellow, from Extension to CU. The 2 pluses are TBD but the other 3 pulse bursts are the controller data for speed and switch in order (1, 3, 4)

View attachment 295105

Closer view of an Extension sequence

View attachment 295106

Closer view of the initial pulses in the sequence

View attachment 295107

Closer view of the speed and switch data part of the sequence

View attachment 295108
Hi Yattr

I am trying to modify my digital 132 track so that it can be controlled via internet. I use four digital potential-meter and a micro-controller to replace the hand controller. it kinda work, I am able to control the speed. but the car run very weirdly, every 2 second or so the motor will stop momentarily a few time(can feel there is a pattern in the stoppage). it almost as if running a bad piston engine.
While searching for solution i saw your test. Do you think that the digital sequence is causing this behavior?
 

· Premium Member
Joined
·
283 Posts
Discussion Starter · #7 ·
Explosivealan,

In my other topic where I discuss multi-speed autonomous (better described as intelligent/programmable controller), I was using NSR cars with just one capicitor across the motor poles. The issue you described happened often. All my cars have now been modified to have 3 capacitors on the motor. One across the poles and one from each pole to the motor case. I haven't had a problem since.

The chart above is the voltage where the digital values changes. For a given digital speed, you need to be between the 2 values to be confident that the CU isn't bouncing between 2 digital speeds.

Here is a better graph. Ignore the numbers as they are the DAC values I use to output the desired speed. There is a range of voltage values that will generate the same digital speed. These value are specific to my design and you will need to generate your own specific to your design.

System electronic noise can have an effect on the value present to the controller interface. Make sure your output to the controller interface is clean and stable. A lowpass filter will help - series resistor to controller interface and capacitor to ground. I use a ~30Hz filter as the sample rate of the input is slow - the track sequence protocol is 75msec. Changing the inputs more often will not have an effect. In the graph note that noise below 300mv is interpreted as digital speed 0 so your goal should be to have a degree of margin below this value.

Having a known starting point to apply your input would help your design. Use the Blue pulse (it is avail on port 1 and 2 of the CU) shown above as a trigger to change and hold your input values until the next Blue pulse. This will ensure that your value is present before the Control words are updated by the CU. This will also give you time to generate a nice clean steady value if you filter.

Hope this helps.



Rectangle Slope Line Font Parallel
 

Attachments

· Registered
Joined
·
3 Posts
Explosivealan,

In my other topic where I discuss multi-speed autonomous (better described as intelligent/programmable controller), I was using NSR cars with just one capicitor across the motor poles. The issue you described happened often. All my cars have now been modified to have 3 capacitors on the motor. One across the poles and one from each pole to the motor case. I haven't had a problem since.

The chart above is the voltage where the digital values changes. For a given digital speed, you need to be between the 2 values to be confident that the CU isn't bouncing between 2 digital speeds.

Here is a better graph. Ignore the numbers as they are the DAC values I use to output the desired speed. There is a range of voltage values that will generate the same digital speed. These value are specific to my design and you will need to generate your own specific to your design.

System electronic noise can have an effect on the value present to the controller interface. Make sure your output to the controller interface is clean and stable. A lowpass filter will help - series resistor to controller interface and capacitor to ground. I use a ~30Hz filter as the sample rate of the input is slow - the track sequence protocol is 75msec. Changing the inputs more often will not have an effect. In the graph note that noise below 300mv is interpreted as digital speed 0 so your goal should be to have a degree of margin below this value.

Having a known starting point to apply your input would help your design. Use the Blue pulse (it is avail on port 1 and 2 of the CU) shown above as a trigger to change and hold your input values until the next Blue pulse. This will ensure that your value is present before the Control words are updated by the CU. This will also give you time to generate a nice clean steady value if you filter.

Hope this helps.



Yattr,

Thank you for your answer, I added a low pass filter and it work really well. I thought of it before but i don't have the knowledge what frequency i can safely filter out, now i know that i can do it as low as 30Hz lol.....
I now use two 75Hz filter on each of the potential-meter, the control unit take both end (3pin, still can't understand why they do this) so i guess i have to use two filter on each potential-meter.
I currently give a 256 steps voltage back to the control unit, i guess next step i will try to make it to a 15 steps completely fall within the chart here and hopefully it will perform even better.

Thanks
 

· Registered
Joined
·
2 Posts
Crustyop, you are correct. I went to use a wireless controller and it wouldn't communicate to the CU. Disconnected the Extension box and all was as it should be.

Re-read the documents which state

Control Unit doc
Wireless Adaptor in port 1 and nothing in port 2
Extension in port 1
Wireless adaptor and Extension can not be used together

Wireless doc
Wireless Adaptor in port 1 or port 2 (no reference to Extension useage)

Extension doc
Connect to port 1 (no reference to Wireless Adaptor)
Yattr: am also having trouble getting the wireless adapter to play nicely with the extender adapter. I will do a complete CU reset but up to now I just can't get them working at the same regardless of the CU input ports I put them on.

Do I understand you correctly that you have them both working at the same time with the wireless on port 1 ant the extender on port 2? was there any magic to the sequence or the connection process?
 

· Premium Member
Joined
·
283 Posts
Discussion Starter · #12 ·
You CANNOT use both at the same time. Yes, unfortunate. If you do, the data from each is attempting to share the same input to the microcontroller!!!! Each is also driving into an output form the other digital device. NOT GOOD!

No. I do not use both at the same time. I will use an analog controller in 2 with the Controller Extension in 1. With the Wireless+ in either 1 or 2 I will use an analog controller is 2 or 1 (whatever the Wireless plus isn't occupying)

The Controller Extention and the Wirless+ remap CU controller ports labeled 3 and 4 to 5 and 6

The Controller Extension in 1 provides 1, 3 and 4 analog controller ports. 2, 5 and 6 are via the CU ports. The Controller Extension coverts 1, 3 and 4 to digital (serial) and delivers this to the CU. IDs 2, 5 and 6 are converted from analog to digital in the CU microcontroller.

The Wireless+ also sends digital data serially to the CU for all 6 IDs. Issues arise when an analog controller with the same ID is also in use via the CU controller ports...
 

· Registered
Joined
·
2 Posts
You CANNOT use both at the same time. Yes, unfortunate. If you do, the data from each is attempting to share the same input to the microcontroller!!!! Each is also driving into an output form the other digital device. NOT GOOD!

No. I do not use both at the same time. I will use an analog controller in 2 with the Controller Extension in 1. With the Wireless+ in either 1 or 2 I will use an analog controller is 2 or 1 (whatever the Wireless plus isn't occupying)

The Controller Extention and the Wirless+ remap CU controller ports labeled 3 and 4 to 5 and 6

The Controller Extension in 1 provides 1, 3 and 4 analog controller ports. 2, 5 and 6 are via the CU ports. The Controller Extension coverts 1, 3 and 4 to digital (serial) and delivers this to the CU. IDs 2, 5 and 6 are converted from analog to digital in the CU microcontroller.

The Wireless+ also sends digital data serially to the CU for all 6 IDs. Issues arise when an analog controller with the same ID is also in use via the CU controller ports...
thanks much; will save me hours of futility. That third wired controller will have to go on the shelf as a spare.
 
1 - 13 of 13 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top