PDA

View Full Version : Design Advice



isaac
- 19th August 2008, 16:00
Hi Everyone

I am written to pick up some advice from you on a project that was presented to me.
i am working a design that would be fitted in trallers . the aim of the project is to have an Lcd display in the cab of the lorry that would tell the driver the lenght & High of the trailler
on the display.
BUt it is not as simple as if sounds.
i client does not want ANY wire connection between the cab and the trailler and does not want to use wireless.
The way he wants this to work is that there would be 2 units one in the cab and the other in the trailler.
The unit in the traller would be programmed with the lenght & High etc at programme time and the data would be stored in the internal eeprom of the pic.
so all the trallers would have there data stored there so they can be used with any cab.
The data stored in the traller would need to be sent to the unit in the cab
But there is only a single wire connection between the cab & traller (Which is the reverse line when not in use)
Question How can i communicate between the pics using a single wire to sent the data
is this posible or is he asking for too much.
Personally i would go for wireless using RF modules but he dont want any cable to be touched apart from the line i talked about.
Is there a way of doing this regards

Isaac

Melanie
- 19th August 2008, 16:15
There's a thousand non-contact ways of doing this...

Why not just have a Barcode on a plate on the back of the Trailer which is scanned from inside the cab?

An iButton powered by RF tuned circuit or inductive loop?

There's lots of ways where the target (trailer) can have a device attached which can be powered by the source (cab) without the nescessity of any contact wiring.

But there's also lots of ways of reading Data from a distance without the target being powered in any shape or form anyway (ie like a Barcode, or Optical Character Recognition etc etc).

isaac
- 19th August 2008, 18:19
Thanks Mel


There's a thousand non-contact ways of doing this...

Why not just have a Barcode on a plate on the back of the Trailer which is scanned from inside the cab?).

This sounds a good idea which means the details of the trailer would on the barcode

