A HAH shield for the arduino.cc board

8 replies [Last post]
percih70
Offline
Joined: 3 Jan 2011

Hello All

Just a thought, would anyone be interested in collaborating on a HAH shield, compatable with the existing arduino.cc spec, and supporting an enhanced 1wire RJ45 line driver, with 433 Mhz TX and possible 433 Mhz RX?

Regards

Harry

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
HAH shield

Hi Harry,

The HAH is pretty flexible in that it is relatively easy to addon additional microcontrollers via USB to serial adaptor(s) and xap-serial e.g. the RF Rx unit that I described at http://www.dbzoo.com/livebox/xap_serial#a_short_tutorial

RJ45 is definately the way to go on the 1-wire front. I now use a little breakout board to connect the 3pin molex connector on the HAH PCB to RJ45 - results are much better than with the 3.5mm stereo jack affair.

As for 433MHz Tx, this shouldn't be too difficult. The transmitters do work best on 12V, so some way of getting this to the shield would perhaps be best.

Rx is 'harder'. To date, I've dedicated a small micro to being a Rx subsystem. I suppose that with some smarter code, it might be possible to do Rx as well as other functions.

Interestingly, Brett & I are currently testing an ATMEGA328 version of the HAH firmware ... the same chip as used in most Arduinos. We use the Arduino bootloader to ease firmware loading. Had hoped to release this by now, but time has been in short supply.

Reckon the skills needed are Embedded Unix/Busybox/C, Lua scripting, developing Arduino sketches, PCB design. Of course, there is also the need for a TARDIS to make time to do all of this!

Cheers,
Derek

percih70
Offline
Joined: 3 Jan 2011
RF temp sensors

Hello Derek

Yes HAH is indeed very flexible - I,ll check out xap-serial via the USB port into an Arduino, and yes RJ45 does seems to be the best solution to long 1wire runs, Ive several runs in a star configuration (not ideal)  - the pull up resistor need to drop to 1K8, but since I made that change, its been 100% solid. (I also added some 100R resistors and catch diodes on the data line's - but prob not needed).  I'm thinking the attraction of a 433Mhz RX would be the possibility to decoded data from remote RF sensors, eg ebay 230605028505

Regards

Harry

brett
Offline
Providence, United States
Joined: 9 Jan 2010
It should be possible

It should be possible to substitute an arduino for the HAH board and replace the xap-livebox reference in the startup from /dev/ttyS0 (the livebox serial output) to /dev/ttyUSB0 and hang off an arduino instead.

In fact I started on a rewrite of the AVR firmware last year as an Arduino sketch just so I could test this out but never got around finishing this project off.  Its on my very long list of todo items.

I do however have a C++ class that encapsulates the Universal RF Tx subsystem that is present in the new 328 version.   I prototyped this all on an ARM Cortex-M3 board and then rewrote once it was working to suit the existing HAH BASCOM code base.  This C class is not published anywhere thou as opensource.

With regards to an RF Rx unit Derek has already put togther a nice turnkey solution that bolts onto the exist xap-serial daemon.  Althought I've not seen it work a few other have field tested it sucessfully.  As RF is much tricker to decode its not univeral RF as the protocol it encoded into the firmware.

Expanding the architecture using xap-serial is the right approach this program is the perfect companion for the job, along with a bit of LUA script.  You might want to consider checking out the HAH arduino section, its a little scant due to my limited time resource.  However I run an Arduino and a NuElectronics Ethershield which just monitors 1-wire temperature and reports directly onto the network and this is published.

Having said all that if you want to pick some of these theads and continue on I'd be more then happy to assist you (time permitting).

Brett

percih70
Offline
Joined: 3 Jan 2011
Number of USB serial devices?

 

Hello Bert 

A lot of info in your reply - cheers. 

A couple of things,

1/ With the addition of an external hub, could I run an Arduino and a CC128 device, or can I only support 1 serial device?

2/ where might I find the the startup file? with the reference to /dev/tty?

3/ I had a quick look with an Arduino connected to the internal serial connector - with a script listening to a soft serial port off pins 3,2 - I was getting data but nothing meaning full - serial was set to 115200 but still it looked like it was a clock error problem.

 

Regards

 

Harry

 

brett
Offline
Providence, United States
Joined: 9 Jan 2010
External serial

The current /dev/ttyUSB* pool has support for up to 8 serial/USB devices so with a USB HUB yes you can get to use all of these if you wish.

To make the xap-livebox use an external serial port you need to do this.

# cd /etc/init.d
# rm xap
# sed 's/ttyS0/ttyUSB0' < /etc_ro_fs/init.d/xap > xap

Adjust ttyUSB0 for where your serial port really is see /var/log/messages

to put the system back to its default configuration

# cd /etc/init.d
# rm xap
# ln -s /etc_ro_fs/init.d/xap

the intenal livebox serial port is TTL level signalling (3v) so you need a MAX3223 before this is visible using a standard serial port.  Unless of course you connect your arduino also using TTL and a soft serial port.

We made up TTL(3v)/RS232(5v) adapters see "livebox-serial-console-adapter" in the shop that make this easier.

percih70
Offline
Joined: 3 Jan 2011
setting the resolution of the DS18B20

Thanks for this Bert - I,ll get onto it 2morrow.

PS

Also - do you know if its possible to set the resolution of the DS18B20 connected to the HAH, I’ve got some reporting every 0.5deg change while others report +_0.2deg changes – its possible to set the resolution in a Maxim windows appz, but it then seems to either be lost of over written on boot up? (0.2deg results in a lot of data).

 

Harry

derek
Offline
Glasgow, United Kingdom
Joined: 26 Oct 2009
Careful with those serial port levels

As Brett mentioned, the Livebox uses a 3.3V level on the serial port exposed via the MMJ socket. If you don't use the correct circuitry to adapt this to talk to an external device, you risk 'frying' the Livebox serial port.

The HAH PCB has components to sort this ... allowing the AVR on the PCB to run at 5V ... still with the lower serial port voltage. 

My Arduino boards are running at 5V. Direct pin connection to the Livebox serial port NOT recommended. If your Arduino is 3.3V ... you might be OK, but I've not tried this.

I've personally tested upto four USB connected RS232 serial devices. Works just fine. 

Derek.

percih70
Offline
Joined: 3 Jan 2011
5v to 3v3 level shifter

Thanks Derek - yes good advice on inferfacing to the 3v3 serial port.

Here's a link to some usefull notes on same.

http://www.sparkfun.com/tutorials/65

(the 403 errors are intermittant, the pictures will eventually load).

Harry

Hardware Info