An iButton powered by RF tuned circuit or inductive loop
(Not sure about this one i haven't a clue)

There's lots of ways where the target (trailer) can have a device attached which can be powered by the source (cab) without the nescessity of any contact wiring.
I am not quite sure what you mean here could you please expand on this mel

But there's also lots of ways of reading Data from a distance without the target being powered in any shape or form anyway (ie like a Barcode, or Optical Character Recognition etc etc

isaac
- 19th August 2008, 18:59
Would there be anyone whom can point me to a good tutorial about using
a barcode reader with the PIC (Complete Novice )

Regards
Isaac

Archangel
- 19th August 2008, 19:54
Hello Isaac,
Microchip has an eeprom with 1 wire interface ( data, ground, power) the 11LC160 avail. in SOT and PDIP. You could rig a circuit with a nicad, a to92 regulator, a couple of diodes etc to provide power, and charge off the running lights or even a solar panel.

Luciano
- 19th August 2008, 20:46
Hi,

http://img362.imageshack.us/img362/2439/barcodeeg0.th.jpg (http://img362.imageshack.us/img362/2439/barcodeeg0.jpg)
(Click to enlarge the picture)

Best regards,

Luciano

isaac
- 19th August 2008, 21:56
U are right just need suggestions

rhino
- 19th August 2008, 22:10
Use an IR transmitter on the trailer and IR receiver on the cab. Have the transmitter output the information at some time interval that is acceptable and maximizes battery life for the transmitter. No wires, No RF.

Luciano
- 19th August 2008, 22:49
Hi Isaac,

Connect an RF transmitter (PIC + 10mW TX module) to the brake lights of
the trailer so when the brakes are activated the data is sent to
the receiver located inside the cab. (PIC + RX module).

Example RF modules:
http://www.crownhill.co.uk/product.php?prod=435

http://www.rentron.com/PicBasic/RemoteControl.htm


Best regards,

Luciano

isaac
- 19th August 2008, 23:08
Luciano

Thanks for you idea



Use an IR transmitter on the trailer and IR receiver on the cab. Have the transmitter output the information at some time interval that is acceptable and maximizes battery life for the transmitter. No wires, No RF.

but wouldn't both IR Transmitter & Receive need to be Aligned facing each other?

Thanks
Isaac

isaac
- 19th August 2008, 23:11
Ooops
that was for Ryan Miller not Luciano

isaac
- 19th August 2008, 23:15
Luciano


Hi Everyone

i client does not want ANY wire connection between the cab and the trailler and does not want to use wireless.
Isaac

It would be easy to do it this way but he doesnt want wireless i am going have to try and talk him round

Isaac

Archangel
- 20th August 2008, 00:11
Just send serial data in form of an serout text message to a serial backpack LCD in the cab
<img src=http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2823&d=1219187302>

rhino
- 20th August 2008, 06:33
but wouldn't both IR Transmitter & Receive need to be Aligned facing each other?
Thanks
Isaac
They probably wouldn't have to be exactly lined up. Let's say you have a "cab" unit (receiver) that attaches to the back window in the cab. Then, a display up by the driver that the cab unit communicates to, to relay the information. That link could be wired, RF, whatever.... it sounds like your customer just doesn't want to have a wired unit between the truck and trailer. Then, I think you could align the cab unit and the trailer unit across from each other close enough that you could get the information (except during turns). I mean really, how much information are you really needing to transfer? It doesn't sound like much.
Here's another take on the touch memory (I-Button). Did you know that Rider Truck stores maintenance records for their trucks on I-Buttons? You rent one in Florida, drive it to California. At California, the pull up the service records on the I-Button and see what needs to be done next. Have a wand in the cab for the driver, when he gets out, he touches the I-Button on the trailer that transfers the trailer info to the wand. Driver hooks up the trailer, gets back in the cab, LCD displays the trailer info for the driver. The wand part is already a product. Our guard at work has one, there are check points through out the building. Once he's back to the office, he sets the wand in the cradle and it downloads all of the checkpoints. Kind of a check on the guard to make sure he's making the rounds. Just another idea.

isaac
- 20th August 2008, 10:55
. Have a wand in the cab for the driver, when he gets out, he touches the I-Button on the trailer that transfers the trailer info to the wand. Driver hooks up the trailer, gets back in the cab, LCD displays the trailer info for the driver. The wand part is already a product. Our guard at work has one, there are check points through out the building. Once he's back to the office, he sets the wand in the cradle and it downloads all of the checkpoints. Kind of a check on the guard to make sure he's making the rounds. Just another idea.

What is a wand?

Regards
Isaac

isaac
- 20th August 2008, 13:10
Thanks everyone
i have learnt a lot from you all and gone back to him
i emailed him that it has to be wireless modules or the barcode idea its up to him now.

Thanks again for your contributions

Isaac

rhino
- 20th August 2008, 14:11
What is a wand?
Regards
Isaac
I was thinking you could duplicate something like THIS (http://www.maxim-ic.com/products/ibutton/solutions/product.cfm?id=282). You can purchase a simple probe HERE (http://www.maxim-ic.com/products/ibutton/products/readers_probes_ports.cfm). This would make the unit portable, but would require the driver to remember to scan the trailer when it gets hooked up...... I say scan, but what I really mean is take the probe/wand and touch the I-Button on the trailer to get the information off of it.

isaac
- 23rd August 2008, 22:13
Hi All

I have just got an email from the customer he likes the idea of using an ibutton (Doesn't want wireless?)but he still insist that he does not want the driver to get out of the cab to touch the ibutton so i am nearly back to square one.(He wants to use the line for the revease line.
i was thinking i was thinking of using an ibutton but i need to isolate the 24v that is put on the line when its in reverse somehow.
i also dont know if the 1 wire protocol can withstand noise etc.
i need some guildance on this.
i attached the schematic which i would like to use but not quite sure if this would do the job

Regards
Isaac

Darrel Taylor
- 23rd August 2008, 22:34
For iButtons, you have to have a Pull-up resistor that supplies both power and the high side of the data.

I don't think the pull-up can overcome the Pull-down from the filaments of the light bulbs.
And if it could, the lights would always be partially on, and the ibutton would be dead after the first pulse trying to drive that much current.

Due to the inductance of the filaments you might be able to pass a low freq RF over that line, but probably not DC.
<br>

isaac
- 24th August 2008, 00:45
Ooops
it back to the drawing boards

isaac
- 24th August 2008, 09:36
For iButtons, you have to have a Pull-up resistor that supplies both power and the high side of the data.

I don't think the pull-up can overcome the Pull-down from the filaments of the light bulbs.
And if it could, the lights would always be partially on, and the ibutton would be dead after the first pulse trying to drive that much current.
<br>
Yes i agree with you i didn't take this into consideration


Due to the inductance of the filaments you might be able to pass a low freq RF over that line, but probably not DC.
<br>
How can i do this i am cracking up here

Regards
Isaac

isaac
- 24th August 2008, 14:57
Thanks DT

what if the circuit is modified as the attached image
using the relay contact to completely isolate the lamp from the circuit

Regards
Isaac

Darrel Taylor
- 24th August 2008, 21:52
I don't know Isaac,

It looks like the delay of the relay would still allow the iButton to take a pretty big 24V hit. I don't think the parasitic power cap in the ibutton could take too many of those.

Just thinking out loud here.

If on the cab side, the current to the reverse lights was monitored with a hall effect current sensor. And, on the trailer side a normally ON solid state relay or FET was placed in series with the light bulbs. Then the lights can be turned on and off (fast enough not to interfere with the lights being on) by a PIC sending serial data. The current sensor in the cab would pick up that signal easily for the receiving side.

Then every time you put it in reverse, the 24V will power up the PIC and it'll transmit what it's attached to. Same thing could be done with brake, turn signals or running lights.
<br>

Archangel
- 24th August 2008, 22:28
Hi Issac,
Your customers trucks are using 6 pin connectors? There are 7 pin trailer connectors available for large vehicles: http://www.accessconnect.com/images/wiring_7pole.jpg Does he now use a 7 pin with a charge line ?

rhino
- 25th August 2008, 19:34
Due to the inductance of the filaments you might be able to pass a low freq RF over that line, but probably not DC.
<br>

This sounds like a cool idea..... like X10?

ZOOM
- 5th September 2008, 23:57
I don't know Isaac,


Just thinking out loud here.

If on the cab side, the current to the reverse lights was monitored with a hall effect current sensor. And, on the trailer side a normally ON solid state relay or FET was placed in series with the light bulbs. Then the lights can be turned on and off (fast enough not to interfere with the lights being on) by a PIC sending serial data. The current sensor in the cab would pick up that signal easily for the receiving side.

Then every time you put it in reverse, the 24V will power up the PIC and it'll transmit what it's attached to. Same thing could be done with brake, turn signals or running lights.
<br>

DT
How can this be posible as the pic in the trailer to send serial data (There is only going to be the 24v line as its output.

Darrel Taylor
- 6th September 2008, 00:15
The idea is to read the Current being sent to the reverse lights from the cab. It's actually an analog output from the current sensor, but with the sensitivity cranked up ... the output will be "High" (output saturated) with any current being drawn, and "Low" when there's no current.

Then in the trailer, it turns the lights on/off via serial data to the solid state relay.

For incandescent lights, fast on/off times won't be noticed visually. May cause a little dimming, but it only takes a few milliseconds to send the data so noone will even notice.

This way it doesn't matter what the voltage is on the line. Works on 12v just as well as 24V.

ZOOM
- 6th September 2008, 12:43
The idea is to read the Current being sent to the reverse lights from the cab. It's actually an analog output from the current sensor, but with the sensitivity cranked up ... the output will be "High" (output saturated) with any current being drawn, and "Low" when there's no current.


DT good explanation just like a squarewave


Then in the trailer, it turns the lights on/off via serial data to the solid state relay.


How are you going to feed this output back to the tralier as if i followed this tread correctly i think it was mentioned that the only connection between the trailer and the cab is going to be the 24V line ?

Darrel Taylor
- 6th September 2008, 20:37
How are you going to feed this output back to the tralier as if i followed this tread correctly i think it was mentioned that the only connection between the trailer and the cab is going to be the 24V line ?

There's no output from the cab to the trailer. Only the power being applied to turn on the Reverse(back-up) lights.

When the reverse lights are turned on, it powers a PIC in the trailer that's been pre-programmed with the trailers information in EEPROM (no iButton). That pic modulates the lights, which sends the data to the cab (via current) without the need for any additional wires.

The information would be sent only once or twice when the reverse lights are first turned on. Which is why I mentioned it could be done with the brake or turn signal too. Those will happen more frequently, and the Brake is guaranteed to happen when driving. Turn signals are not guaranteed, depends on the driver, but they're more likely than reverse lights.

ZOOM
- 6th September 2008, 23:43
When the reverse lights are turned on, it powers a PIC in the trailer that's been pre-programmed with the trailers information in EEPROM (no iButton). That pic modulates the lights, which sends the data to the cab (via current) without the need for any additional wires.


I see what you mean what a clever way to do this =)
But i still dont get it how the cab would be able to differentiate between two trailers
as with your earlier explaination



That pic modulates the lights, which sends the data to the cab (via current) without the need for any additional wires.


With the brake/Reserve pressed the input to the cab would be high all the time as the lamp is ON

isaac
- 7th September 2008, 00:28
I see what you mean what a clever way to do this =)
But i still dont get it how the cab would be able to differentiate between two trailers
as with your earlier explaination

Hi Zoom

It would work if i get what DT is saying is that if you can turn the normally ON solid state relay ON/OFF (with serial Data say 01010101 ) fast and quick enough for it not to be noticed by the naked eye,this data can then be read by the pic in the Cab from the hall effect current sensors analog output fed via say a Schmitt trigger you should be able to recover that 01010101 Data sent by the trailer
This way each trailer would have a different code differentiated by the Pic in the Cab

Hope i am right
Isaac

Darrel Taylor
- 7th September 2008, 00:36
Ding Ding Ding Ding!

Give that man a cigar!

Exactly! :D
<br>

ZOOM
- 7th September 2008, 00:49
Hmmm thats a very niceway of doing things
BTW what sensors are avaliable i want to make an experiment
must of the solid state relays i found are all N/C any links

Zoom

Darrel Taylor
- 7th September 2008, 02:13
Before you make any decisions, it might be interesting to think about rhino's idea too.

X10 (http://www.picbasic.co.uk/forum/showpost.php?p=61313&postcount=25)

isaac
- 10th October 2008, 20:35
Hi All

I just want to thank all of you who contributed to this thread .
i have just managed to finish the project using the method suggested by
Darrel Taylor of which this project would not have being possible Great Guy
Lets just remember what the original problem was .



Hi Everyone

I am written to pick up some advice from you on a project that was presented to me.
i am working a design that would be fitted in trallers . the aim of the project is to have an Lcd display in the cab of the lorry that would tell the driver the lenght & High of the trailler
on the display.
BUt it is not as simple as if sounds.
i client does not want ANY wire connection between the cab and the trailler and does not want to use wireless.
The way he wants this to work is that there would be 2 units one in the cab and the other in the trailler.
The unit in the traller would be programmed with the lenght & High etc at programme time and the data would be stored in the internal eeprom of the pic.
so all the trallers would have there data stored there so they can be used with any cab.
The data stored in the traller would need to be sent to the unit in the cab
But there is only a single wire connection between the cab & traller (Which is the reverse line when not in use)
Question How can i communicate between the pics using a single wire to sent the data
is this posible or is he asking for too much.
Personally i would go for wireless using RF modules but he dont want any cable to be touched apart from the line i talked about.
Is there a way of doing this regards

Isaac


The Suggestion By Darrel Taylor


Just thinking out loud here.

If on the cab side, the current to the reverse lights was monitored with a hall effect current sensor. And, on the trailer side a normally ON solid state relay or FET was placed in series with the light bulbs. Then the lights can be turned on and off (fast enough not to interfere with the lights being on) by a PIC sending serial data. The current sensor in the cab would pick up that signal easily for the receiving side.

Then every time you put it in reverse, the 24V will power up the PIC and it'll transmit what it's attached to. Same thing could be done with brake, turn signals or running lights



I did actually that using the Transmit line of the pic in the trailer unit to turn ON/OFF a solid state Relay with the lamp powered via the NC contact.
And then in the Cab unit i used a Hall Effect Current Sensor to monitor the same current of the lamp .
This current is converted to an analog voltage by the current sensor the one i used was ACS712
http://www.allegromicro.com/en/Products/Part_Numbers/0712/index.asp
This sensor give a 2.5v output voltage when there is no current flow the voltage increases by 66 to 185 mV/A output sensitivity if there is current flowing in one direction and decreases by the same amount when flowing in the other direction.
But for this project the connection was made so that the current flow in the +ve direction to give us a positive voltage output.
I then fed this output to the +Ve input of comparator (LM311 pin 2)and used a ref voltage
of 2.52v applied to the -Ve input to the camparator (LM311 pin 3).
This way when there is current flow the ouptut of the comparator swings high corresponding to me switching the relay in the trailer unit.
This was now fed the to pic in the CAB to decode the data.
The Serial data using RS232 did not work i was unable to understand way as i was seeing the correct data on the scope so i decided to just do it by sending a freq and counting those pulses back in the cab unit .
That work perfect using just the count command to check the data .

so turnin the Relay the relay in the trailer unit with the following


Begin:


Start_Convert

high portc.6
pauseUS 6666
low portc.6
pauseUS 6666
GOTO Start_Convert


And using the Count command in the Cab unit gave me 75Hz
COUNT PORTC.2, 1000, W1 ' Count for 1 second

others tested were

'FREQ MAP
' pauseUS 6666 = 75HZ
'pauseUS 5000 = 100HZ
' pauseUS 3333 = 150HZ
'pauseUS 2500 = 200HZ
'pauseUS 2000 = 250HZ
' pauseUS 1666 = 300HZ
' pauseUS 1428 = 350HZ
'pauseUS 1250 = 400HZ
' pauseUS 1110 =450HZ
'pauseUS 1000 = 500HZ

This is just a simple way to differentiate the telling which trailers were connected to the Cab.
Thanks everyone for all your help couldn't have done it with u

Isaac

isaac
- 10th October 2008, 20:55
Sorry here is the trailer circuit

Darrel Taylor
- 11th October 2008, 07:08
Excellent!
I'm so glad that worked.

But I'm dying to see the Cab side of the circuit.
I really thought the serial data would do it. :o
<br>

isaac
- 11th October 2008, 17:12
should be on sometime 2nite just changing a few things because of legal issues etc

Isaac

isaac
- 11th October 2008, 23:07
Here is the cab circuit
Thank DT

Regards
Isaac

<img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=2899&stc=1&d=1223762714" />